After having successfully filed a few patents myself and being involved in a few defensive cases I have to say, the entire patent business really got out of hand.
The author Gregory N. Mankiw says in the book "Principles of Economics", the chapter "Externalities", that the goal of patents is to provide an incentive to research. And that makes sense, I might spend years of my life researching on a topic, then this gets public one way or the other, either because I monetarize it with a product or I publish my findings, and some other company takes that apart and sells the same thing cheaper as they did not waste money on research. But does this idea have anything to do with what is going on with those patent infringement law suits you see out there in the tech industry? Little. So how to solve that?
One group of people has the opinion, the software is the evil part. Do not allow patents on software. I can understand that software patents are often trivial but neither they are the only ones nor is software trivial in all cases. So ruling out software would reduce the number of lawsuits quickly but it would not solve the patent problem as such. Not to mention that we would simply add some vague hardware requirements or creatively workaround that issue. Oh, that's not a computer, that's a tablet!
So my approach would be to raise the bar on what is trivial or not. The patent office already tries that by applying a list of criteria against each filed patent and in general these criteria are sound. But still a lot of things slip through, imagine the Amazon One-Click patent.
The research leading to the patent should have taken one calendar year or more.
No formal proof of that, just the statement of what was the goal of the research, what was uncovered, how many people worked how much time on it. Obviously the companies would lie about it as much as they want but the important point is, it would give others a lever to invalidate the patent claim easily. "So it took you one year and 10 people working on it to figure out a One-Click button with a delayed automatic checkout instead of clicking on checkout explicitly? I very much doubt that."
That would cover all eventualities of research as well, e.g.
Pfizer did an expensive research on a medicine against Angina Pectoris but test showed it lasted for four hours only and had one major unintended side effect. Now this medicine is sold under the name Viagra for a different application. Is it okay to patent that? Absolutely.
After year of mathematical research someone found an algorithm with which you can compute prime factors much more efficient. That has impact to all current encryption methods. Applies for a patent? I would say yes, without a patent this research would not have been made.
If you sue somebody over patent infringement, the court is allowed to render the patent invalid.
Today every patent lawsuit follows a two-pronged approach. First you defend your case telling you are not infringing at all. And as the patent is so widely defined, you suggest the patent should not have been granted in first place due to prior art. Pausing the lawsuit just to wait for the patent office decision takes too long and you could assume, they decided the one way before, why not again. On the other hand, the current lawsuit has all parties involved and it needs to dive deep into the topic anyhow. So let this court allow to render the patent invalid already. If they find the patent was valid they have to decide on damages and therefore look at all the details anyhow. And if the outcome is, the patent has prior art, it is invalid anyhow. This would also increase the pressure to resolve the issue outside of the court as the risk for the applicant is higher. And if the patent was violated, there is nothing to fear about suing them.