WASHINGTON — The House on Thursday overwhelmingly passed a bill protecting technology companies and their customers from nuisance patent-infringement lawsuits by shell companies that exist merely to gather dormant patents and threaten lawsuits against suspected violators.

The measure, known as the Innovation Act, would force companies that bring patent-infringement lawsuits to disclose information about who ultimately owns a patent and would benefit from a settlement or award and to specify how a patent is being violated. The bill would also require judges to declare early in the proceeding whether a patent is valid, perhaps saving a company from spending millions of dollars on discovery.

At a time of deep divisions on Capitol Hill, the bipartisan bill passed 325 to 91. It comes only two years after President Obama signed into law the America Invents Act, a sweeping overhaul of the patent system that was shaped in part to address the “patent troll” problem.

Instead, a provision of the law — which prevents patent holders from lumping a number of possible infringers into a single lawsuit — caused the number of patent lawsuits to soar. Patent-assertion entities, the shell companies that are referred to as patent trolls, accounted for more than half of the 4,000 patent lawsuits filed last year.