China beats US in patent filings for a second straight year