Information query method and model training method
By using business dictionary metadata and historical query to record recommended information query text in the information management platform, and automatically constructing query statements using the field entity recognition model, the problem of inefficient information query in ToB scenarios is solved, and fast and accurate information is achieved Query.
Patent Information
- Application Number
- CN202410931536.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-12-03
AI Technical Summary
In the ToB scenario, the information queryer needs to configure a large number of conditions to complete the query, resulting in inefficient query and high professional requirements.
After receiving the business information query text on the information management platform, search using preset business dictionary metadata and historical query records, recommend the information query text, and input the target information query text into the field entity recognition model, and automatically build the query statement to meet the requirements. Business information query requirements.
It simplifies the business management interface, reduces the professional requirements of the information query party, improves the query efficiency, and enables the business information query party to quickly obtain the required information.
Smart Images

Figure CN119066211A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of machine learning technology, and in particular to information query methods and model training methods. Background Art
[0002] With the development of Internet technology, online business is becoming more and more intelligent, especially in the information query scenario. By combining large models, users can input any information to obtain corresponding query results. However, in the ToB scenario, due to the high professional requirements for the information query party, a more complex query interface is usually provided to the information query party. By configuring a large number of optional controls in the query interface, the information query party can select the corresponding controls according to their own needs to complete the determination of the query conditions. This process not only requires high professionalism from the information query party, but also consumes a lot of time, resulting in low efficiency of information query. Therefore, an effective solution is urgently needed to solve the above problems. Summary of the invention
[0003] In view of this, an embodiment of this specification provides an information query method. One or more embodiments of this specification also relate to an information query device, a model training method, a model training device, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.
[0004] According to a first aspect of an embodiment of this specification, there is provided an information query method, which is applied to an information management platform, and includes:
[0005] Receive information query text submitted by the business information query party through the business management interface;
[0006] Searching the information query text in the preset business dictionary metadata and the historical query records corresponding to the business information query party, and determining the recommended information query text associated with the information query text according to the search results;
[0007] Determine a target information query text from the information query text and the recommended information query text, and input the target information query text into a field entity recognition model to obtain a target business entity and a target field type of the target business entity;
[0008] A target query statement corresponding to the target information query text is constructed based on the target business entity and the target field type, and target business information is fed back to the business information querying party by executing the target query statement.
[0009] According to a second aspect of an embodiment of this specification, a model training method is provided, which is applied to a model training platform and is used to train a field entity recognition model in the above-mentioned information query method, including:
[0010] Receiving database information submitted by a client for a target database, and determining a standard business entity and a standard field type of the standard business entity according to the database information;
[0011] Constructing an enumerated business entity corresponding to the standard business entity, and constructing a sample pair based on a preset sample query text, the standard business entity, the enumerated business entity and the annotated field type;
[0012] Inputting the target sample query text in the sample pair into the initial field entity recognition model for processing to obtain a predicted business entity and a predicted field type corresponding to the predicted business entity;
[0013] Optimizing the initial field entity recognition model based on the target sample label in the sample pair, the predicted business entity, and the predicted field type until a field entity recognition model that meets the training stop condition is obtained;
[0014] The model parameters corresponding to the field entity recognition model are sent to the client.
[0015] According to a third aspect of the embodiments of this specification, there is provided an information query device, which is applied to an information management platform, and includes:
[0016] A receiving module configured to receive an information query text submitted by a business information query party through a business management interface;
[0017] A retrieval module is configured to search for the information query text in the preset business dictionary metadata and the historical query records corresponding to the business information query party, and determine the recommended information query text associated with the information query text according to the search results;
[0018] A determination module is configured to determine a target information query text from the information query text and the recommended information query text, and input the target information query text into a field entity recognition model to obtain a target business entity and a target field type of the target business entity;
[0019] The construction module is configured to construct a target query statement corresponding to the target information query text based on the target business entity and the target field type, and feed back target business information to the business information query party by executing the target query statement.
[0020] According to a fourth aspect of the embodiments of this specification, a model training device is provided, which is applied to a model training platform and is used to train a field entity recognition model in the above-mentioned information query method, including:
[0021] An information receiving module is configured to receive database information submitted by a client for a target database, and determine a standard business entity and a standard field type of the standard business entity according to the database information;
[0022] A constructing entity module is configured to construct an enumerated business entity corresponding to the standard business entity, and construct a sample pair based on a preset sample query text, the standard business entity, the enumerated business entity and the annotated field type;
[0023] A model processing module is configured to input the target sample query text in the sample pair into the initial field entity recognition model for processing, and obtain a predicted business entity and a predicted field type corresponding to the predicted business entity;
[0024] A model optimization module is configured to optimize the initial field entity recognition model based on the target sample label in the sample pair, the predicted business entity and the predicted field type until a field entity recognition model that meets the training stop condition is obtained;
[0025] The parameter sending module is configured to send the model parameters corresponding to the field entity recognition model to the client.
[0026] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:
[0027] Memory and processor;
[0028] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned information query method or model training method are implemented.
[0029] According to the sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned information query method or model training method are implemented.
[0030] According to the seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions, which implement the steps of the above-mentioned information query method or model training method when executed by a processor.
[0031] The information query method provided in this embodiment, in order to provide a more concise business management interface to the business information query party and support the business information query party to customize the input of the information query text, can first search the information query text in the preset business dictionary metadata and the historical query record corresponding to the business information query party after receiving the information query text submitted by the business information query party through the business management interface, so as to determine the recommended information query text associated with the information query text according to the search result; then determine the target information query text in the information query text and the recommended information query text, so as to achieve the query demand of the business information query party without a large number of condition configurations, and quickly, accurately and automatically complete the determination of the query demand; then, in order to support the business information required by the business information query party to be obtained on the information management platform, the target information query text can be input into the field entity recognition model, and the target business entity and the target field type of the target business entity can be obtained after processing by the field entity recognition model; on this basis, the target query statement corresponding to the target information query text can be constructed based on the target business entity and the target field type, so as to ensure that the target query statement corresponds to the information query demand of the business information query party, and then the target business information can be fed back to the business information query party by executing the target query statement. In the ToB scenario, it can support business information query and complete subsequent business information query by only entering the query text. It has low professional requirements for the business information query party and has higher query efficiency, so that downstream processing can be responded quickly. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a flow chart of an information query method provided by an embodiment of this specification;
[0033] Figure 2 It is a schematic diagram of an interface in an information query method provided by an embodiment of this specification;
[0034] Figure 3 is a schematic diagram of model processing information in an information query method provided by an embodiment of this specification;
[0035] Figure 4 is a flow chart of a model training method provided by an embodiment of this specification;
[0036] Figure 5 is a process flow chart of an information query method provided by an embodiment of this specification;
[0037] Figure 6 It is a structural diagram of an information query device provided by an embodiment of this specification;
[0038] Figure 7It is a structural schematic diagram of a type of training device provided by one embodiment of this specification;
[0039] Figure 8 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0040] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0041] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0042] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0043] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0044] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model. A large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large-scale language model (LLM), a multi-modal pre-training model, etc.
[0045] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.
[0046] First, the terms involved in one or more embodiments of this specification are explained.
[0047] Text2SQL: is a natural language processing (NLP) task that aims to convert query requests described in natural language (such as English or Chinese) into structured query language (SQL) statements for execution in relational databases (such as MySQL, PostgreSQL, SQLite, etc.).
[0048] In this specification, an information query method is provided. This specification also involves an information query device, a model training method, a model training device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0049] The information query method provided in this embodiment, in order to provide a more concise business management interface to the business information query party and support the business information query party to customize the input of the information query text, can first search the information query text in the preset business dictionary metadata and the historical query record corresponding to the business information query party after receiving the information query text submitted by the business information query party through the business management interface, so as to determine the recommended information query text associated with the information query text according to the search result; then determine the target information query text in the information query text and the recommended information query text, so as to achieve the query demand of the business information query party without a large number of condition configurations, and quickly, accurately and automatically complete the determination of the query demand; then, in order to support the business information required by the business information query party to be obtained on the information management platform, the target information query text can be input into the field entity recognition model, and the target business entity and the target field type of the target business entity can be obtained after processing by the field entity recognition model; on this basis, the target query statement corresponding to the target information query text can be constructed based on the target business entity and the target field type, so as to ensure that the target query statement corresponds to the information query demand of the business information query party, and then the target business information can be fed back to the business information query party by executing the target query statement. In the ToB scenario, it can support business information query and complete subsequent business information query by only entering the query text. It has low professional requirements for the business information query party and has higher query efficiency, so that downstream processing can be responded quickly.
[0050] See also Figure 1 , Figure 1 A flowchart of an information query method provided according to an embodiment of the present specification is shown, which is applied to an information management platform and specifically includes the following steps.
[0051] Step S102: receiving an information query text submitted by a service information querying party through a service management interface.
[0052] The information query method provided in this embodiment is applied to an information management platform, wherein the information management platform is used to manage information related to the target business, and supports the business information inquirer to submit a query text through the business management interface provided by the platform, so that the information management platform processes the information query text and generates a query statement for the related information query text. By executing the query statement, the target business information can be obtained and then fed back to the business information inquirer; wherein, the target business can be any business involving information management needs, such as logistics information management business, resource scheduling management business, transaction information management business, etc., and this embodiment does not make any limitation here.
[0053] Correspondingly, the business information query party specifically refers to the party that has the target business information query demand, and the business information query party is a user that maintains the target business. For example, in the logistics information management business, the business information query party may be an order information supervision user. For example, in the resource scheduling management business, the business information query party may be a resource allocation user, etc.; it can be understood that the business information query party has a professional business information query demand. Correspondingly, the business management interface specifically refers to the information query interface provided by the information management platform to the business information query party. By inputting the information query text through this interface, the business information query party does not need to configure the conditions in more dimensions to obtain the target business information, and the operation is simpler. Correspondingly, the information query text specifically refers to the query text submitted by the business information query party through the business management interface. The query text can be the content of any text structure entered by the business information query party. After that, by semantically understanding the query text, the corresponding query statement can be accurately generated for use.
[0054] Based on this, in order to provide a more concise business management interface to the business information query party and support the business information query party to customize the input of the information query text, after receiving the information query text submitted by the business information query party through the business management interface, the information query text can be first searched in the preset business dictionary metadata and the historical query record corresponding to the business information query party, so as to determine the recommended information query text associated with the information query text according to the search results; thereafter, the target information query text is determined in the information query text and the recommended information query text, so that when facing the query needs of the business information query party, it is not necessary for the business information query party to perform a large amount of condition configuration, and the query needs can be determined quickly, accurately and automatically; thereafter, in order to support the business information required by the business information query party on the information management platform, the target information query text can be input into the field entity recognition model, and the target business entity and the target field type of the target business entity are obtained after processing by the field entity recognition model; on this basis, the target query statement corresponding to the target information query text can be constructed based on the target business entity and the target field type, ensuring that the target query statement corresponds to the information query needs of the business information query party, and then the target business information can be fed back to the business information query party by executing the target query statement.
[0055] In actual applications, the business management interface may only provide a text input box and / or a selection control corresponding to the query requirement type for the business information query party, such as Figure 2 The interface shown in the figure does not need to set more fine-grained selection controls, such as time selection controls, order number selection controls, etc., thereby providing a more concise and clear business management interface to the business information query party, which can make the operation of the business information query party more convenient and reduce the professional requirements for the business information query party.
[0056] Step S104, searching the information query text in the preset business dictionary metadata and the historical query records corresponding to the business information query party, and determining the recommended information query text associated with the information query text according to the search result.
[0057] Specifically, after obtaining the information query text submitted by the business information inquirer as mentioned above, the information management platform may provide recommended query information to the business information inquirer before the business information query in order to provide accurate query information to the business information inquirer in response to the information query text. In this process, it is mainly considered that the information query text entered by the business information inquirer may not be in a standard format. If it is directly used for subsequent statement construction, it may cause deviations in the query results. Therefore, in order to improve the matching of the constructed query statement with the query requirements of the business information inquirer, after obtaining the information query text, the information query text can be semantically analyzed to recommend recommended information query texts that are related to it and have a more standard structure, thereby facilitating the subsequent construction of more accurate query statements.
[0058] Based on this, when recommending other information query texts to the business information query party, in order to improve the accuracy of the recommendation and make it easier for the business information query party to conduct subsequent business retrieval, the business dictionary metadata can be pre-built, and the corresponding historical query records of the business information query party can be recorded. When the business information query party submits a new information query text, the information query text can be searched in the preset business dictionary metadata and the historical query records corresponding to the business information query party, so that according to the text retrieval results, the information query text with higher semantic similarity to the information query text can be recalled in the business dictionary metadata and the historical query records, and it is used as the recommended information query text associated with the information query text, and recommended to the business information query party for selection, which can ensure that a more accurate query statement is constructed and used later.
[0059] Among them, the preset business dictionary metadata specifically refers to a dictionary pre-built for the query text that may be used in the current scenario, which is used in the text retrieval stage. After the business information query party enters any information query text, the pre-built query text can be matched as a recommended text for the business information query party to choose. Correspondingly, the historical query record specifically refers to the query information recorded by the business information query party before this information query; in actual applications, the historical query record can be recorded in a database preset by the business. Since in some business scenarios, the business information query party may need to perform the same information query every set time, such as in the logistics scenario, the order management party needs to query the order volume every 12 hours. At this time, if the historical query record is directly recalled and the recommended information text is determined, the information query speed of the business information query party can be effectively improved. Correspondingly, the recommended information query text specifically refers to the information query text recalled after text retrieval for the information query text in the business dictionary metadata and historical query records. After recommending it to the business information query party, it can be selected by the business information query party according to needs.
[0060] Furthermore, in order to improve the recall accuracy and facilitate the selection of information query text by the business information query party, a text search operation can be implemented in conjunction with a search engine in order to improve the recall accuracy and facilitate the selection of information query text by the business information query party. In this embodiment, the specific implementation method is as follows:
[0061] The information query text is segmented to obtain a plurality of word units, and the plurality of word units and the information query text are input into a search engine; the information query text is recalled by the search engine in preset business dictionary metadata and historical query records corresponding to the business information query party to obtain a first candidate text associated with the business dictionary metadata and a second candidate text associated with the historical query records; a first text sequence is constructed according to the first candidate text, and a second text sequence is constructed according to the second candidate text; a first target candidate text is selected in the first text sequence, and a second target candidate text is selected in the second text sequence; the first target candidate text and the second target candidate text are sorted, and a recommended information query text associated with the information query text is selected according to the sorting result; wherein the preset business dictionary metadata is fully indexed according to a preset time period, and the historical query records are incrementally indexed according to the query records corresponding to the business information query party.
[0062] Specifically, the word unit specifically refers to the word unit obtained after word segmentation of the information query text. Accordingly, the retrieval engine specifically refers to a neural network model that supports a multi-way recall (vocabulary metadata and historical query records) mode, whose input is the word unit and the information query text to which the word unit belongs, and the output is the candidate text recalled for the information query text. Accordingly, the first candidate text specifically refers to at least one candidate text matching the information query text obtained after recall processing is performed on the information query text in the dictionary metadata. Accordingly, the second candidate text specifically refers to at least one candidate text matching the information query text obtained after recall processing is performed on the information query text in the historical query record. Correspondingly, the first text sequence and the second text sequence specifically refer to the text sequence obtained after sorting the first candidate text and the second candidate text according to the priority information, wherein the priority information can be calculated according to comprehensive dimensions such as similarity, query time, and query frequency, and this embodiment does not make any limitation here.
[0063] Based on this, after obtaining the information query text, the information query text can be first segmented to obtain multiple word units, and then the multiple word units and the information query text can be input into the search engine; the information query text can be recalled separately in the preset business dictionary metadata and the historical query records corresponding to the business information query party through the search engine, so that the first candidate text associated with the business dictionary metadata and the second candidate text associated with the historical query record can be obtained according to the recall result; on this basis, the first candidate text and the second candidate text can be sorted according to content similarity, query frequency and / or query time, etc., and the first text sequence can be constructed according to the first candidate text, and the second text sequence can be constructed according to the second candidate text. Since the number of recommended information query texts is limited, in order to provide texts that more accurately match the query requirements of the business information query party, a set number of target candidate texts can be selected in the sequence in order from large to small and then refined. Therefore, the first target candidate text can be selected in the first text sequence, and the second target candidate text can be selected in the second text sequence; thereafter, the first target candidate text and the second target candidate text can be sorted, and after the sorting is completed, the target candidate texts will be arranged in order of similarity to the information query text, and thereafter, the TOP K target candidate texts can be selected as recommended information query texts according to the sorting results, where K can be set according to actual needs, such as 5, etc., and this embodiment does not make any limitation here.
[0064] In addition, in order to improve the recall efficiency and quickly provide recommended information query text to the business information query party, a full index can be built for the business dictionary metadata according to a preset time period, and an incremental index can be built for the historical query records according to the query records corresponding to the business information query party, so that the constructed index information can be directly reused in the text recall stage, thereby improving the recall speed.
[0065] For example, user A in the logistics information management scenario Figure 2 The management interface shown in the figure submits the query text {orders that have been shipped from H city in the past three days}; at this time, in order to improve the accuracy of subsequent reading of order information from the database, the queryable related text can be recommended to the user first. At this time, the query text {orders that have been shipped from H city in the past three days} can be segmented first, and after obtaining n word units, the n units and the query text are input into the query search engine together. The query search engine performs a rough recall of the dictionary metadata and the user's corresponding historical query records. According to the rough recall results, a related documents that are associated with the dictionary metadata and match the user input content will be obtained, and b related documents that are associated with the historical query records and match the user input content will also be obtained.
[0066] Further, the similarity between a related documents and the query text is calculated according to content similarity, query time, query frequency, etc., and the query documents are sorted according to the calculation results to obtain the a document sequence; similarly, the similarity between b related documents and the query text is calculated according to content similarity, query time, query frequency, etc., and the query documents are sorted according to the calculation results to obtain the b document sequence; the documents in the sequence are arranged in descending order according to the similarity. At this time, the first m documents can be selected from the a document sequence and the b document sequence according to the arrangement order, and m candidate documents associated with the a document sequence and m candidate documents associated with the b document sequence will be obtained. On this basis, the above subsequent documents are finely sorted, and the Top3 are selected as recommended query texts for users to choose. Among them, the recommended query texts are {H city outbound orders in the past three days}, {H city unoutbound orders in the past three days}, and {national outbound orders in the past three days} for subsequent use.
[0067] In summary, by adopting a multi-channel recall method to determine the recommended information query text, the accuracy of text determination can be improved. On this basis, it can better match the query needs of the business information query party, thereby improving the efficiency and accuracy of subsequent business information queries.
[0068] Step S106, determining a target information query text from the information query text and the recommended information query text, and inputting the target information query text into a field entity recognition model to obtain a target business entity and a target field type of the target business entity.
[0069] Specifically, after obtaining the information query text and the recommended information query text, the target information query text that matches the user's current query needs can be determined in the information query text and the recommended information query text. On this basis, in order to be able to construct a query statement that supports querying relevant information in the database for the target information query text, the target information query text can be first input into the field entity recognition model for processing, so that the target business entity can be extracted from the target information query text through the field entity recognition model, and the target field type corresponding to the target business entity can be determined. On this basis, the query statement is constructed, and the relevant information can be quickly and accurately read from the database for use by the business information query party.
[0070] Among them, the target information query text specifically refers to the query text selected from the information query text and the recommended information query text that matches the query requirements of the business information query party. Correspondingly, the field entity recognition model specifically refers to a neural network model that can process the query text, extract the business entities in the query text, and determine the field type corresponding to the business entity. The input of the model is the query text, and the output is the entity and its corresponding field type. Combining the field type and the business entity, a query statement that matches the target information query text can be constructed to realize the query of information-related information in the database. Correspondingly, the target business entity specifically refers to the core entity word that represents the query semantic information in the target information query text. Correspondingly, the target field type specifically refers to the field type required when constructing the query statement corresponding to the target business entity, which is used to ensure that the constructed query statement is more accurate and executable.
[0071] Further, when selecting the target information query text, the business information query party may select the recommended information query text or may not select it. In this embodiment, the specific implementation is as follows:
[0072] The recommended information query text is displayed to the business information inquirer through the business management interface; upon receiving a confirmation instruction submitted by the business information inquirer, the information query text is used as a target information query text; upon receiving a selection instruction submitted by the business information inquirer for the recommended information query text, the target information query text is selected from the recommended information query text according to the selection instruction.
[0073] Specifically, the confirmation instruction specifically refers to the instruction submitted by the business information query party when selecting the information query text, and the instruction can be triggered by clicking the enter key of the keyboard, etc. Correspondingly, the selection instruction specifically refers to the instruction submitted by the business information query party when selecting the information query text from the recommended information query text, and the instruction can be triggered by moving the cursor position.
[0074] Based on this, after obtaining the information query text and the recommended information query text, the recommended information query text can be displayed to the business information query party through the business management interface; when receiving the confirmation instruction submitted by the business information query party, it means that the business information query party does not need to use other information query texts at this time, so the information query text can be directly used as the target information query text; when receiving the selection instruction submitted by the business information query party for the recommended information query text, it means that the recommended information query text contains information query text that matches the user's query needs, and the target information query text can be selected from the recommended information query text according to the selection instruction at this time, so as to perform subsequent statement mapping processing.
[0075] Furthermore, when the field entity recognition model determines the entity and the field type of the entity according to the target business information query text, different units in the model will perform different processing. In this embodiment, the specific implementation is as follows:
[0076] The target information query text is input into a field entity recognition model, and the target information query text is processed by an entity extraction unit in the field entity recognition model to obtain an initial business entity; when the initial business entity is a time entity type or an address entity type, the initial business entity is mapped to a target business entity by an entity mapping unit in the field entity recognition model; or, when the initial business entity is a field entity type, the initial business entity is matched in a field entity library by a fuzzy matching unit in the field entity recognition model, and a target business entity is determined according to the matching result; the target business entity is processed by a field type prediction unit in the field entity recognition model to obtain a target field type corresponding to the target business entity.
[0077] Specifically, the entity extraction unit specifically refers to a neural network layer with entity extraction capabilities. Accordingly, the initial business entity specifically refers to the business entity extracted from the target information query text by the entity extraction unit; accordingly, the entity mapping unit specifically refers to a neural network layer that can map non-standardized business entities to standardized business entities. Accordingly, the fuzzy matching unit specifically refers to a neural network layer that can perform fuzzy matching on the initial business entity and the standard business entity, and the user determines the target business entity based on the matching result; it can be understood that the entity mapping unit is used to correct the initial business entity to the standard business entity, and the fuzzy matching unit user searches for the standard business entity that matches the initial business entity. Correspondingly, the field type prediction unit specifically refers to a neural network layer that predicts the field type for each target business entity.
[0078] Based on this, after determining the target information query text, the target information query text can be first input into the field entity recognition model. At this time, the entity extraction unit in the field entity recognition model can be used to extract entities from the target information query text, and the initial business entity contained in the target information query text will be obtained.
[0079] Furthermore, considering that the target information query text may contain many business entities, and different business entities need to play different roles in the subsequent construction of statements, different initial business entities need to be processed differently to obtain standard business entities (target business entities). Therefore, for initial business entities of time entity type or address entity type, the entity mapping unit in the field entity recognition model can be used to map the initial business entity to the target business entity; the initial business entity can be standardized to the target business entity. For initial business entities of field entity type, the fuzzy matching unit in the field entity recognition model can be used to match the initial business entity in the field entity library, and the pre-stored business entity matching the initial business entity can be selected from the field entity library as the target business entity; finally, the target business entity can be processed by the field type prediction unit in the field entity recognition model, so that the target field type corresponding to each target business entity can be obtained, so as to use it in the subsequent construction of query statements.
[0080] In summary, by configuring different neural network layers in the field entity recognition model to process the target information query text, the target business entity can be accurately located and the field type of the target business entity can be determined, so as to support the subsequent combination of field types and entities to construct statements that better match the query needs of the business information query party.
[0081] On this basis, in order to improve the recognition accuracy of field business entities, so as to facilitate the subsequent output of business entities and field types with higher accuracy, fuzzy matching can be used. In this embodiment, the specific implementation method is as follows:
[0082] The fuzzy matching unit in the field entity recognition model is used to query multiple candidate business entities matching the initial business entity in the field entity library; a first entity feature corresponding to the initial business entity and second entity features corresponding to the multiple candidate business entities are determined; a feature similarity between the first entity feature and the second entity feature is calculated, and a target business entity is selected from the multiple candidate business entities according to the feature similarity.
[0083] Specifically, the field entity library specifically refers to an entity library that pre-establishes the correspondence between standard business entities and non-standard business entities and records the relationship. After receiving the initial business entity, a candidate business entity that matches the initial business entity can be selected from the library. Correspondingly, the first entity feature specifically refers to the vector expression corresponding to the initial business entity. The second entity feature specifically refers to the entity feature of the corresponding candidate business entity. Correspondingly, the feature similarity specifically refers to a numerical value that represents the degree of similarity between the target business entity and each candidate business entity. The higher the feature similarity, the higher the degree of similarity between the two.
[0084] Based on this, when the fuzzy matching unit matches the target business entity for the initial business entity, in order to ensure that the business entity selected is the business entity that matches the actual query requirements of the business information query party, the fuzzy matching unit in the field entity recognition model can be used to query multiple candidate business entities that match the initial business entity in the field entity library; in this process, a set number of business entities with a high degree of relevance to the initial business entity can be selected as candidate business entities by rough recall. After that, the first entity feature corresponding to the initial business entity and the second entity features corresponding to the multiple candidate business entities can be determined; by calculating the feature similarity between the first entity feature and each second entity feature, the similarity between the initial business entity and each candidate business entity can be determined, and then they are sorted in descending order, and the candidate business entity ranked first is selected as the target business entity for the initial business entity to match. In practical applications, the rough recall in this process can determine the candidate business entities by calculating the BM25 value through the BM25 algorithm, and the number of selections can be set according to actual needs. The fine ranking stage can be implemented by calculating the similarity of semantic vectors using the BERT model. In specific implementation, other methods can also be selected to complete the rough recall (calculating the similarity of embedded vectors) and fine ranking. This embodiment does not make any limitations here.
[0085] Using the above example, after obtaining the query text {orders shipped from H city in the past three days} and the recommended query texts {orders shipped from H city in the past three days}, {orders not shipped from H city in the past three days}, and {orders shipped nationwide in the past three days}, the recommended query texts can be displayed to the user through the recommendation box. At this time, according to the instruction submitted by user A, the target query text of user A is determined to be {orders shipped from H city in the past three days}.
[0086] Furthermore, the target query text can be input into Figure 3 The BERT model shown in the figure is used to process the target query text. At this time, the time entity {recent three days}, the address entity {H city} and the field entity {already shipped} are extracted from the target query text. At this time, the time entity and the address entity can be standardized first, and the time entity {recent three days} can be processed into {2023-02-2600:00:00, 2023-03-01 09:14:00}, and the address entity {H city} can be processed into {prov:**provincecity:**city}. When processing the field entity {already shipped}, the field entity can be first segmented, and then a rough recall is performed in the field entity library through the BM25 algorithm according to the segmentation result, and the recall result is {already shipped, partially shipped, out of stock shipped, not shipped, intercepted...}. At this time, by calculating the similarity between the field entity {already shipped} and each field entity in the recall result, it is determined that the similarity between {already shipped} and {already shipped} is 83.8%; the similarity between {already shipped} and {partially shipped} is 3.4%; the similarity between {already shipped} and {out of stock shipped} is 2.9%; the similarity between {already shipped} and {not shipped} is 2.1%; the similarity between {already shipped} and {not shipped} is 1.3%; then the recall results are refined according to the similarity, and finally {already shipped} is used as the standard business entity of {already shipped} according to the refined ranking result. Subsequently, you can combine the corresponding query text {2023-02-26 00:00:00, 2023-03-01 09:14:00}, {prov: **province city: **city}, and {has been shipped} to construct an SQL statement to query relevant information.
[0087] In summary, by using fuzzy matching to determine the target business entity, we can ensure that the target business entity fully reflects the core idea of the target information query text, and construct the target query statement based on this, which can ensure that accurate business information is fed back to the business information query party.
[0088] In the specific implementation, in order to obtain more accurate business entities and entity types, the model training can be completed in combination with real information. In this embodiment, the specific implementation method is as follows:
[0089] Obtain database information of a target database, determine a standard business entity and a standard field type corresponding to the standard business entity according to the database information; perform entity expansion for the standard business entity to obtain an enumerated business entity; select a sample query text from a sample set, and construct a sample pair based on the sample query text, the standard business entity, the enumerated business entity, and the standard field type, wherein the sample pair includes a target sample query text and a target sample label; input the target sample query text into an initial field entity recognition model for processing to obtain a predicted business entity and a predicted field type corresponding to the predicted business entity; optimize the initial field entity recognition model based on the target sample label, the predicted business entity, and the predicted field type until a field entity recognition model that meets a training stop condition is obtained.
[0090] Specifically, database information refers to the schema information of the database table, which includes the field name of the database table and the field type to which it belongs. Different field types perform different processing logic. The string type needs to extract the entity in the text, the time type needs to return the extracted entity to the corresponding standardized time, and the number type needs to return the extracted entity to the corresponding Arabic numeral. Correspondingly, the standard business entity specifically refers to the business entity used for the corresponding standard. Correspondingly, the enumeration business entity specifically refers to the business entity obtained after enumeration of the standard business entity, and the enumeration business entities associated with the standard business entity have the same meaning. For example, the enumeration value stored in the "order status" field can be "not shipped". In the application stage, the user can enter "orders that have not been shipped", and not shipped does not appear in the enumeration value of the "order status" field. Then, through the fuzzy matching algorithm, "not shipped" is mapped to "not shipped" for subsequent statement construction.
[0091] Based on this, during the model training process, the database information of the target database can be obtained first, and the standard business entities and the standard field types corresponding to the standard business entities can be determined according to the database information; at this time, the entity capacity of the standard business entities can be expanded to obtain enumerated business entities; on this basis, the sample query text can be selected in the sample set first, and the sample pairs can be constructed based on the sample query text, standard business entities, enumerated business entities and standard field types, and the sample pairs include target sample query texts and target sample labels; thereafter, the target sample query texts can be input into the initial field entity recognition model for processing, so as to obtain the predicted business entities and the predicted field types corresponding to the predicted business entities according to the processing results; on this basis, the initial field entity recognition model can be optimized based on the target sample labels, predicted business entities and predicted field types; if the optimized results do not meet the training stop conditions, new samples can be selected to continue training until a field entity recognition model that meets the training stop conditions is obtained.
[0092] In other words, during the model training phase, the field entity recognition model is actually prompted to learn to extract entities, match the extracted entities with enumerated business entities, and thus map them to standard business entities, and then determine the ability to annotate field types, so that the target business entities can be obtained quickly and accurately in the application phase, thereby constructing query statements for use.
[0093] Step S108: construct a target query statement corresponding to the target information query text based on the target business entity and the target field type, and feed back target business information to the business information querying party by executing the target query statement.
[0094] Specifically, after obtaining the target business entity and its corresponding target field type as mentioned above, a target query statement corresponding to the target information query text can be constructed based on the target business entity and the target field type. On this basis, the target business information can be read in the database corresponding to the target business by executing the target query statement, and then fed back to the business information query party.
[0095] Continuing with the above example, after obtaining {2023-02-26 00:00:00, 2023-03-01 09:14:00}, {prov: **province city: **city}, and {shipped} corresponding to {orders shipped from city H in the past three days}, you can build an SQL statement based on the above information. Then, by executing the SQL statement in the target database, you can get all the order information that has been shipped from city H in the past three days. At this time, you can cache all the order information in the interface and display it to user A.
[0096] The information query method provided in this embodiment, in order to provide a more concise business management interface to the business information query party and support the business information query party to customize the input of the information query text, can first search the information query text in the preset business dictionary metadata and the historical query record corresponding to the business information query party after receiving the information query text submitted by the business information query party through the business management interface, so as to determine the recommended information query text associated with the information query text according to the search result; then determine the target information query text in the information query text and the recommended information query text, so as to achieve the query demand of the business information query party without a large number of condition configurations, and quickly, accurately and automatically complete the determination of the query demand; then, in order to support the business information required by the business information query party to be obtained on the information management platform, the target information query text can be input into the field entity recognition model, and the target business entity and the target field type of the target business entity can be obtained after processing by the field entity recognition model; on this basis, the target query statement corresponding to the target information query text can be constructed based on the target business entity and the target field type, so as to ensure that the target query statement corresponds to the information query demand of the business information query party, and then the target business information can be fed back to the business information query party by executing the target query statement. In the ToB scenario, it can support business information query and complete subsequent business information query by only entering the query text. It has low professional requirements for the business information query party and has higher query efficiency, so that downstream processing can be responded quickly.
[0097] See also Figure 4 , Figure 4 A flow chart of a model training method provided according to an embodiment of the present specification is shown, which is applied to a model training platform and is used to train the field entity recognition model in the above-mentioned information query method, and specifically includes the following steps.
[0098] Step S402, receiving database information submitted by the client for the target database, and determining a standard business entity and a standard field type of the standard business entity according to the database information;
[0099] Step S404, constructing an enumerated business entity corresponding to the standard business entity, and constructing a sample pair based on a preset sample query text, the standard business entity, the enumerated business entity and the annotated field type;
[0100] Step S406, inputting the target sample query text in the sample pair into the initial field entity recognition model for processing, and obtaining a predicted business entity and a predicted field type corresponding to the predicted business entity;
[0101] Step S408, optimizing the initial field entity recognition model based on the target sample label in the sample pair, the predicted business entity and the predicted field type, until a field entity recognition model that meets the training stop condition is obtained;
[0102] Step S410: sending the model parameters corresponding to the field entity recognition model to the client.
[0103] The model training method provided in this embodiment is applied to a model training platform, which provides the client with the computing resources and computing logic required for model training, supports the client to submit the corresponding information, and then automatically completes the model training, and then feeds back the trained model parameters to the client for use. Among them, the specific description of model training can refer to the same or corresponding description content in the above embodiment, and this embodiment will not be repeated here.
[0104] The following combination Figure 5 , taking the application of the information query method provided in this specification in the logistics information query scenario as an example, the information query method is further explained. Among them, Figure 5 A processing flow chart of an information query method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0105] Step S502: receiving an information query text submitted by a service information querying party through a service management interface.
[0106] Step S504, segmenting the information query text to obtain a plurality of word units, and inputting the plurality of word units and the information query text into a search engine.
[0107] Step S506, through the retrieval engine, the information query text is recalled in the preset business dictionary metadata and the historical query records corresponding to the business information query party, and the first candidate text associated with the business dictionary metadata and the second candidate text associated with the historical query records are obtained; wherein the business dictionary metadata is fully indexed according to the preset time period, and the historical query records are incrementally indexed according to the query records corresponding to the business information query party.
[0108] Step S508: construct a first text sequence according to the first candidate text, and construct a second text sequence according to the second candidate text.
[0109] Step S510 , selecting a first target candidate text in the first text sequence, and selecting a second target candidate text in the second text sequence.
[0110] Step S512: sorting the first target candidate text and the second target candidate text, and selecting a recommended information query text associated with the information query text according to the sorting result.
[0111] Step S514: display the recommended information query text to the business information query party through the business management interface.
[0112] Step S516: upon receiving a confirmation instruction submitted by the business information query party, the information query text is used as the target information query text.
[0113] Step S518: upon receiving a selection instruction submitted by the business information query party for the recommended information query text, selecting a target information query text from the recommended information query text according to the selection instruction.
[0114] Step S520: input the target information query text into the field entity recognition model, and process the target information query text through the entity extraction unit in the field entity recognition model to obtain an initial business entity.
[0115] Step S522: When the initial business entity is of a time entity type or an address entity type, the initial business entity is mapped to a target business entity using an entity mapping unit in the field entity recognition model.
[0116] Step S524, when the initial business entity is a field entity type, the fuzzy matching unit in the field entity recognition model is used to match the initial business entity in the field entity library, and the target business entity is determined according to the matching result.
[0117] Among them, the initial business entity is matched in the field entity library using the fuzzy matching unit in the field entity recognition model, and the target business entity is determined according to the matching result, including: using the fuzzy matching unit in the field entity recognition model to query multiple candidate business entities matching the initial business entity in the field entity library; determining a first entity feature corresponding to the initial business entity, and second entity features corresponding to multiple candidate business entities respectively; calculating the feature similarity between the first entity feature and the second entity feature, and selecting the target business entity from multiple candidate business entities according to the feature similarity.
[0118] Step S526: Process the target business entity through the field type prediction unit in the field entity recognition model to obtain the target field type corresponding to the target business entity.
[0119] Step S528: construct a target query statement corresponding to the target information query text based on the target business entity and the target field type, and feed back the target business information to the business information querying party by executing the target query statement.
[0120] The information query method provided in this embodiment, in order to provide a more concise business management interface to the business information query party and support the business information query party to customize the input of the information query text, can first search the information query text in the preset business dictionary metadata and the historical query record corresponding to the business information query party after receiving the information query text submitted by the business information query party through the business management interface, so as to determine the recommended information query text associated with the information query text according to the search result; then determine the target information query text in the information query text and the recommended information query text, so as to achieve the query demand of the business information query party without a large number of condition configurations, and quickly, accurately and automatically complete the determination of the query demand; then, in order to support the business information required by the business information query party to be obtained on the information management platform, the target information query text can be input into the field entity recognition model, and the target business entity and the target field type of the target business entity can be obtained after processing by the field entity recognition model; on this basis, the target query statement corresponding to the target information query text can be constructed based on the target business entity and the target field type, so as to ensure that the target query statement corresponds to the information query demand of the business information query party, and then the target business information can be fed back to the business information query party by executing the target query statement. In the ToB scenario, it can support business information query and complete subsequent business information query by only entering the query text. It has low professional requirements for the business information query party and has higher query efficiency, so that downstream processing can be responded quickly.
[0121] Corresponding to the above method embodiment, this specification also provides an information query device embodiment, Figure 6 FIG. 1 shows a schematic diagram of the structure of an information query device provided by an embodiment of the present specification. Figure 6 As shown, the device is applied to an information management platform, including:
[0122] The receiving module 602 is configured to receive an information query text submitted by a business information query party through a business management interface;
[0123] A search module 604 is configured to search for the information query text in the preset business dictionary metadata and the historical query records corresponding to the business information query party, and determine the recommended information query text associated with the information query text according to the search results;
[0124] A determination module 606 is configured to determine a target information query text from the information query text and the recommended information query text, and input the target information query text into a field entity recognition model to obtain a target business entity and a target field type of the target business entity;
[0125] The construction module 608 is configured to construct a target query statement corresponding to the target information query text based on the target business entity and the target field type, and feed back target business information to the business information query party by executing the target query statement.
[0126] In an optional embodiment, the retrieval module 604 is further configured to:
[0127] The information query text is segmented to obtain a plurality of word units, and the plurality of word units and the information query text are input into a search engine; the information query text is recalled by the search engine in preset business dictionary metadata and historical query records corresponding to the business information query party to obtain a first candidate text associated with the business dictionary metadata and a second candidate text associated with the historical query records; a first text sequence is constructed according to the first candidate text, and a second text sequence is constructed according to the second candidate text; a first target candidate text is selected in the first text sequence, and a second target candidate text is selected in the second text sequence; the first target candidate text and the second target candidate text are sorted, and a recommended information query text associated with the information query text is selected according to the sorting result; wherein the business dictionary metadata is fully indexed according to a preset time period, and the historical query records are incrementally indexed according to the query records corresponding to the business information query party.
[0128] In an optional embodiment, the determining module 606 is further configured to:
[0129] The recommended information query text is displayed to the business information inquirer through the business management interface; upon receiving a confirmation instruction submitted by the business information inquirer, the information query text is used as a target information query text; upon receiving a selection instruction submitted by the business information inquirer for the recommended information query text, the target information query text is selected from the recommended information query text according to the selection instruction.
[0130] In an optional embodiment, the determining module 606 is further configured to:
[0131] The target information query text is input into a field entity recognition model, and the target information query text is processed by an entity extraction unit in the field entity recognition model to obtain an initial business entity; when the initial business entity is a time entity type or an address entity type, the initial business entity is mapped to a target business entity by an entity mapping unit in the field entity recognition model; or, when the initial business entity is a field entity type, the initial business entity is matched in a field entity library by a fuzzy matching unit in the field entity recognition model, and a target business entity is determined according to the matching result; the target business entity is processed by a field type prediction unit in the field entity recognition model to obtain a target field type corresponding to the target business entity.
[0132] In an optional embodiment, the determining module 606 is further configured to:
[0133] The fuzzy matching unit in the field entity recognition model is used to query multiple candidate business entities matching the initial business entity in the field entity library; a first entity feature corresponding to the initial business entity and second entity features corresponding to the multiple candidate business entities are determined; a feature similarity between the first entity feature and the second entity feature is calculated, and a target business entity is selected from the multiple candidate business entities according to the feature similarity.
[0134] In an optional embodiment, the training of the field entity recognition model includes:
[0135] Obtain database information of a target database, determine a standard business entity and a standard field type corresponding to the standard business entity according to the database information; perform entity expansion for the standard business entity to obtain an enumerated business entity; select a sample query text from a sample set, and construct a sample pair based on the sample query text, the standard business entity, the enumerated business entity, and the standard field type, wherein the sample pair includes a target sample query text and a target sample label; input the target sample query text into an initial field entity recognition model for processing to obtain a predicted business entity and a predicted field type corresponding to the predicted business entity; optimize the initial field entity recognition model based on the target sample label, the predicted business entity, and the predicted field type until a field entity recognition model that meets a training stop condition is obtained.
[0136] The information query device provided in this embodiment, in order to provide a more concise business management interface to the business information query party and support the business information query party to customize the input of the information query text, can first search the information query text in the preset business dictionary metadata and the historical query record corresponding to the business information query party after receiving the information query text submitted by the business information query party through the business management interface, so as to determine the recommended information query text associated with the information query text according to the search result; then determine the target information query text in the information query text and the recommended information query text, so as to achieve the determination of the query demand quickly, accurately and automatically without a large number of condition configurations when facing the query demand of the business information query party; then, in order to support the business information required by the business information query party to be obtained on the information management platform, the target information query text can be input into the field entity recognition model, and the target business entity and the target field type of the target business entity can be obtained after processing by the field entity recognition model; on this basis, the target query statement corresponding to the target information query text can be constructed based on the target business entity and the target field type, so as to ensure that the target query statement corresponds to the information query demand of the business information query party, and then the target business information can be fed back to the business information query party by executing the target query statement. In the ToB scenario, it can support business information query and complete subsequent business information query by only entering the query text. It has low professional requirements for the business information query party and has higher query efficiency, so that downstream processing can be responded quickly.
[0137] The above is a schematic scheme of an information query device of this embodiment. It should be noted that the technical scheme of the information query device and the technical scheme of the above information query method belong to the same concept, and the details not described in detail in the technical scheme of the information query device can be referred to the description of the technical scheme of the above information query method.
[0138] Corresponding to the above method embodiment, this specification also provides a model training device embodiment, Figure 7 FIG. 1 shows a schematic diagram of a model training device provided by an embodiment of the present specification. Figure 7 As shown, the device is applied to a model training platform to train a field entity recognition model in the above information query method, including:
[0139] The information receiving module 702 is configured to receive database information submitted by the client for the target database, and determine the standard business entity and the standard field type of the standard business entity according to the database information;
[0140] The entity building module 704 is configured to build an enumerated business entity corresponding to the standard business entity, and build a sample pair based on a preset sample query text, the standard business entity, the enumerated business entity and the annotated field type;
[0141] The model processing module 706 is configured to input the target sample query text in the sample pair into the initial field entity recognition model for processing, and obtain the predicted business entity and the predicted field type corresponding to the predicted business entity;
[0142] A model optimization module 708 is configured to optimize the initial field entity recognition model based on the target sample label in the sample pair, the predicted business entity and the predicted field type until a field entity recognition model that meets the training stop condition is obtained;
[0143] The parameter sending module 710 is configured to send the model parameters corresponding to the field entity recognition model to the client.
[0144] The above is a schematic scheme of a model training device of this embodiment. It should be noted that the technical scheme of the model training device and the technical scheme of the above-mentioned model training method belong to the same concept, and the details not described in detail in the technical scheme of the model training device can be referred to the description of the technical scheme of the above-mentioned model training method.
[0145] Figure 8 The block diagram of a computing device 800 according to an embodiment of the present specification is shown. The components of the computing device 800 include but are not limited to a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.
[0146] The computing device 800 also includes an access device 840 that enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 840 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0147] In one embodiment of the present specification, the above components of the computing device 800 and Figure 8 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 8 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0148] The computing device 800 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 800 may also be a mobile or stationary server.
[0149] Among them, the processor 820 is used to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned information query method or model training method.
[0150] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned information query method or model training method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned information query method or model training method.
[0151] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned information query method or model training method.
[0152] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned information query method or model training method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned information query method or model training method.
[0153] An embodiment of the present specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned information query method or model training method.
[0154] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the above-mentioned information query method or model training method belong to the same concept, and the details not described in detail in the technical scheme of the computer program can be referred to the description of the technical scheme of the above-mentioned information query method or model training method.
[0155] An embodiment of the present specification also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps of the above-mentioned information query method or model training method.
[0156] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above-mentioned information query method or model training method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above-mentioned information query method or model training method.
[0157] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0158] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0159] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0160] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0161] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. An information query method, applied to an information management platform, comprising: Receive information query text submitted by the business information query party through the business management interface; Searching the information query text in the preset business dictionary metadata and the historical query records corresponding to the business information query party, and determining the recommended information query text associated with the information query text according to the search results; Determine a target information query text from the information query text and the recommended information query text, and input the target information query text into a field entity recognition model to obtain a target business entity and a target field type of the target business entity; A target query statement corresponding to the target information query text is constructed based on the target business entity and the target field type, and target business information is fed back to the business information querying party by executing the target query statement.
2. The information query method according to claim 1, wherein the information query text is searched in the preset business dictionary metadata and the historical query records corresponding to the business information query party, and the recommended information query text associated with the information query text is determined according to the search results, including: Segmenting the information query text to obtain a plurality of word units, and inputting the plurality of word units and the information query text into a search engine; Recalling the information query text in the preset business dictionary metadata and the historical query records corresponding to the business information query party through the search engine to obtain the first candidate text associated with the business dictionary metadata and the second candidate text associated with the historical query records; Constructing a first text sequence according to the first candidate text, and constructing a second text sequence according to the second candidate text; Selecting a first target candidate text in the first text sequence, and selecting a second target candidate text in the second text sequence; Sorting the first target candidate text and the second target candidate text, and selecting a recommended information query text associated with the information query text according to the sorting result; The business dictionary metadata is fully indexed according to a preset time period, and the historical query records are incrementally indexed according to the query records corresponding to the business information query party.
3. The information query method according to claim 1, wherein determining a target information query text from among the information query text and the recommended information query text comprises: Displaying the recommended information query text to the service information query party through the service management interface; Upon receiving a confirmation instruction submitted by the business information query party, using the information query text as a target information query text; When receiving a selection instruction submitted by the service information query party for the recommended information query text, a target information query text is selected from the recommended information query text according to the selection instruction.
4. The information query method according to claim 1, wherein the step of inputting the target information query text into a field entity recognition model to obtain a target business entity and a target field type of the target business entity comprises: Inputting the target information query text into a field entity recognition model, processing the target information query text through an entity extraction unit in the field entity recognition model to obtain an initial business entity; In the case where the initial business entity is of a time entity type or an address entity type, mapping the initial business entity to a target business entity using an entity mapping unit in the field entity recognition model; or, In the case where the initial business entity is a field entity type, the fuzzy matching unit in the field entity recognition model is used to match the initial business entity in the field entity library, and the target business entity is determined according to the matching result; The target business entity is processed by the field type prediction unit in the field entity recognition model to obtain a target field type corresponding to the target business entity.
5. According to the information query method of claim 4, the step of matching the initial business entity in the field entity library using the fuzzy matching unit in the field entity recognition model and determining the target business entity according to the matching result comprises: Using the fuzzy matching unit in the field entity recognition model, querying a plurality of candidate business entities matching the initial business entity in the field entity library; Determining a first entity feature corresponding to the initial business entity and second entity features corresponding to each of the plurality of candidate business entities; A feature similarity between the first entity feature and the second entity feature is calculated, and a target business entity is selected from the plurality of candidate business entities according to the feature similarity.
6. According to the information query method according to any one of claims 1 to 5, the training of the field entity recognition model comprises: Acquire database information of a target database, and determine a standard business entity and a standard field type corresponding to the standard business entity according to the database information; Perform entity expansion on the standard business entity to obtain an enumerated business entity; Selecting a sample query text from the sample set, and constructing a sample pair based on the sample query text, the standard business entity, the enumerated business entity, and the standard field type, wherein the sample pair includes a target sample query text and a target sample label; Inputting the target sample query text into the initial field entity recognition model for processing to obtain a predicted business entity and a predicted field type corresponding to the predicted business entity; The initial field entity recognition model is optimized based on the target sample label, the predicted business entity and the predicted field type until a field entity recognition model that meets the training stop condition is obtained.
7. A model training method, applied to a model training platform, for training a field entity recognition model in the information query method according to any one of claims 1 to 6, comprising: Receiving database information submitted by a client for a target database, and determining a standard business entity and a standard field type of the standard business entity according to the database information; Constructing an enumerated business entity corresponding to the standard business entity, and constructing a sample pair based on a preset sample query text, the standard business entity, the enumerated business entity and the annotated field type; Inputting the target sample query text in the sample pair into the initial field entity recognition model for processing to obtain a predicted business entity and a predicted field type corresponding to the predicted business entity; Optimizing the initial field entity recognition model based on the target sample label in the sample pair, the predicted business entity, and the predicted field type until a field entity recognition model that meets the training stop condition is obtained; The model parameters corresponding to the field entity recognition model are sent to the client.
8. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program or instructions, which implement the steps of the method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Cited By
Data analysis method and device, equipment and storage medium
CN119493852A
