Method and device for searching invoice title information and storage medium

By using Elasticsearch to store the keyword-heading information mapping relationship in the search server, quickly searching and determining the invoice heading information, the problem of slow search speed and poor accuracy of invoice heading information under large data volume is solved, and faster and more accurate search results are achieved.

CN119807515APending Publication Date: 2025-04-11AISINO CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411756483.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The huge amount of data slows down the response speed of the invoice issuing system, especially the search process for invoice header information is slow, resulting in poor accuracy of search results.

Method used

By using Elasticsearch to store the keyword-heading information mapping relationship in the search server, a mapping relationship is established based on historical heading information search requests and historical heading information, and a preselected heading information associated with the search request is quickly found, and the target heading information is determined based on preset filter conditions.

Benefits of technology

It improves the speed and accuracy of the search process of invoice header information, and improves the efficiency of invoice issuance of invoices by the invoice server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807515A_ABST
    Figure CN119807515A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a method and device for searching invoice title information and a storage medium, the method is applied to a search server, and the method comprises the following steps: receiving a title information search request sent by a client for target search software, and searching the title information based on the title information search request; searching at least one piece of pre-selected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch, the keyword-header information mapping relationship being determined based on a plurality of historical header information search requests and a plurality of historical header information, and screening the header information based on a preset screening condition, according to the scheme of determining the target title information according to the keyword-title information mapping relation in the storage medium Elasticsearch, the invoice title information can be determined more quickly and accurately according to the scheme that the target title information is determined according to the keyword-title information mapping relation in the storage medium Elasticsearch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology and provides a method, device and storage medium for searching invoice header information. Background Art

[0002] At present, with the development and update of Internet technology, the amount of data is increasing, and users' demand for rapid response and intelligent system is increasing day by day. In response to the demand for issuing a large number of invoices, the invoice header information is stored in the database in the form of sub-libraries and sub-tables according to established rules.

[0003] However, the huge amount of data will affect the response speed of the invoicing system, especially the search process of invoice header information will be slower and the accuracy of the corresponding search results will be poor. Summary of the invention

[0004] The embodiments of the present application provide a method, device and storage medium for searching invoice header information, so as to improve the speed and accuracy of the process of determining the invoice header information.

[0005] The specific technical solutions provided by this application are as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for searching invoice header information, which is applied to a search server and includes:

[0007] receiving a header information search request sent by a client to a target search software, wherein the target search software runs on the client;

[0008] Based on the header information search request, searching for at least one preselected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch, wherein the keyword-header information mapping relationship is determined based on a plurality of historical header information search requests and a plurality of historical header information, and the historical header information search requests and the historical header information correspond one to one;

[0009] Based on the preset screening condition, a target header information matching the header information search request is determined from each pre-selected header information.

[0010] Optionally, a keyword-header information mapping relationship is established in the following manner:

[0011] Using a preset word segmentation method, each historical header information search request is segmented to obtain multiple keywords;

[0012] For a keyword of any historical header information search request, executing: converting the keyword according to a preset writing format to obtain a plurality of converted keywords, wherein the writing format includes Chinese characters, pinyin and / or foreign languages;

[0013] A keyword-header information mapping relationship is established based on the converted multiple keywords of any one of the historical header information search requests and the historical header information corresponding to the historical header information search request.

[0014] Optionally, obtain the historical header information search request and historical header information in the following ways:

[0015] Sending a search acquisition request to the target invoicing software, and searching for at least one invoicing search request corresponding to the search acquisition request in the sub-library and sub-table of the database of the invoicing server, wherein the target invoicing software runs on the invoicing server, and the search acquisition request is determined based on a preset search condition;

[0016] Receiving the invoicing search request and header information corresponding to the invoicing search request sent by the invoicing server;

[0017] The received billing search request is determined as a historical header information search request, and the received header information is determined as historical header information.

[0018] Optionally, based on the header information search request, searching for at least one pre-selected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch includes:

[0019] Using a preset word segmentation method, the header information search request is segmented to obtain multiple search keywords;

[0020] Searching for a keyword associated with at least one search keyword from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch;

[0021] The header information corresponding to the found keyword is determined as pre-selected header information associated with the header information search request.

[0022] Optionally, searching for a keyword associated with at least one search keyword from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch includes:

[0023] Searching from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch whether a keyword having the same writing format as at least one search keyword is included;

[0024] If yes, then determining the header information corresponding to the found keyword in the keyword-header information mapping relationship;

[0025] Otherwise, the writing format of the search keyword is transformed, and a search is performed in the keyword-header information mapping relationship to determine whether a keyword having the same writing format as the transformed search keyword is included.

[0026] Optionally, based on a preset screening condition, a target header information matching the header information search request is determined from each pre-selected header information, including:

[0027] If the preset screening condition is search frequency, the pre-selected header information with the highest usage frequency among the pre-selected header information is determined as the target header information matching the header information search request, wherein the usage frequency represents the number of times the pre-selected header information is determined as the target header information; or

[0028] If the preset filtering condition is the search duration, the pre-selected header information with the shortest usage duration among the pre-selected header information is determined as the target header information matching the header information search request, wherein the usage duration represents the most recent time when the pre-selected header information is determined as the target header information.

[0029] Optionally, the search server includes a plurality of distributed servers. For any distributed server, after receiving a header information search request sent by a client to a target search software and before determining a target header information matching the header information search request from each pre-selected header information, the search server further includes:

[0030] If the client sends a header information search request to the target search software again, the distributed lock is used to lock the distributed server that has received the header information search request.

[0031] In a second aspect, the embodiment of the present application further provides a device for searching invoice header information, comprising:

[0032] A receiving unit, configured to receive a header information search request sent by a client to a target search software, wherein the target search software runs on the client;

[0033] a search unit, configured to search, based on the header information search request, for at least one preselected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch, wherein the keyword-header information mapping relationship is determined based on a plurality of historical header information search requests and a plurality of historical header information, and the historical header information search requests and the historical header information correspond one to one;

[0034] The determination unit is used to determine a target header information matching the header information search request from each pre-selected header information based on a preset screening condition.

[0035] Optionally, a keyword-header information mapping relationship is established in the following manner:

[0036] Using a preset word segmentation method, each historical header information search request is segmented to obtain multiple keywords;

[0037] For a keyword of any historical header information search request, executing: converting the keyword according to a preset writing format to obtain a plurality of converted keywords, wherein the writing format includes Chinese characters, pinyin and / or foreign languages;

[0038] A keyword-header information mapping relationship is established based on the converted multiple keywords of any one of the historical header information search requests and the historical header information corresponding to the historical header information search request.

[0039] Optionally, obtain the historical header information search request and historical header information in the following ways:

[0040] Sending a search acquisition request to the target invoicing software, and searching for at least one invoicing search request corresponding to the search acquisition request in the sub-library and sub-table of the database of the invoicing server, wherein the target invoicing software runs on the invoicing server, and the search acquisition request is determined based on a preset search condition;

[0041] Receiving the invoicing search request and header information corresponding to the invoicing search request sent by the invoicing server;

[0042] The received billing search request is determined as a historical header information search request, and the received header information is determined as historical header information.

[0043] Optionally, based on the header information search request, at least one pre-selected header information associated with the header information search request is searched from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, and the search unit is used to:

[0044] Using a preset word segmentation method, the header information search request is segmented to obtain multiple search keywords;

[0045] Searching for a keyword associated with at least one search keyword from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch;

[0046] The header information corresponding to the found keyword is determined as pre-selected header information associated with the header information search request.

[0047] Optionally, searching for a keyword associated with at least one search keyword from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, the searching unit is used to:

[0048] Searching from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch whether a keyword having the same writing format as at least one search keyword is included;

[0049] If yes, then determining the header information corresponding to the found keyword in the keyword-header information mapping relationship;

[0050] Otherwise, the writing format of the search keyword is transformed, and a search is performed in the keyword-header information mapping relationship to determine whether a keyword having the same writing format as the transformed search keyword is included.

[0051] Optionally, based on a preset screening condition, a target header information matching the header information search request is determined from each pre-selected header information, and the determining unit is used to:

[0052] If the preset screening condition is search frequency, the pre-selected header information with the highest usage frequency among the pre-selected header information is determined as the target header information matching the header information search request, wherein the usage frequency represents the number of times the pre-selected header information is determined as the target header information; or

[0053] If the preset filtering condition is the search duration, the pre-selected header information with the shortest usage duration among the pre-selected header information is determined as the target header information matching the header information search request, wherein the usage duration represents the most recent time when the pre-selected header information is determined as the target header information.

[0054] Optionally, the search server includes a plurality of distributed servers. For any distributed server, after receiving a header information search request sent by a client to a target search software and before determining a target header information matching the header information search request from each pre-selected header information, the search server further includes:

[0055] If the client sends a header information search request to the target search software again, the distributed lock is used to lock the distributed server that has received the header information search request.

[0056] In a third aspect, a search server includes:

[0057] A memory for storing executable instructions;

[0058] A processor is used to read and execute executable instructions stored in a memory to implement any method as described in the first aspect.

[0059] In a fourth aspect, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor, the processor is enabled to execute any method described in the first aspect.

[0060] The beneficial effects of this application are as follows:

[0061] To summarize, in an embodiment of the present application, a method, device and storage medium for searching invoice header information are provided, and the method is applied to a search server, including: receiving a header information search request sent by a client to a target search software, wherein the target search software runs on the client, and based on the header information search request, searching for at least one pre-selected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, wherein the keyword-header information mapping relationship is determined based on multiple historical header information search requests and multiple historical header information, and the historical header information search requests and the historical header information correspond one to one, and based on preset filtering conditions, a target header information matching the header information search request is determined from each pre-selected header information, and the above scheme for determining the target header information based on the keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch makes the process of determining the invoice header information faster and more accurate.

[0062] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0064] Figure 1 A schematic diagram of a system architecture for searching for invoice header information in an embodiment of the present application;

[0065] Figure 2 A schematic diagram of a process for searching for invoice header information in an embodiment of the present application;

[0066] Figure 3 A schematic diagram of a process for establishing a keyword-header information mapping relationship in an embodiment of the present application;

[0067] Figure 4A schematic diagram of the process of obtaining a historical header information search request and historical header information in an embodiment of the present application;

[0068] Figure 5 A schematic diagram of a process of searching for at least one pre-selected header information associated with a header information search request from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch in an embodiment of the present application;

[0069] Figure 6 A schematic diagram of a process of searching for a keyword associated with at least one search keyword from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch in an embodiment of the present application;

[0070] Figure 7 A schematic diagram of a process of determining a target header information matching a header information search request from various pre-selected header information in an embodiment of the present application;

[0071] Figure 8 This is a schematic diagram of the logical architecture of a device for searching invoice header information in an embodiment of the present application;

[0072] Fig. 9 This is a schematic diagram of the physical architecture of a search server in an embodiment of the present application. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0074] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented using sequences other than those illustrated or described herein.

[0075] The preferred implementation modes of the present application are described in detail below with reference to the accompanying drawings.

[0076] See also Figure 1As shown, in the embodiment of the present application, the system includes at least one search server and an invoicing server. The invoicing server runs the target invoicing software. When the client sends an invoicing search request to the invoicing server, the target invoicing software runs, and the header information corresponding to the invoicing search request is determined from the target invoicing software, and then the target invoicing software issues the invoice according to the header information. Usually, a large amount of header information is stored in the target invoicing software. Preferably, each header information is stored in the form of a sub-library and sub-table. However, in the process of issuing invoices, the above-mentioned process of searching for header information will seriously affect the speed of invoice issuance.

[0077] Based on this, in an embodiment of the present application, the invoice header information is searched through a search server, that is, the header information stored in the form of sub-libraries and sub-tables in the above-mentioned invoicing server is sent to the search server, and the search server responds to the header information search request and sends the searched target header information to the invoicing server, thereby eliminating the process of searching for header information by the invoicing server, improving the speed and accuracy of the header information search, and further improving the efficiency of the invoicing server in issuing invoices.

[0078] In an embodiment of the present application, a method for searching for invoice header information is implemented, which is mainly performed on the search server side and is described in detail below.

[0079] See also Figure 2 As shown, in the embodiment of the present application, a specific process of searching for invoice header information is as follows:

[0080] Step 201: receiving a header information search request sent by a client to a target search software, wherein the target search software runs on the client.

[0081] In an embodiment of the present application, there are usually multiple clients connected to the search server, and target search software is running in each client. When any client triggers the target search software to generate a header information search request, the header information search request is sent to the search server. The search server receives the header information search request and parses the header information search request, thereby searching for the header information according to the header information search request.

[0082] Step 202: Based on the header information search request, search for at least one pre-selected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, wherein the keyword-header information mapping relationship is determined based on multiple historical header information search requests and multiple historical header information, and the historical header information search requests and the historical header information correspond one to one.

[0083] It should be noted that, unlike the invoicing server, after receiving the header information stored in the form of separate libraries and tables, the search server stores the header information in the storage medium Elasticsearch. As a storage medium, the architecture of Elasticsearch itself can optimize the storage of header information, and the use of inverted indexes greatly improves the response to search requests.

[0084] In addition, in order to more quickly determine the target header information that matches the header information search request, in the embodiment of the present application, a keyword-header information mapping relationship is established in advance based on multiple historical header information search requests and multiple historical header information. The historical header information search request here is the search request that has been processed by the invoicing server. The historical header information corresponds one-to-one with the historical header information search request, that is, the header information that matches the search request that has been processed by the invoicing server. The above keyword-header information mapping relationship is stored in the storage medium Elasticsearch, which is more conducive to rapid retrieval processing than the header information in the form of separate libraries and tables.

[0085] In the present application, see Figure 3 As shown, the keyword-header information mapping relationship is established in the following way:

[0086] Step 101: Use a preset word segmentation method to segment each historical header information search request to obtain multiple keywords.

[0087] During the implementation process, after receiving a large number of historical header information search requests in the form of separate databases and tables, preset segmentation methods such as jieba segmentation and pinyin segmentation are used to segment each historical header information search request, thereby obtaining multiple keywords.

[0088] For example, when the historical header information search request is "Hebei's local tax value in the third quarter", the keywords obtained after word segmentation are "Hebei", "third quarter", and "local tax value", that is, a historical header information search request is split into multiple keywords.

[0089] In order to establish a keyword-header information mapping relationship, during the implementation process, each historical header information search request needs to be split into keywords.

[0090] Step 102: for a keyword of any historical header information search request, execute: convert the keyword according to a preset writing format to obtain a plurality of converted keywords, wherein the writing format includes Chinese characters, pinyin and / or foreign languages.

[0091] After each historical header information search request is split into multiple keywords, the writing format of each keyword corresponding to each historical header information search request is converted, that is, each keyword is converted according to the preset writing format of Chinese characters, pinyin and / or foreign languages, thereby obtaining multiple converted keywords.

[0092] Still taking the above example to illustrate, when the historical header information search request is "Hebei's local tax value in the third quarter", after the word segmentation is obtained to obtain "Hebei", "third quarter", and "local tax value", "Hebei" is converted into "hebei", "HB", "Hebei", "hebei province", and "third quarter" is converted into "disanjidu", "third jidu", "disan quarter", "thirdquarter", and "local tax value" is converted into "dishuizhi", "dishui value", "local tax zhi", "local tax", and so on.

[0093] Step 103: establishing a keyword-header information mapping relationship based on the converted multiple keywords of any historical header information search request and the historical header information corresponding to the historical header information search request.

[0094] During the implementation process, after converting the historical header information search request into multiple keywords in multiple different writing formats, the historical header information corresponding to the historical header information search request is further determined, and a keyword-header information mapping relationship is established based on the multiple keywords in different writing formats and the above historical header information.

[0095] Still taking the above example to illustrate, when the historical header information search request is "the local tax value in Hebei in the third quarter", the corresponding historical header information is determined to be "the total local tax value in Hebei Province in the third quarter of XXX is YYY", and then one of the mapping relationships in the keyword-header information mapping relationship is established: "Hebei", "third quarter", "local tax value", "hebei", "HB", "Hebei", "hebei", "hebei province", "disanjidu", "third jidu", "disan quarter", "third quarter", "dishuizhi", "dishui value", "local tax zhi", "local tax" - "the total local tax value in Hebei Province in the third quarter of XXX is YYY", that is, when any of the keywords "Hebei", "third quarter", "local tax value", "hebei", "HB", "Hebei", "hebei", "hebeiprovince", "disanjidu", "third jidu", "disan quarter", "third quarter", "dishuizhi", "dishui value", "local tax zhi", "local tax" is searched, the corresponding header information may be "the total local tax value in Hebei Province in the third quarter of XXX is YYY".

[0096] For further information, see Figure 4 As shown, historical header information search request and historical header information are obtained in the following ways:

[0097] Step 001: Send a search acquisition request to the target invoicing software, and search for at least one invoicing search request corresponding to the search acquisition request in the sub-libraries and sub-tables of the database of the invoicing server, wherein the target invoicing software runs on the invoicing server, and the search acquisition request is determined based on preset search conditions.

[0098] Considering the huge amount of header information stored in the database of the invoicing server, and the fact that some header information was issued a long time ago, during the implementation process, the above database can be searched on demand, for example, a search request can be generated according to preset search conditions such as address range and time range.

[0099] The above-mentioned search acquisition request is further sent to the target invoicing software running on the invoicing server, so that the target invoicing software can search in the database of the invoicing server according to the specific conditions of the above-mentioned search acquisition request, that is, first search for the invoicing search request in the header information in the separate forms of the invoicing server's sub-databases. It should be noted that the invoicing search request is stored one-to-one in conjunction with the header information, that is, in the process of issuing invoices, the header information is determined based on the invoicing search request. In this way, after obtaining the invoicing search request in the database of the invoicing server, the corresponding header information can be obtained.

[0100] Step 002: receiving a billing search request and header information corresponding to the billing search request sent by a billing server.

[0101] After the invoicing search request and the header information corresponding to the invoicing search request are determined in the invoicing server, the invoicing server sends the invoicing search request and header information to the search server. It should be noted that the search server will import all the invoicing search requests and header information found, and filter the dirty data during the import process. The filtered data is stored in the Elasticsearch index with field mapping set. In addition, in order to import the latest search and invoicing records of the invoicing server into the search server, a scheduled data import can be set to start, for example, once every 24 hours, so that the latest invoicing search request and header information are sent to the search server, thereby ensuring the integrity of the data.

[0102] Step 003: Determine the received invoicing search request as a historical header information search request, and determine the received header information as historical header information.

[0103] During implementation, the search server determines the received invoicing search request as a historical header information search request, and determines the received header information as historical header information, thereby enabling the search server to establish a keyword-header information mapping relationship based on the historical header information search request and the historical header information.

[0104] After the keyword-header information mapping relationship is established, based on the header information search request, at least one pre-selected header information associated with the header information search request is searched from the keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, referring to Figure 5 As shown, including:

[0105] Step 221: Use a preset word segmentation method to segment the header information search request to obtain multiple search keywords.

[0106] In order to match the keywords in the keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, during the implementation, after receiving the header information search, the header information search request is segmented using a preset segmentation method, thereby splitting the header information search request into multiple search keywords. It should be noted that the segmentation method here is the same as the above-mentioned segmentation method for historical header information search requests, which will not be repeated here.

[0107] Step 2022: Search for keywords associated with at least one search keyword from the keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch.

[0108] After obtaining multiple search keywords, a keyword associated with at least one search keyword is searched from the keyword-header information mapping relationship pre-stored in the above Elasticsearch.

[0109] Still taking the above example to illustrate, when the pre-stored keyword-heading information mapping relationship is: "Hebei", "third quarter", "local tax value", "hebei", "HB", "Hebei", "hebei", "hebei province", "disanjidu", "third jidu", "disan quarter", "third quarter", "dishuizhi", "dishui value", "local tax zhi", "local tax" - "The total local tax value in Hebei Province in the third quarter of XXX is YYY", and the search keywords obtained by word segmentation of the header information search request are "Hebei" and "local tax value", the related keywords can be first found in the above mapping relationship according to the search keywords "Hebei" and "local tax value", which are hebei", "HB", "Hebei", "hebei", "hebei province", "dishuizhi", "dishui value", "local tax zhi", and "local tax".

[0110] Considering that there are various writing formats of keywords, some written formats of search keywords are not necessarily stored in the keyword-header information mapping relationship. Based on this, keywords associated with at least one search keyword are searched from the keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, referring to Figure 6 As shown, including:

[0111] Step 20221: Search from the keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch whether there are keywords with the same writing format as at least one search keyword; if so, execute step 20222; otherwise, execute step 20223.

[0112] During the implementation process, first, according to the current writing format of the search keyword, a search is performed in the keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch to determine whether the keyword with the same writing format as the current one is included.

[0113] Step 20222: Determine the header information corresponding to the found keyword in the keyword-header information mapping relationship.

[0114] In one case, if a keyword having the same writing format as the search keyword is found in the keyword-heading information mapping relationship, the heading information corresponding to the keyword is further searched in the keyword-heading information mapping relationship.

[0115] Step 20223: transform the writing format of the search keyword, and search in the keyword-header information mapping relationship to see whether a keyword with the same writing format as the transformed search keyword is included.

[0116] In another case, if a keyword with the same writing format as the search keyword is not found in the keyword-heading information mapping relationship, the writing format of the search keyword is transformed, and the specific method of transformation is not specifically limited here. Further, the keyword-heading information mapping relationship is searched to see whether it includes a keyword with the same writing format as the transformed search keyword.

[0117] Step 2023: Determine the header information corresponding to the found keyword as pre-selected header information associated with the header information search request.

[0118] During the implementation process, after the header information corresponding to the keyword is found in the keyword-header information mapping relationship based on the keyword, the header information corresponding to the keyword is determined as the pre-selected header information associated with the header information search request. It should be noted that due to the uncertainty of the search keyword, the number of the above-mentioned pre-selected header information is also uncertain.

[0119] Step 203: Based on the preset screening condition, a target header information matching the header information search request is determined from each pre-selected header information.

[0120] In order to improve the accuracy of the final header information, during the implementation process, after determining at least one pre-selected header information, filtering conditions will be pre-set based on the usage frequency of the header information, the time of most recent use, etc., and a target header information will be determined from multiple pre-selected header information based on the filtering conditions.

[0121] For example, based on the preset screening condition, a target header information matching the header information search request is determined from each pre-selected header information. Figure 7 As shown, including:

[0122] Step 2031: if the preset screening condition is search frequency, determining the pre-selected header information with the highest usage frequency among the pre-selected header information as the target header information matching the header information search request, wherein the usage frequency represents the number of times the pre-selected header information is determined as the target header information; or

[0123] In one embodiment, when the preset screening condition is the search frequency, after determining a plurality of pre-selected header information, the usage frequencies of the pre-selected header information are compared respectively. It should be noted that the usage frequency represents the number of times the pre-selected header information is determined as the target header information. After the comparison, the pre-selected header information with the highest usage frequency is determined as the target header information matching the header information search request.

[0124] Step 2032: If the preset filtering condition is the search duration, the pre-selected header information with the shortest usage duration among the pre-selected header information is determined as the target header information matching the header information search request, wherein the usage duration represents the most recent time when the pre-selected header information is determined as the target header information.

[0125] In another embodiment, when the preset filtering condition is the search duration, then after determining a plurality of pre-selected header information, the most recent time when each pre-selected header information is determined as the target header information is compared respectively, and the pre-selected header information with the shortest usage time among the pre-selected header information is determined as the target header information that matches the header information search request.

[0126] In addition, it is necessary to supplement that, in order to improve the search performance of the search server, the search server includes multiple distributed servers. For any distributed server, after receiving the header information search request sent by the client for the target search software, and before determining a target header information matching the header information search request from each pre-selected header information, it also includes:

[0127] If the client sends a header information search request to the target search software again, the distributed lock is used to lock the distributed server that has received the header information search request.

[0128] During the implementation process, when a distributed server is processing a header information search request, if the client re-issues a header information search request for the target search software, the distributed server that is processing the header information search request will use a distributed lock for locking processing, that is, the distributed server blocks the header information search request issued again, thereby improving the speed and accuracy of the search processing.

[0129] It should be additionally explained that the header information search request sent again may be processed by other distributed servers, or may be processed after the distributed server has processed the current header information search request.

[0130] Based on the same inventive concept, refer to Figure 8 As shown, in an embodiment of the present application, a device for searching invoice header information is provided, comprising:

[0131] The receiving unit 801 is used to receive a header information search request sent by a client to a target search software, wherein the target search software runs on the client;

[0132] A searching unit 802 is configured to search, based on the header information search request, at least one preselected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, wherein the keyword-header information mapping relationship is determined based on a plurality of historical header information search requests and a plurality of historical header information, and the historical header information search requests and the historical header information correspond one to one;

[0133] The determining unit 803 is used to determine a target header information matching the header information search request from each pre-selected header information based on a preset screening condition.

[0134] Optionally, a keyword-header information mapping relationship is established in the following manner:

[0135] Using a preset word segmentation method, each historical header information search request is segmented to obtain multiple keywords;

[0136] For a keyword of any historical header information search request, executing: converting the keyword according to a preset writing format to obtain a plurality of converted keywords, wherein the writing format includes Chinese characters, pinyin and / or foreign languages;

[0137] A keyword-header information mapping relationship is established based on the converted multiple keywords of any one of the historical header information search requests and the historical header information corresponding to the historical header information search request.

[0138] Optionally, obtain the historical header information search request and historical header information in the following ways:

[0139] Sending a search acquisition request to the target invoicing software, and searching for at least one invoicing search request corresponding to the search acquisition request in the sub-library and sub-table of the database of the invoicing server, wherein the target invoicing software runs on the invoicing server, and the search acquisition request is determined based on a preset search condition;

[0140] Receiving the invoicing search request and header information corresponding to the invoicing search request sent by the invoicing server;

[0141] The received billing search request is determined as a historical header information search request, and the received header information is determined as historical header information.

[0142] Optionally, based on the header information search request, searching for at least one pre-selected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, the searching unit 802 is configured to:

[0143] Using a preset word segmentation method, the header information search request is segmented to obtain multiple search keywords;

[0144] Searching for a keyword associated with at least one search keyword from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch;

[0145] The header information corresponding to the found keyword is determined as pre-selected header information associated with the header information search request.

[0146] Optionally, searching for a keyword associated with at least one search keyword from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, the searching unit 802 is used to:

[0147] Searching from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch whether a keyword having the same writing format as at least one search keyword is included;

[0148] If yes, then determining the header information corresponding to the found keyword in the keyword-header information mapping relationship;

[0149] Otherwise, the writing format of the search keyword is transformed, and a search is performed in the keyword-header information mapping relationship to determine whether a keyword having the same writing format as the transformed search keyword is included.

[0150] Optionally, based on a preset screening condition, a target header information matching the header information search request is determined from each pre-selected header information, and the determining unit 803 is used to:

[0151] If the preset screening condition is search frequency, the pre-selected header information with the highest usage frequency among the pre-selected header information is determined as the target header information matching the header information search request, wherein the usage frequency represents the number of times the pre-selected header information is determined as the target header information; or

[0152] If the preset filtering condition is the search duration, the pre-selected header information with the shortest usage duration among the pre-selected header information is determined as the target header information matching the header information search request, wherein the usage duration represents the most recent time when the pre-selected header information is determined as the target header information.

[0153] Optionally, the search server includes a plurality of distributed servers. For any distributed server, after receiving a header information search request sent by a client to a target search software and before determining a target header information matching the header information search request from each pre-selected header information, the search server further includes:

[0154] If the client sends a header information search request to the target search software again, the distributed lock is used to lock the distributed server that has received the header information search request.

[0155] Based on the same inventive concept, refer to Fig. 9 As shown, an embodiment of the present application provides a search server, including: a memory 901, used to store executable instructions; a processor 902, used to read and execute the executable instructions stored in the memory, and execute any one of the methods of the first aspect above.

[0156] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor, the processor is enabled to execute the method described in any one of the first aspects above.

[0157] To summarize, in an embodiment of the present application, a method, device and storage medium for searching invoice header information are provided, and the method is applied to a search server, including: receiving a header information search request sent by a client to a target search software, wherein the target search software runs on the client, and based on the header information search request, searching for at least one pre-selected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch, wherein the keyword-header information mapping relationship is determined based on multiple historical header information search requests and multiple historical header information, and the historical header information search requests and the historical header information correspond one to one, and based on preset filtering conditions, a target header information matching the header information search request is determined from each pre-selected header information, and the above scheme for determining the target header information based on the keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch makes the process of determining the invoice header information faster and more accurate.

[0158] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program product systems. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product system implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0159] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program product systems according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0160] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0162] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for searching invoice header information, applied to a search server, characterized in that: The method comprises: receiving a header information search request sent by a client to a target search software, wherein the target search software runs on the client; Based on the header information search request, searching for at least one preselected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch, wherein the keyword-header information mapping relationship is determined based on a plurality of historical header information search requests and a plurality of historical header information, and the historical header information search requests correspond to the historical header information in a one-to-one manner; Based on the preset screening condition, a target header information matching the header information search request is determined from each of the pre-selected header information.

2. The method according to claim 1, characterized in that The keyword-header information mapping relationship is established in the following manner: Using a preset word segmentation method, each of the historical header information search requests is segmented to obtain a plurality of the keywords; For any keyword of the historical header information search request, the keyword is converted according to a preset writing format to obtain a plurality of converted keywords, wherein the writing format includes Chinese characters, pinyin and / or foreign languages; The keyword-header information mapping relationship is established based on the converted multiple keywords of any one of the historical header information search requests and the historical header information corresponding to the historical header information search request.

3. The method according to claim 1, characterized in that The historical header information search request and the historical header information are obtained in the following manner: Sending a search acquisition request to a target invoicing software, and searching for at least one invoicing search request corresponding to the search acquisition request in a sub-library and sub-table of a database of an invoicing server, wherein the target invoicing software runs on the invoicing server, and the search acquisition request is determined based on a preset search condition; receiving the invoicing search request and header information corresponding to the invoicing search request sent by the invoicing server; The received invoicing search request is determined as the historical header information search request, and the received header information is determined as the historical header information.

4. The method according to claim 1, characterized in that The searching, based on the header information search request, from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch for at least one pre-selected header information associated with the header information search request comprises: Using a preset word segmentation method, the header information search request is segmented to obtain a plurality of search keywords; Searching for a keyword associated with at least one of the search keywords from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch; The header information corresponding to the found keyword is determined as the pre-selected header information associated with the header information search request.

5. The method according to claim 4, characterized in that The searching for a keyword associated with at least one of the search keywords from a keyword-header information mapping relationship pre-stored in the storage medium Elasticsearch includes: Searching from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch whether a keyword having the same writing format as at least one of the search keywords is included; If yes, determining the header information corresponding to the keyword found in the keyword-header information mapping relationship; Otherwise, the writing format of the search keyword is transformed, and a search is performed in the keyword-header information mapping relationship to determine whether a keyword having the same writing format as the transformed search keyword is included.

6. The method according to claim 1, characterized in that The step of determining a target header information matching the header information search request from each of the pre-selected header information based on the preset screening condition includes: If the preset screening condition is search frequency, the pre-selected header information with the highest usage frequency among the pre-selected header information is determined as the target header information matching the header information search request, wherein the usage frequency represents the number of times the pre-selected header information is determined as the target header information; or If the preset filtering condition is search duration, the pre-selected header information with the shortest usage duration among the pre-selected header information is determined as the target header information matching the header information search request, wherein the usage duration represents the most recent time when the pre-selected header information is determined as the target header information.

7. The method according to any one of claims 1 to 6, characterized in that: The search server includes a plurality of distributed servers. For any of the distributed servers, after receiving a header information search request sent by a client to a target search software, and before determining a target header information matching the header information search request from each of the pre-selected header information, the search server further includes: If the client sends a header information search request again for the target search software, a distributed lock is used to lock the distributed server that has received the header information search request.

8. A device for searching invoice header information, characterized in that: include: A receiving unit, configured to receive a header information search request sent by a client to a target search software, wherein the target search software runs on the client; a search unit, configured to search, based on the header information search request, for at least one preselected header information associated with the header information search request from a keyword-header information mapping relationship pre-stored in a storage medium Elasticsearch, wherein the keyword-header information mapping relationship is determined based on a plurality of historical header information search requests and a plurality of historical header information, and the historical header information search requests correspond to the historical header information in a one-to-one manner; The determining unit is used to determine a target header information matching the header information search request from each of the pre-selected header information based on a preset screening condition.

9. A search server, characterized in that: include: A memory for storing executable instructions; A processor, configured to read and execute the executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the method according to any one of claims 1 to 7.