我试图从美国专利商标局的专利审查数据系统中提取一个特定值(发明人的名字),但我的代码不会从搜索中获得inventorName值。当我尝试打印结果时,当前的结果是"None“。它确实检索了专利中的所有信息,但我似乎无法获得字典中的特定值。
from uspto.peds.client import UsptoPatentExaminationDataSystemClient
client = UsptoPatentExaminationDataSystemClient()
expression = 'patentNumber:(5555555)'
result = dict(client.search(expression))
print(result.get('inventorName'))
print(result)目前的结果是:
None<br/>
/*
* 提示:该行代码过长,系统自动注释不进行高亮。一键复制会移除系统注释
* {'numFound': 1, 'start': 0, 'docs': [{'applId': '08183369', 'assignments': [{'reelNumber': '7088', 'frameNumber': '469', 'addressNameText': 'SUGHRUE, MION, ZINN, MACPEAK & SEAS', 'addressLineOneText': 'ROBERT V. SLOAN', 'addressLineTwoText': '2100 PENNSYLVANIA, N.W.', 'addressLineThreeText': 'SUITE 800', 'addressLineFourText': 'WASHINGTON, D.C. 20037-3202', 'mailDate': '09-12-1994', 'receivedDate': '', 'recordedDate': '03-18-1994', 'pagesCount': '2', 'converyanceName': 'ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS).', 'sequenceNumber': '1', 'assignors': [{'assignorName': 'SATO, JUN', 'execDate': '02-24-1994'}, {'assignorName': 'SAIKI, MITSUYOSHI', 'execDate': '03-03-1994'}], 'assignee': [{'assigneeName': 'AISIN SEIKI KABUSHIKI KAISHA', 'streetLineOneText': '1, 2-CHOME, ASAHIMACHI', 'streetLineTwoText': 'null', 'cityName': 'KARIYA CITY, ACIHI PREF.', 'countryCode': 'JAPAN', 'postalCode': 'null'}]}], 'appFilingDate': '1994-01-19T00:00:00Z', 'appExamName': 'JOHNS, ANDREW W', 'appExamNameFacet': 'JOHNS, ANDREW W', 'publicInd': 'Y', 'appLocationDate': '2018-06-23T00:00:00Z', 'APP_IND': '5', 'inventorName': 'JUN SATO', 'inventorNameFacet': 'JUN SATO', 'corrAddrGeoRegionCode': 'DC', 'corrAddrNameLineTwo': '2100 PENNSYLVANIA AVENUE NW', 'appLocation': 'FILE REPOSITORY (FRANCONIA)', 'id': '08183369', 'appGrpArtNumber': '2606', 'appGrpArtNumberFacet': '2606', 'applIdStr': '08183369', 'appl_id_txt': '08183369', 'inventorsFullName': ['{JUN||SATO},{MITSUYOSHI||SAIKI}'], 'inventorsFullNameFacet': '{JUN||SATO},{MITSUYOSHI||SAIKI}', 'appSubCls': '104000', 'patentNumber': '5555555', 'LAST_MOD_TS': '2017-03-04T07:27:30Z', 'transactions': [{'recordDate': '2017-03-04 00:00:00', 'code': 'TRIALDIS', 'description': 'Request for Trial Dismissed'}, {'recordDate': '1996-09-10 00:00:00', 'code': 'PGM/', 'description': 'Recordation of Patent Grant Mailed'}, {'recordDate': '1996-08-05 00:00:00', 'code': 'WPIR', 'description': 'Issue Notification Mailed'}, {'recordDate': '1996-06-18 00:00:00', 'code': 'N084', 'description': 'Issue Fee Payment Verified'}, {'recordDate': '1996-03-20 00:00:00', 'code': 'MC/N=', 'description': 'Mail Corrected Notice of Allowance'}, {'recordDate': '1996-03-20 00:00:00', 'code': 'C/N=', 'description': 'Corrected Notice of Allowance'}, {'recordDate': '1996-03-13 00:00:00', 'code': 'MN/=.', 'description': 'Mail Notice of Allowance'}, {'recordDate': '1996-03-13 00:00:00', 'code': 'N/=.', 'description': 'Notice of Allowance Data Verification Completed'}, {'recordDate': '1996-03-13 00:00:00', 'code': 'MEX.A', 'description': "Mail Examiner's Amendment"}, {'recordDate': '1996-03-13 00:00:00', 'code': 'EX.A', 'description': "Examiner's Amendment Communication"}, {'recordDate': '1996-03-08 00:00:00', 'code': 'FWDX', 'description': 'Date Forwarded to Examiner'}, {'recordDate': '1996-02-29 00:00:00', 'code': 'A.QU', 'description': 'Response after Ex Parte Quayle Action'}, {'recordDate': '1996-02-29 00:00:00', 'code': 'LTDR', 'description': 'Incoming Letter Pertaining to the Drawings'}, {'recordDate': '1995-12-29 00:00:00', 'code': 'MCTEQ', 'description': 'Mail Ex Parte Quayle Action (PTOL - 326)'}, {'recordDate': '1995-12-19 00:00:00', 'code': 'CTEQ', 'description': 'Quayle action'}, {'recordDate': '1995-10-20 00:00:00', 'code': 'FWDX', 'description': 'Date Forwarded to Examiner'}, {'recordDate': '1995-09-13 00:00:00', 'code': 'A...', 'description': 'Response after Non-Final Action'}, {'recordDate': '1995-09-13 00:00:00', 'code': 'XT/G', 'description': 'Request for Extension of Time - Granted'}, {'recordDate': '1995-04-13 00:00:00', 'code': 'MCTNF', 'description': 'Mail Non-Final Rejection'}, {'recordDate': '1995-04-12 00:00:00', 'code': 'CTNF', 'description': 'Non-Final Rejection'}, {'recordDate': '1994-03-18 00:00:00', 'code': 'RQPR', 'description': 'Request for Foreign Priority (Priority Papers May Be Included)'}, {'recordDate': '1994-03-18 00:00:00', 'code': 'M844', 'description': 'Information Disclosure Statement (IDS) Filed'}, {'recordDate': '1994-03-18 00:00:00', 'code': 'WIDS', 'description': 'Information Disclosure Statement (IDS) Filed'}, {'recordDate': '1995-02-10 00:00:00', 'code': 'DOCK', 'description': 'Case Docketed to Examiner in GAU'}, {'recordDate': '1994-09-22 00:00:00', 'code': 'TR.Q', 'description': 'Transfer Inquiry'}, {'recordDate': '1994-09-07 00:00:00', 'code': 'FILM', 'description': 'Application Captured on Microfilm'}, {'recordDate': '1994-08-18 00:00:00', 'code': 'COMP', 'description': 'Application Is Now Complete'}, {'recordDate': '1994-06-08 00:00:00', 'code': 'MPTGR', 'description': 'Mail-Petition Decision - Granted'}, {'recordDate': '1994-03-18 00:00:00', 'code': 'PET.', 'description': 'Petition Entered'}, {'recordDate': '1994-02-18 00:00:00', 'code': 'INC/', 'description': 'Notice of Incomplete Application - Filing Date Not Assigned'}], 'LAST_INSERT_TIME': '2020-05-14T13:52:27Z', 'appCls': '382', 'appStatus': 'Patented Case', 'appStatusFacet': 'Patented Case', 'appStatus_txt': 'Patented Case', 'foreignPriority': [{'applicationNumberText': '08183369', 'priorityClaim': '5-7017/1993', 'countryName': 'JAPAN', 'filingDate': '01-19-1993'}], 'patentTitle': 'APPARATUS WHICH DETECTS LINES APPROXIMATING AN IMAGE BY REPEATEDLY NARROWING AN AREA OF THE IMAGE TO BE ANALYZED AND INCREASING THE RESOLUTION IN THE ANALYZED AREA ', 'appStatusDate': '1996-08-30T00:00:000Z', 'appAttrDockNumber': 'Q34261', 'inventors': [{'nameLineOne': 'SATO', 'nameLineTwo': 'JUN ', 'suffix': '', 'streetOne': '', 'streetTwo': '', 'city': 'CAMBRIDGE, ', 'geoCode': 'EN', 'country': '(GB)', 'rankNo': '1'}, {'nameLineOne': 'SAIKI', 'nameLineTwo': 'MITSUYOSHI ', 'suffix': '', 'streetOne': '', 'streetTwo': '', 'city': 'TSUKUBA CITY, ', 'geoCode': '', 'country': '(JP)', 'rankNo': '2'}], 'inventorsFacet': '{JUN||SATO||||CAMBRIDGE|EN|GB|IND|1},{MITSUYOSHI||SAIKI||||TSUKUBA CITY||JP|IND|2}', 'firstInventorFile': 'No', 'appType': 'Utility', 'appTypeFacet': 'Utility', 'corrAddrPostalCode': '20037', 'appClsSubCls': '382/104000', 'appClsSubClsFacet': '382/104000', 'patentIssueDate': '1996-09-10T00:00:00Z', 'corrAddrNameLineOne': 'SUGHRUE MION ZINN MACPEAK AND SEAS', 'attrnyAddr': [{'applicationId': None, 'registrationNo': '18879', 'fullName': 'Mion, John ', 'phoneNum': '202-293-7060', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '19046', 'fullName': 'Zinn, Donald Sr', 'phoneNum': '202-293-7060', 'regStatus': 'DELETED'}, {'applicationId': None, 'registrationNo': '19093', 'fullName': 'McMorrow, Robert ', 'phoneNum': '202-663-7920', 'regStatus': 'ADMIN SUSPENDED'}, {'applicationId': None, 'registrationNo': '19292', 'fullName': 'MacPeak, Thomas ', 'phoneNum': '202-293-7060', 'regStatus': 'DELETED'}, {'applicationId': None, 'registrationNo': '21092', 'fullName': 'Seas, Robert Jr', 'phoneNum': '202-293-7060', 'regStatus': 'ADMIN SUSPENDED'}, {'applicationId': None, 'registrationNo': '22775', 'fullName': 'Sloan, Robert ', 'phoneNum': '202-293-7060', 'regStatus': 'DELETED'}, {'applicationId': None, 'registrationNo': '23063', 'fullName': 'Mexic, Darryl ', 'phoneNum': '202-663-7909', 'regStatus': 'ADMIN SUSPENDED'}, {'applicationId': None, 'registrationNo': '24513', 'fullName': 'Olexy, Peter ', 'phoneNum': '202-293-7060', 'regStatus': 'ADMIN SUSPENDED'}, {'applicationId': None, 'registrationNo': '24625', 'fullName': 'OSHA, J ', 'phoneNum': '202-293-7060', 'regStatus': 'DELETED'}, {'applicationId': None, 'registrationNo': '24835', 'fullName': 'Gubinsky, Louis ', 'phoneNum': '202-467-8812', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '24861', 'fullName': 'Biggart, Waddell II', 'phoneNum': '202-293-7060', 'regStatus': 'DELETED'}, {'applicationId': None, 'registrationNo': '25430', 'fullName': 'Landsman, Sheldon ', 'phoneNum': '202-663-7933', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '25665', 'fullName': 'Bernstein, Howard ', 'phoneNum': '703-623-5811', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '25200', 'fullName': 'Siegel, Neil ', 'phoneNum': '202-293-7060', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '25426', 'fullName': 'Kasper, Alan ', 'phoneNum': '202-293-7060', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '26577', 'fullName': 'Ruch, Joseph Jr', 'phoneNum': '202-663-7931', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '26916', 'fullName': 'Inge, John ', 'phoneNum': '202-339-8445', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '28703', 'fullName': 'Cushing, David ', 'phoneNum': '202-663-7925', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '29710', 'fullName': 'Turner, Richard ', 'phoneNum': '202-293-7060', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '30951', 'fullName': 'Mack, Susan ', 'phoneNum': '202-293-7060', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '31484', 'fullName': 'Bernstein, Frank ', 'phoneNum': '650-865-6500', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '30764', 'fullName': 'Kit, Gordon ', 'phoneNum': '202-362-9470', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '32197', 'fullName': 'Boland, Mark ', 'phoneNum': '202-293-7060', 'regStatus': 'ACTIVE'}, {'applicationId': None, 'registrationNo': '31333', 'fullName': 'Burchfiel, Kenneth ', 'phoneNum': '202-293-7060', 'regStatus': 'ACTIVE'}], 'corrAddrCountryCd': 'US', 'corrAddrCity': 'WASHINGTON', 'appEntityStatus': 'UNDISCOUNTED', 'appConfrNumber': '9710', 'lastUpdatedTimestamp': '2020-05-16T14:51:30.854Z', 'appAttrDockNumberFacet': 'Q34261', 'appEntityStatusFacet': 'UNDISCOUNTED', '_version_': 1666859238011437056, 'firstInventorFileFacet': 'No', 'appLocationFacet': 'FILE REPOSITORY (FRANCONIA)', 'patentNumberFacet': '5555555'}], 'metadata': {'indexLastUpdatedDate': 'Mon Aug 24 19:15:48 EDT 2020', 'queryId': '09519f26-5026-4bf6-8762-97a82e1fa36b', 'responseHeader': {'zkConnected': True, 'status': 0, 'QTime': 107}}}
*/发布于 2020-08-25 08:34:24
我找到了另一个可行的解决方案:
import requests
from bs4 import BeautifulSoup
import json
r = requests.get("https://developer.uspto.gov/ibd-api/v1/patent/application?patentNumber=9876543&start=0&rows=100")
soup = BeautifulSoup(r.text, "html.parser")
text = soup.get_text()
r_dict = json.loads(str(text))
print(r_dict['response']['docs'][0]['inventor'][0])现在,结果就是inventor名称。例如,对于专利9876543,发明人的结果是:
亚历山大,托马斯
进程已完成,退出代码为0
发布于 2020-12-11 11:58:49
你就快到了!只需深入挖掘一下,因为数据隐藏在'docs'密钥的值中。使用您定义的相同结果对象,您可以通过调用以下命令来获取inventor名称:
result['docs'][0]['inventorName']对于专利号5555555,它返回'JUN SATO'。
顺便说一句,我认为在可能的情况下,API通常是获取信息的首选方式,支持通过请求/BeautifulSoup进行web抓取。
https://stackoverflow.com/questions/63570102
复制相似问题