Information query method, device, equipment, medium and program product

By combining the BM25 algorithm and the Word2vec model in the information query method, the problems of low efficiency and low accuracy in enterprise name retrieval in the existing technology are solved, and more efficient enterprise name query is achieved.

CN116737880BActive Publication Date: 2025-09-23INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310793356.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-30
Publication Date
2025-09-23
Estimated Expiration
2043-06-30

AI Technical Summary

Technical Problem

Existing company name retrieval methods are inefficient and inaccurate, making it difficult to quickly find the target name among a large number of company names.

Method used

The BM25 algorithm and the Word2vec model are combined to generate a set of matching objects through similarity calculation and correlation analysis, and the query accuracy and efficiency are improved by using model fusion.

Benefits of technology

The accuracy and efficiency of company name searches have been improved, making it possible to find target names among a large number of company names more quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116737880B_ABST
    Figure CN116737880B_ABST
Patent Text Reader

Abstract

The present disclosure provides an information query method, apparatus, device, medium, and program product that can be applied to the fields of data processing and financial technology. The information query method includes: obtaining an information text to be queried; processing the information text to obtain at least one target segmentation corresponding to the information text; performing similarity calculation on the at least one target segmentation according to a first model to obtain M matching objects, wherein the M matching objects constitute a first set; performing correlation analysis between the at least one target segmentation according to a second model to obtain N matching objects, wherein the N matching objects constitute a second set; and performing calculations on the first set and the second set to obtain at least one matching object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of data processing and finance, and more specifically to an information query method, apparatus, device, medium, and program product. Background Art

[0002] Inclusive finance and small and medium-sized enterprise loans are important businesses of financial institutions. When enterprises obtain financing loans, it is necessary to verify the lender's company name, address, telephone number and other information. When financial institutions explore potential financing targets, it is crucial to verify the company name.

[0003] Many companies have long full names. Users usually search based on a few memorized words, and it is difficult to find the target name from a large number of company names.

[0004] In existing company name searches, a simple rule matching plus manual confirmation method is usually used, or only full name accurate matching is supported for search. However, with the continuous increase in company names and changes in company names, the query efficiency is low and the accuracy is not high. Summary of the Invention

[0005] In view of the above problems, the embodiments of the present disclosure provide an information query method, apparatus, device, medium and program product for improving query accuracy and efficiency, which are used to at least partially solve the above technical problems.

[0006] According to a first aspect of an embodiment of the present disclosure, an information query method is provided, comprising: obtaining an information text to be queried; processing the information text to obtain at least one target segmentation corresponding to the information text; performing similarity calculation on the at least one target segmentation according to a first model to obtain M matching objects, and the M matching objects constitute a first set; performing correlation analysis between target segmentations on the at least one target segmentation according to a second model to obtain N matching objects, and the N matching objects constitute a second set; performing calculations on the first set and the second set to obtain at least one matching object.

[0007] According to an embodiment of the present disclosure, wherein, according to the first model, similarity calculation is performed on at least one word segmentation to obtain M matching objects, and the M matching objects constitute a first set including: based on multiple first query documents in the first database, calculating the similarity of at least one target word segmentation and multiple first query documents to obtain at least one group of retrieval values; summing at least one group of retrieval values ​​to obtain multiple query values ​​corresponding to the information text; determining M query values ​​corresponding to the information text to obtain M matching objects.

[0008] According to an embodiment of the present disclosure, determining M query values ​​corresponding to the information text and obtaining M matching objects includes: obtaining a first threshold; and determining M matching objects from multiple query values ​​based on the first threshold, wherein the query values ​​corresponding to the M matching objects are all higher than the first threshold.

[0009] According to an embodiment of the present disclosure, according to the second model, a correlation analysis is performed between target segmentations on at least one target segmentation to obtain N matching objects, and the N matching objects constitute a second set including: based on the information text, generating a to-be-queried word vector of at least one target segmentation corresponding to the information text; based on multiple second query documents in the second database, respectively generating at least one index word vector corresponding to the multiple second query documents; respectively calculating the correlation values ​​between the to-be-queried word vector in the information text and the index word vectors in the multiple second query documents; determining N correlation values ​​corresponding to the information text to obtain N matching objects.

[0010] According to an embodiment of the present disclosure, determining N association values ​​corresponding to the information text and obtaining N matching objects includes: obtaining a second threshold; and determining N matching objects from multiple association values ​​based on the second threshold, wherein the association values ​​corresponding to the N matching objects are all higher than the second threshold.

[0011] According to an embodiment of the present disclosure, calculating the first set and the second set to obtain at least one matching object includes: taking the logarithm of the M query values ​​in the first set to obtain M first intermediate values; determining the complement of the first set based on multiple query values; converting the query value corresponding to the complement of the first set to zero; taking the logarithm of the N associated values ​​in the second set to obtain N second intermediate values; determining the complement of the second set based on multiple associated values; converting the associated value corresponding to the complement of the second set to zero; summing up the associated values ​​corresponding to the query value to obtain at least one matching object; wherein the first query document corresponding to the query value and the second query document corresponding to the associated value have the same target participle.

[0012] According to an embodiment of the present disclosure, the method of summing up the associated values ​​corresponding to the query value to obtain at least one matching object includes: obtaining a first weight value and a second weight value corresponding to the query value and the associated value respectively, wherein the first weight value is used to represent the evaluation information of the target word similarity calculation between the information text and the query document, and the second weight value is used to represent the evaluation information of the correlation analysis between the target word segments between the information text and the query document; determining the product of the query value and the first weight value to obtain a first evaluation value; determining the product of the associated value and the second weight value to obtain a second evaluation value; and adding the first evaluation value and the second evaluation value to obtain a matching object.

[0013] According to an embodiment of the present disclosure, the information text is processed to obtain at least one target segmentation word corresponding to the information text, which includes: based on identification information, dividing multiple first query documents in a first database into at least one first target area set; based on identification information, dividing multiple second query documents in a second database into at least one second target area set; and according to at least one target segmentation word, determining the first target area set and the second target area set corresponding to the information text.

[0014] According to an embodiment of the present disclosure, the identification information is used to represent the region identifications of the first query document and the second query document.

[0015] According to an embodiment of the present disclosure, determining a first target area set and a second target area set corresponding to the information text according to at least one target segmentation word includes:

[0016] In a case where at least one target segmented word in the information text corresponds to identification information of a first target area set, determining a plurality of first query documents in the first target area set as a first database;

[0017] In a case where at least one target segmented word in the information text corresponds to identification information of a second target area set, a plurality of second query documents in the second target area set are determined as a second database.

[0018] According to an embodiment of the present disclosure, processing an information text to obtain at least one word segmentation corresponding to the information text includes: segmenting the information text to obtain at least one initial word segmentation; removing stop words from at least one initial word segmentation to obtain at least one intermediate word segmentation; and abbreviating at least one intermediate word segmentation to obtain at least one target word segmentation.

[0019] According to an embodiment of the present disclosure, the method further includes: sorting at least one matching object to obtain a sorting result of the matching object; and determining top T matching objects according to the sorting result of the matching object.

[0020] According to an embodiment of the present disclosure, the training method of the first model includes: obtaining a plurality of first query documents from a first database; and training a probabilistic retrieval model based on the plurality of first query documents to obtain the first model.

[0021] According to an embodiment of the present disclosure, the training method of the second model includes: collecting historical query text data; training a word embedding model based on the historical query text data to obtain the second model.

[0022] The second aspect of an embodiment of the present disclosure provides an information query device, including: an acquisition module, used to obtain information text to be queried; a first analysis module, used to perform similarity calculation on at least one target participle according to a first model, to obtain M matching objects, and the M matching objects constitute a first set; a second analysis module, used to perform correlation analysis between target participles on at least one target participle according to a second model, to obtain N matching objects, and the N matching objects constitute a second set; and a calculation module, used to calculate the first set and the second set to obtain at least one matching object.

[0023] A third aspect of an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned information query method.

[0024] A fourth aspect of the embodiments of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned information query method.

[0025] A fifth aspect of the embodiments of the present disclosure further provides a computer program product, including a computer program, which implements the above-mentioned information query method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0027] Figure 1 Schematically illustrates an application scenario diagram of the information query method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;

[0028] Figure 2 The following schematically shows a flow chart of an information query method according to an embodiment of the present disclosure;

[0029] Figure 3 A flowchart of a method for processing information text according to an embodiment of the present disclosure is schematically shown;

[0030] Figure 4 A flowchart schematically illustrates a method for determining corresponding target area sets in a first database and a second database according to a target word segmentation according to an embodiment of the present disclosure;

[0031] Figure 5 A flowchart schematically illustrates how to determine the target region set based on the target word segmentation according to an embodiment of the present disclosure; Figure 6Schematically shows a flow chart of a first model training method according to an embodiment of the present disclosure;

[0032] Figure 7 Schematically shows a flow chart of a second model training method according to an embodiment of the present disclosure;

[0033] Figure 8 Schematically shows a flow chart of a method for calculating similarity of target word segments according to a first model according to an embodiment of the present disclosure;

[0034] Figure 9 Schematically shows a flow chart of a method for determining M query values ​​corresponding to information text according to an embodiment of the present disclosure;

[0035] Figure 10 A flowchart of a method for performing correlation analysis between target segmented words based on a second model according to an embodiment of the present disclosure is schematically shown;

[0036] Figure 11 Schematically shows a flow chart of a method for determining N association values ​​corresponding to information text according to an embodiment of the present disclosure;

[0037] Figure 12 A flowchart of a method for calculating matching objects based on a first set and a second set according to an embodiment of the present disclosure is schematically shown;

[0038] Figure 13 A flowchart schematically illustrates a method for obtaining a matching object by summing associated values ​​corresponding to a query value according to an embodiment of the present disclosure;

[0039] Figure 14 A flowchart of a method for sorting and displaying query results according to matching objects according to an embodiment of the present disclosure is schematically shown;

[0040] Figure 15 A schematic diagram of the structure of an information query device according to an embodiment of the present disclosure is shown; and

[0041] Figure 16 A block diagram of an electronic device suitable for implementing the information query method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0042] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0043] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0044] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0045] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.

[0046] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0047] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0048] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.

[0049] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0050] An embodiment of the present disclosure provides an information query method, including: obtaining an information text to be queried; processing the information text to obtain at least one target segmentation corresponding to the information text; performing similarity calculation on the at least one target segmentation according to a first model to obtain M matching objects, and the M matching objects constitute a first set; performing correlation analysis between target segmentations on the at least one target segmentation according to a second model to obtain N matching objects, and the N matching objects constitute a second set; performing calculations on the first set and the second set to obtain at least one matching object.

[0051] Figure 1 The application scenario diagram of the information query method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.

[0052] like Figure 1 As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables.

[0053] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0054] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0055] Server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using terminal devices 101, 102, and 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal device.

[0056] It should be noted that the information query method provided in the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the information query device provided in the embodiments of the present disclosure can generally be set in the server 105. The information query method provided in the embodiments of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the information query device provided in the embodiments of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0057] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0058] The following will be based on Figure 1 The scene described by Figures 2 to 15 The information query method of the disclosed embodiment is described in detail.

[0059] Figure 2 The flowchart of the information query method according to the embodiment of the present disclosure is schematically shown.

[0060] like Figure 2 As shown, the information query method of this embodiment includes operations S210 to S250.

[0061] In operation S210 , the information text to be queried is obtained.

[0062] In some embodiments, for example, a financial institution needs to verify the name of the lender's company when providing a loan. The information text can be a number of words that the financial institution staff enters in the query column of the enterprise information system to search for the company. For example, the information text can be: Beijing Industrial and Commercial Bank of China Co., Ltd.

[0063] It should be noted that the embodiment of the present disclosure does not impose any specific limitation on the form of the information text, and the information text may be a continuous description of text, a company name, a person's name, etc.

[0064] In operation S220, the information text is processed to obtain at least one target word segment corresponding to the information text.

[0065] In some embodiments, word segmentation is an operation that divides text into a sequence of strings (elements of which are generally called tokens or words) according to specific requirements.

[0066] For example, continuing to take the above information text "Beijing Industrial and Commercial Bank of China Co., Ltd." as an example, we can get the target word segmentations of "Beijing", "city", "ICBC", "shares" and "limited company".

[0067] In operation S230, similarity calculation is performed on at least one target word segmentation according to the first model to obtain M matching objects, and the M matching objects form a first set.

[0068] According to an embodiment of the present disclosure, the first model uses the BM25 algorithm (Okapi BM25) model. The BM25 algorithm model is an algorithm used to evaluate the relevance between search terms and documents. It is a probability-based information retrieval model.

[0069] In some embodiments, similarity calculation refers to calculating the relevance score between each segmentation and the query document based on the frequency of each target segmentation in each first query document in the database and the importance of the target segmentation in the database, and performing weighted summation to obtain the relevance score between the information text and the first query document.

[0070] In operation S230, a correlation analysis is performed on at least one target segmented word according to the second model to obtain N matching objects, which form a second set.

[0071] According to an embodiment of the present disclosure, the second model uses the Word2vec (word to vector) model, employing the Skip-gram pattern within the Word2vec model. The Word2vec model is a natural language model trained on a neural network. It vectorizes vocabulary, quantitatively analyzes and mines connections between words, and can be used to represent word-to-word relationships.

[0072] In some embodiments, the correlation analysis between target word segments refers to comparing the degree of connection between at least one target word segment in the information text and the degree of connection between the word vectors of each document in the database.

[0073] In operation S250 , calculations are performed on the first set and the second set to obtain at least one matching object.

[0074] It can be understood that in the embodiment of the present disclosure, the information text to be queried is calculated through the first model and the second model respectively to obtain two different types of calculation results (that is, by calculating the similarity of the target segmentation in the information text and the documents in the database and analyzing the correlation between the target segmentation), and then the two calculation results are fused for analysis to obtain the final matching result. By using model fusion, the matching accuracy and robustness can be greatly improved compared with a single matching algorithm model.

[0075] Figure 3 The flowchart schematically shows a method for processing information text according to an embodiment of the present disclosure;

[0076] As Figure 3 shown, processing the information text in this embodiment to obtain at least one word segment corresponding to the information text includes operations S310 to S330.

[0077] In operation S310, the information text is segmented to obtain at least one initial word segment.

[0078] In some embodiments, word segmentation refers to splitting a sequence of Chinese characters into individual words. Word segmentation is the process of recombining a continuous sequence of characters into a sequence of words according to certain specifications. <00​​​​​​​​​​​​​​​​​​​​​​​ Figure 4 As shown, this embodiment processes the information text to obtain at least one target word segment corresponding to the information text, and includes operations S410 to S430.

[0087] In operation S410 , a plurality of first query documents in a first database are divided into at least one first target area set based on identification information.

[0088] The identification information is used to represent the region identification of the first query document.

[0089] In operation S420 , a plurality of second query documents in the second database are divided into at least one second target area set based on the identification information.

[0090] The identification information is used to represent the region identification of the second query document.

[0091] In some embodiments, the region identification in operations S410 and S420 refers to information that the enterprise name contains a region word.

[0092] In operation S430 , a first target area set and a second target area set corresponding to the information text are determined according to the at least one target word segmentation.

[0093] For example, consider "Chengdu ** Technology Co., Ltd.", "Shanghai ** Technology Co., Ltd.", or "Sichuan ** Technology Co., Ltd.". Chengdu, Shanghai, and Sichuan are all region identifiers. Multiple provincial-level region identifiers (Sichuan Province) can be grouped into one target region set, while multiple city-level region identifiers (Chengdu, Shanghai) can be grouped into one target region set. In other words, company names can be grouped into target region sets based on administrative regions such as provinces, cities, counties, and townships.

[0094] It should be noted that the embodiment of the present disclosure does not impose any specific restrictions on the division of the enterprise name target area set. In addition to being divided according to administrative regions, it can also be divided according to the nature of the enterprise unit (state-owned enterprises, institutions, listed companies or private enterprises).

[0095] Figure 5 The following schematically illustrates a flow chart of how to determine the target region set based on the target word segmentation according to an embodiment of the present disclosure.

[0096] like Figure 5 As shown, in this embodiment, determining the first target area set and the second target area set corresponding to the information text according to at least one target word segmentation includes operations S510 to S560.

[0097] In operation S510 , it is determined whether at least one target word segment in the information text corresponds to identification information of a first target region set.

[0098] In operation S520 , when it is determined that the target word segment corresponds to identification information of a first target region set, the first target region set is determined to be the first database.

[0099] In operation S530 , when it is determined that the target word segment does not correspond to any of the identification information of the plurality of first target region sets, it is determined that all the first query documents in the first database are the first database.

[0100] In operation S540 , it is determined whether at least one target word segment in the information text corresponds to identification information of a second target region set.

[0101] In operation S550 , when it is determined that the target word segment corresponds to identification information of a second target region set, the second target region set is determined to be the second database.

[0102] In operation S560 , when it is determined that the target word segment does not correspond to any of the identification information of the plurality of second target region sets, it is determined that all the second query documents in the second database are the second database.

[0103] It is understandable that when performing calculations, you can choose to query all documents (all documents in the first database or the second database) or partially query documents (a certain first target area set or a second target area set) based on the target word segmentation; the basis for information text calculation can be preprocessed, thereby reducing the amount of data for information text analysis and calculation, and speeding up query efficiency.

[0104] For example, since the target word segment contains "Beijing", the query documents in the first target area set and the second target area set respectively contain the word "Beijing".

[0105] Figure 6 The flowchart of the first model training method according to an embodiment of the present disclosure is schematically shown.

[0106] like Figure 6 As shown, the training method of the first model of this embodiment includes operations S610 to S620.

[0107] In operation S610 , a plurality of first query documents are acquired from a first database.

[0108] In operation S620 , a probabilistic retrieval model is trained based on the plurality of first query documents to obtain a first model.

[0109] In some embodiments, the probabilistic retrieval model is the BM25 algorithm. In actual operation, the probabilistic retrieval model is trained and the model parameters are optimized to obtain a first model. Taking the above-mentioned enterprise name query as an example, the first database is the enterprise name information database, and the first query document is each enterprise name information.

[0110] According to an embodiment of the present disclosure, when acquiring multiple first query documents from the first database, a timed acquisition method may be used to regularly update the first query documents in the first database, thereby ensuring the accuracy of information query in the first database.

[0111] Figure 7 The flowchart of the second model training method according to an embodiment of the present disclosure is schematically shown.

[0112] like Figure 7 As shown, the training method of the second model of this embodiment includes operations S710 to S720.

[0113] In operation S710 , historical query text data is collected.

[0114] In operation S720, a word embedding model is trained based on the historical query text data to obtain a second model.

[0115] In some embodiments, the historical query text data includes query data entered by financial institution staff and customers when searching for company names. A word embedding model can generate a word vector file corresponding to each piece of historical query text data. The word embedding model is a Word2vec model. Training the Word2vec model with the historical query text data can improve the accuracy of the second model calculation.

[0116] According to an embodiment of the present disclosure, when historically querying text data, a timed acquisition method may be used to regularly update the second query document in the second database, thereby ensuring the accuracy of information query in the second database.

[0117] Figure 8 The flowchart of the method for calculating the similarity of target word segments according to the first model according to an embodiment of the present disclosure is schematically shown.

[0118] like Figure 8 As shown, this embodiment performs similarity calculation on at least one word segmentation according to the first model to obtain M matching objects, and the M matching objects form a first set, including operations S810 to S830.

[0119] In operation S810, based on a plurality of first query documents in a first database, similarities between at least one target word segmentation and the plurality of first query documents are calculated to obtain at least one set of search values.

[0120] The first query document is the first query document determined in the above operation S520 or S530.

[0121] In operation S820, at least one set of search values ​​is summed to obtain a plurality of query values ​​corresponding to the information text.

[0122] In operation S830 , M query values ​​corresponding to the information text are determined to obtain M matching objects.

[0123] In some embodiments, the correlation between each target segmentation word in the information text to be queried and the first query document is calculated to obtain a set of search values. The search value represents the product of the frequency value of the target segmentation word, the weight value of the target segmentation word in the first query document, and the document length adjustment parameter of the target segmentation word in the first query document. The search value of each target segmentation word in an information text is then summed to obtain the query value. For example, the search values ​​of the target segmentation words "Beijing" and "ICBC" and all the first query documents containing the target segmentation words are calculated respectively, and then all the corresponding search values ​​of the two are added together to obtain the query value (i.e., the similarity score between the information text and the first query document).

[0124] It should be noted that in the disclosed embodiment, operations S820 and S830 are both performed in the first model. Before the first model is called, an index table corresponding to each first query document is generated. The index table contains the query segmentation terms corresponding to the first query document, thereby facilitating the association of the information text to be queried with the first query document. Simultaneously, relevant calculations are performed on the query segmentation terms in the first query document to obtain preprocessed data. This preprocessed data of the query segmentation terms in the first query document can then be used in subsequent query text calculations, thereby improving computational efficiency.

[0125] Figure 9 The flowchart of the method for determining M query values ​​corresponding to the information text according to an embodiment of the present disclosure is schematically shown.

[0126] like Figure 9 As shown, in this embodiment, determining M query values ​​corresponding to the information text and obtaining M matching objects includes operations S910 to S920.

[0127] In operation S910 , a first threshold is acquired.

[0128] In operation S920 , M matching objects among the multiple query values ​​are determined according to a first threshold, wherein the query values ​​corresponding to the M matching objects are all higher than the first threshold.

[0129] In some embodiments, a first threshold α1 is set, and multiple query values ​​calculated according to the first model are screened, and query values ​​exceeding α1 are confirmed as matching objects, and M matching objects form a first set.

[0130] Figure 10 The flowchart of the method for performing correlation analysis between target word segments according to the second model according to an embodiment of the present disclosure is schematically shown.

[0131] like Figure 10 As shown, this embodiment performs correlation analysis between target segmentations on at least one target segmentation according to the second model to obtain N matching objects, and the N matching objects form a second set. The method includes operations S1010 to S1040.

[0132] In operation S1010, based on the information text, a query word vector of at least one target word segmentation corresponding to the information text is generated.

[0133] In operation S1020, at least one index word vector corresponding to each of the plurality of second query documents is generated based on the plurality of second query documents in the second database.

[0134] The second query document is the second query document determined in the above operation S550 or S560.

[0135] In operation S1030 , correlation values ​​between the query word vectors in the information text and the index word vectors in the plurality of second query documents are calculated respectively.

[0136] In operation S1040 , N associated values ​​corresponding to the information text are determined to obtain N matching objects.

[0137] In some embodiments, during the training phase, the second model generates an index term vector for each second query document in the second database to train the second model. During the application phase, the second model first segments at least one target word in the information text to generate a corresponding query term vector. The model then calculates the degree of correlation between the query term vector in the information text and the index term vector of the second query document to obtain a correlation value.

[0138] For example, the association values ​​of "Beijing" and "ICBC" in the information text and the second query document are calculated and compared.

[0139] Figure 11 The flowchart of the method for determining N associated values ​​corresponding to information text according to an embodiment of the present disclosure is schematically shown.

[0140] like Figure 11 As shown, in this embodiment, determining N associated values ​​corresponding to the information text and obtaining N matching objects includes operations S1110 to S1120.

[0141] In operation S1110 , a second threshold is acquired.

[0142] In operation S1120 , N matching objects among the plurality of correlation values ​​are determined according to the second threshold, wherein the correlation values ​​corresponding to the N matching objects are all higher than the second threshold.

[0143] In some embodiments, a second threshold α2 is set, and multiple association values ​​calculated according to the second model are screened. Association values ​​exceeding α2 are confirmed as matching objects, and N matching objects form a first set.

[0144] It should be noted that both the first threshold and the second threshold can be adjusted according to actual application requirements, and the numbers M and N can be the same or different.

[0145] Figure 12 The flowchart of the method for calculating matching objects according to the first set and the second set according to an embodiment of the present disclosure is schematically shown.

[0146] like Figure 12 As shown, this embodiment calculates the first set and the second set to obtain at least one matching object, including operations S1210 to S1270.

[0147] In operation S1210 , logarithms of M query values ​​in the first set are taken to obtain M first intermediate values.

[0148] In operation S1220 , a complement of the first set is determined based on the plurality of query values.

[0149] In operation S1230 , the query value corresponding to the complement of the first set is converted to zero.

[0150] In some embodiments, since the query values ​​are calculated based on the target word segmentation for multiple first query documents included in a first target area set in the first database, forming a first set; therefore, the complement of the first set is: the query values ​​of the first query documents in the first database (full volume) except those in the certain first target area set are recorded as zero, forming a set; there is no need to calculate the query value based on the first query documents in the first database (full volume) except those in the certain first target area set.

[0151] In operation S1240 , logarithms of the N correlation values ​​in the second set are taken to obtain N second intermediate values.

[0152] In operation S1250 , a complement of the second set is determined based on the plurality of association values.

[0153] In operation S1260 , the associated value corresponding to the complement of the second set is converted to zero.

[0154] In some embodiments, since the association values ​​of multiple second query documents included in a second target area set in the second database are calculated based on the target word segmentation, forming a second set; therefore, the complement of the second set is: the association values ​​of the second query documents in the second database (full volume) except those in the certain second target area set are recorded as zero, forming a set; there is no need to calculate the association values ​​based on the second query documents in the second database (full volume) except those in the certain second target area set.

[0155] In operation S1270, the associated values ​​corresponding to the query value are summed up to obtain at least one matching object.

[0156] The first query document corresponding to the query value and the second query document corresponding to the associated value have the same target segmentation word.

[0157] Figure 13 The flowchart of the method for obtaining a matching object by summing the associated values ​​corresponding to the query value according to an embodiment of the present disclosure is schematically shown.

[0158] like Figure 13 As shown, in this embodiment, the steps of summing up the associated values ​​corresponding to the query values ​​to obtain at least one matching object include operations S1310 to S1340.

[0159] In operation S1310, a first weight value and a second weight value corresponding to the query value and the association value are obtained respectively, wherein the first weight value is used to represent the evaluation information of the target segmentation similarity calculation between the information text and the query document, and the second weight value is used to represent the evaluation information of the correlation analysis between the target segmentations between the information text and the query document.

[0160] The first weight value represents an evaluation weight for the accuracy of the training result according to the first model; and the second weight value represents an evaluation weight for the accuracy of the training result according to the second model.

[0161] It should be noted that the first weight value and the second weight value can be determined based on the accuracy of the model training results. When the training results of the first model are better than those of the second model, the value of the first weight value can be increased; when the training results of the second model are better than those of the first model, the value of the second weight value can be increased, but the sum of the two is 1.

[0162] In operation S1320 , a product of the query value and the first weight value is determined to obtain a first evaluation value.

[0163] In operation S1330, a product of the association value and the second weight value is determined to obtain a second evaluation value.

[0164] In operation S1340 , the first evaluation value and the second evaluation value are added to obtain a matching object.

[0165] According to the embodiment of the present disclosure, the matching object result is recorded as Score according to the above operation. 总 ,

[0166] but

[0167] Among them, Score BM25 is the query value, Score w2v is the correlation value, ω1 is the first weight value, and ω2 is the second weight value. Generally, by default, ω1=ω2=0.5.

[0168] Figure 14 The flowchart of the method for sorting and displaying query results according to matching objects according to an embodiment of the present disclosure is schematically shown.

[0169] like Figure 14 As shown, the information query method of this embodiment also includes operations S1410 to S1420.

[0170] In operation S1410, at least one matching object is sorted to obtain a sorting result of the matching objects.

[0171] In operation S1420 , the top T matching objects are determined according to the ranking result of the matching objects.

[0172] In some embodiments, the result of matching the object is Score 总 , you can sort multiple matching objects in descending order, Score 总 The larger the value is, the closer the result is to the information text. The top T matching objects are displayed in the search query result bar for users to select.

[0173] Based on the above information query method, the present disclosure also provides an information query device. Figure 15 The device is described in detail.

[0174] Figure 15 The structural block diagram of the information query device according to an embodiment of the present disclosure is schematically shown.

[0175] like Figure 15 As shown, the information query device 800 of this embodiment includes an acquisition module 810 , a first analysis module 820 , a second analysis module 830 and a calculation module 840 .

[0176] The acquisition module 810 is used to acquire the information text to be queried. In one embodiment, the acquisition module 810 can be used to perform the operation S210 described above, which will not be repeated here.

[0177] The first analysis module 820 is used to calculate the similarity of at least one target word segmentation according to the first model to obtain M matching objects, and the M matching objects form a first set. In one embodiment, the first analysis module 820 can be used to perform the operation S220 described above, which will not be repeated here.

[0178] The second analysis module 830 is used to perform correlation analysis between the target segmentations on the at least one target segmentation according to the second model to obtain N matching objects, which form the second set. In one embodiment, the second analysis module 830 can be used to perform the operation S230 described above, which will not be repeated here.

[0179] The calculation module 840 is used to calculate the first set and the second set to obtain at least one matching object. In one embodiment, the calculation module 830 can be used to perform the operation S240 described above, which will not be repeated here.

[0180] According to embodiments of the present disclosure, any multiple modules among the acquisition module 810, the first analysis module 820, the second analysis module 830, and the calculation module 840 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present disclosure, at least one of the acquisition module 810, the first analysis module 820, the second analysis module 830, and the calculation module 840 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of these. Alternatively, at least one of the acquisition module 810 , the first analysis module 820 , the second analysis module 830 and the calculation module 840 may be at least partially implemented as a computer program module, which may perform corresponding functions when executed.

[0181] Figure 16 A block diagram of an electronic device suitable for implementing the information query method according to an embodiment of the present disclosure is schematically shown.

[0182] like Figure 16As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.

[0183] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 executes the various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also execute the various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0184] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or a modem. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. Removable media 911, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 910 as needed, so that computer programs read from the removable media can be installed in the storage section 908 as needed.

[0185] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0186] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above, and / or one or more memories other than ROM 902 and RAM 903.

[0187] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code is used to cause the computer system to implement the item recommendation method provided by the embodiments of the present disclosure.

[0188] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the processor 901 executes the computer program. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0189] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0190] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0191] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0192] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0193] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or couplings are intended to fall within the scope of this disclosure.

[0194] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. An information query method, comprising: Get the information text to be queried; Processing the information text to obtain at least one target word segmentation corresponding to the information text; performing similarity calculation on the at least one target segmentation word according to the first model to obtain M matching objects, wherein the M matching objects constitute a first set, including: calculating similarity between the at least one target segmentation word and a plurality of first query documents in a first database to obtain at least one set of search values; summing the at least one set of search values ​​to obtain a plurality of query values ​​corresponding to the information text; and determining the M query values ​​corresponding to the information text to obtain M matching objects; According to the second model, performing correlation analysis between the target segmentations on the at least one target segmentation to obtain N matching objects, wherein the N matching objects constitute a second set, including: generating a query word vector for the at least one target segmentation corresponding to the information text based on the information text; generating at least one index word vector corresponding to the plurality of second query documents based on a plurality of second query documents in a second database; calculating correlation values ​​between the query word vector in the information text and the index word vectors in the plurality of second query documents; and determining N correlation values ​​corresponding to the information text to obtain N matching objects. Calculating the first set and the second set to obtain at least one matching object includes: taking logarithms of the M query values ​​in the first set to obtain M first intermediate values; determining the complement of the first set based on multiple query values; converting the query values ​​corresponding to the complement of the first set to zero; taking logarithms of the N association values ​​in the second set to obtain N second intermediate values; determining the complement of the second set based on multiple association values; converting the association values ​​corresponding to the complement of the second set to zero; and summing the association values ​​corresponding to the query values ​​to obtain at least one matching object; wherein the first query document corresponding to the query value and the second query document corresponding to the association value have the same target participle.

2. The method according to claim 1, wherein Determining the M query values ​​corresponding to the information text to obtain M matching objects includes: Obtaining a first threshold; According to the first threshold, M matching objects among the multiple query values ​​are determined, wherein the query values ​​corresponding to the M matching objects are all higher than the first threshold.

3. The method according to claim 1, wherein Determining N associated values ​​corresponding to the information text to obtain N matching objects includes: Obtaining a second threshold; According to a second threshold, N matching objects among the plurality of association values ​​are determined, wherein the association values ​​corresponding to the N matching objects are all higher than the second threshold.

4. The method according to claim 1, wherein The summing up the associated values ​​corresponding to the query values ​​to obtain at least one matching object includes: Obtaining a first weight value and a second weight value corresponding to the query value and the association value, respectively, wherein the first weight value is used to represent evaluation information of a target segmentation similarity calculation between the information text and the query document, and the second weight value is used to represent evaluation information of a correlation analysis between the target segmentations between the information text and the query document; Determine a product of the query value and the first weight value to obtain a first evaluation value; Determine the product of the association value and the second weight value to obtain a second evaluation value; The first evaluation value and the second evaluation value are added to obtain the matching object.

5. The method according to claim 1, wherein The processing of the information text to obtain at least one target segmentation word corresponding to the information text includes: Based on the identification information, the plurality of first query documents in the first database are divided into at least one first target area set; Based on the identification information, the plurality of second query documents in the second database are divided into at least one second target area set; A first target area set and a second target area set corresponding to the information text are determined according to the at least one target segmented word.

6. The method according to claim 5, wherein: The identification information is used to represent the region identifications of the first query document and the second query document.

7. The method according to claim 5, wherein: The determining, based on the at least one target word segmentation, a first target area set and a second target area set corresponding to the information text includes: In a case where at least one target segmented word in the information text corresponds to identification information of a first target area set, determining a plurality of first query documents in the first target area set as the first database; In a case where at least one target segmented word in the information text corresponds to identification information of a second target area set, a plurality of second query documents in the second target area set are determined as the second database.

8. The method according to claim 1, wherein The processing of the information text to obtain at least one word segment corresponding to the information text includes: Segmenting the information text to obtain at least one initial segmented word; removing stop words from the at least one initial participle to obtain at least one intermediate participle; Perform abbreviation conversion on the at least one intermediate participle to obtain at least one target participle.

9. The method according to claim 1, wherein: The method further includes: Sorting the at least one matching object to obtain a sorting result of the matching objects; According to the ranking result of the matching objects, the top T matching objects are determined.

10. The method according to claim 1, wherein The training method of the first model includes: Obtaining a plurality of first query documents from a first database; The probabilistic retrieval model is trained according to the multiple first query documents to obtain a first model.

11. The method according to claim 1, wherein The training method of the second model includes: Collect historical query text data; The word embedding model is trained based on the historical query text data to obtain a second model.

12. An information query device comprising: An acquisition module is used to obtain the information text to be queried; A first analysis module is configured to process the information text to obtain at least one target segmentation word corresponding to the information text; the first analysis module is further configured to perform similarity calculation on the at least one target segmentation word according to a first model to obtain M matching objects, wherein the M matching objects constitute a first set, including: calculating similarities between the at least one target segmentation word and a plurality of first query documents in a first database to obtain at least one set of search values; summing the at least one set of search values ​​to obtain a plurality of query values ​​corresponding to the information text; and determining the M query values ​​corresponding to the information text to obtain M matching objects; A second analysis module is configured to perform correlation analysis between the at least one target segmentation word according to a second model to obtain N matching objects, wherein the N matching objects constitute a second set, including: generating a query word vector for the at least one target segmentation word corresponding to the information text based on the information text; generating at least one index word vector corresponding to each of the plurality of second query documents based on a plurality of second query documents in a second database; calculating correlation values ​​between the query word vector in the information text and the index word vectors in the plurality of second query documents; determining N correlation values ​​corresponding to the information text to obtain N matching objects; and A calculation module is used to calculate the first set and the second set to obtain at least one matching object, including: taking the logarithm of the M query values ​​in the first set to obtain M first intermediate values; determining the complement of the first set based on multiple query values; converting the query values ​​corresponding to the complement of the first set to zero; taking the logarithm of the N association values ​​in the second set to obtain N second intermediate values; determining the complement of the second set based on multiple association values; converting the association values ​​corresponding to the complement of the second set to zero; and summing the association values ​​corresponding to the query values ​​to obtain at least one matching object; wherein the first query document corresponding to the query value and the second query document corresponding to the association value have the same target participle.

13. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 11.

14. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to perform the method according to any one of claims 1 to 11.

15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Text processing method and device, electronic equipment and storage medium

    CN112667809A

  • Similar document retrieval method and device, electronic equipment and storage medium

    CN114117005A