Retrieval data determination method and device, equipment, storage medium and program product
By obtaining search problems in information retrieval, identifying named entities and recalling related fields in information retrieval, the problems of insufficient search accuracy and high redundancy in the prior art are solved, and more efficient and accurate information retrieval is achieved.
Patent Information
- Application Number
- CN202411629506.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-04
AI Technical Summary
The prior art has problems of insufficient accuracy and high redundancy in the information retrieval and recall process, especially when dealing with complex queries and high ambiguity scenarios, it is difficult to fully utilize context information to understand the user's true intentions.
By obtaining the search problem, determining the rough call field set related to it, and identifying named entities based on context information, dynamically adjusting the segmentation of entity fragments, recalling the associated fields, and finally generating the target associated fields for data retrieval.
It improves the accuracy and efficiency of search results, reduces the redundancy and misrecalls of recall results, and can more accurately match the user's true intentions.
Smart Images

Figure CN119557342A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data retrieval, and in particular to a method, device, equipment, storage medium and program product for determining retrieved data. Background Art
[0002] With the development of computer technology, various automatic retrieval methods have emerged, demonstrating powerful data retrieval capabilities. At present, information retrieval and recall often rely on complex manual parameter adjustment, but there is a risk of effective information loss. In addition, for ambiguity problems, it is difficult to fully utilize contextual information to understand the user's true intention, which may lead to insufficient accuracy and high redundancy of retrieval results. Summary of the invention
[0003] In view of this, the present disclosure provides a method, apparatus, device, storage medium and program product for determining retrieval data to solve the problem of insufficient accuracy of retrieval results.
[0004] In a first aspect, the present disclosure provides a method for determining retrieval data, including: obtaining a retrieval question and determining a coarse-recall field set related to the retrieval question; performing named entity recognition on the retrieval question based on context information of the retrieval question to obtain multiple entity fragments corresponding to the retrieval question; associating each entity fragment with a field in the coarse-recall field set to determine the associated field corresponding to each entity fragment; recalling the related fields of the entity fragment based on the number of associated fields to obtain a target associated field corresponding to the retrieval question; performing data retrieval for the retrieval question according to the target associated field to generate a retrieval result.
[0005] In a second aspect, the present disclosure provides a device for determining retrieved data, including: an acquisition module, used to acquire a retrieval question and determine a coarse-recall field set related to the retrieval question; an entity recognition module, used to perform named entity recognition on the retrieval question based on context information of the retrieval question, and obtain multiple entity fragments corresponding to the retrieval question; an association module, used to associate each entity fragment with a field in the coarse-recall field set, and determine the associated field corresponding to each entity fragment; a recall module, used to recall the relevant fields of the entity fragment based on the number of associated fields, and obtain the target associated field corresponding to the retrieval question; a retrieval module, used to perform data search for the retrieval question according to the target associated field, and generate a retrieval result.
[0006] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for determining retrieval data of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0007] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for determining retrieval data of the first aspect or any corresponding embodiment thereof.
[0008] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, which are used to enable a computer to execute the method for determining retrieval data of the first aspect or any corresponding embodiment thereof.
[0009] The method, device, equipment, storage medium and program product for determining retrieval data provided by the present disclosure use the retrieval question as a whole to perform preliminary field rough recall, thereby improving the rough recall accuracy; the named entity recognition is performed on the retrieval question in combination with the context information of the retrieval question, so that the user's true intention can be fully understood in combination with the context information, so as to dynamically adjust the entity fragment segmentation according to the user's true intention, facilitate the refined processing of the retrieval question, ensure the recognition accuracy of the entity fragment, and improve the accuracy of the matching of the entity fragment with the database field. Associate each entity fragment with the field in the rough recall field set, and determine the target associated field corresponding to the retrieval question using the number of associated fields corresponding to the entity fragment, so as to ensure that the target associated field can accurately fit the entity fragment and reduce the redundancy of the target associated field. Use the target associated field for data retrieval, improve the data retrieval efficiency, and ensure the accuracy of the retrieval results. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0011] Figure 1 is a flowchart of a method for determining retrieved data according to an embodiment of the present disclosure;
[0012] Figure 2 is a flowchart of another method for determining retrieved data according to an embodiment of the present disclosure;
[0013] Figure 3 is a flowchart of another method for determining retrieved data according to an embodiment of the present disclosure;
[0014] Figure 4 is a structural block diagram of a device for determining retrieved data according to an embodiment of the present disclosure;
[0015] Figure 5It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0017] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0018] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0019] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0020] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0021] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0022] With the development of computer technology, various models for automatic retrieval have emerged, such as Large Language Models (LLM), which have demonstrated powerful capabilities in the field of natural language understanding. However, when dealing with complex retrieval problems, especially in scenarios involving large amounts of data and high ambiguity, accurately understanding the context and recalling the most relevant information has become a major challenge.
[0023] In the related art, there are mainly two paradigms for retrieving relevant fields based on user questions:
[0024] (1) Data recall based on complete questions: In this scheme, the user’s complete question is directly used to recall relevant fields. In order to strike a balance between the number of recalls and accuracy, it is necessary to set a quota for the recall field (or set a semantic / literal similarity threshold for the recall field. Since the user's complete question is used for recall, the integrity of the semantic information can be retained, so that a higher recall accuracy can be achieved in most cases. Moreover, it is based on the overall semantics of the complete question for recall, so it can match the fields in the database more accurately when the semantics are consistent. However, different questions may require different parameter settings, which requires frequent manual adjustments to the quota and threshold of the recall field to control the number of recall fields, resulting in insufficient flexibility in practical applications. When the user's question is too long or involves multiple fragments, it is easy to ignore some related fields due to quota or threshold restrictions, resulting in insufficient information recall. For example, when querying "What is the GMV of the first-level category yesterday", the system may only recall "Payment GMV", "Live Broadcast GMV", "Shelf GMV" and other fields due to quota restrictions, while "First-level category" is not correctly recalled. Since it is impossible to consider each fragment separately, if some question fragments are associated with multiple fields, it may be difficult to accurately recall all related fields, resulting in difficulty in fragment matching.
[0025] (2) Data recall based on named entity recognition. This solution first uses named entity recognition (NER) technology to parse the user's complete question into different entities or fragments. Then, each fragment is recalled based on semantic or literal similarity to obtain the most relevant fields. This solution does not require manual adjustment of quotas and control of recall thresholds. It can dynamically determine the number and range of recalled fields based on the entity results recognized by NER, thereby improving the flexibility of the system. Moreover, it can match each fragment in the user's question one by one to ensure a more comprehensive recall effect, especially for complex queries. However, this solution is highly dependent on the accuracy of NER recognition. Once an error occurs in entity recognition, it will directly affect the effect of field recall. When dealing with scenarios with high semantic diversity and complexity, NER results often cannot perfectly match user intent. However, there are multiple ways of understanding in natural language. If NER cannot correctly understand the user's intent, it may lead to incorrect recall of relevant fields. For example, for the query "What was the cross-border GMV of brand A yesterday?", if NER fails to correctly recognize the combination relationship of "cross-border GMV", it may recall the wrong field, resulting in insufficient ambiguity processing.
[0026] In summary, the NER method cannot flexibly adjust the output results according to the context information, resulting in a low recognition accuracy of the query fragments, affecting the overall recall effect. When encountering different candidate field sets, it cannot be dynamically adjusted according to the context, resulting in inaccurate segmentation of the fragments, thereby reducing the matching effect with the database fields. Moreover, the related art scheme lacks an effective supplementary recall and association verification mechanism when processing rough recall results, resulting in the problem of missing fields or association errors that are difficult to correct. This deficiency will cause some related indicators, dimensions or dimension enumeration values to not be correctly identified and supplemented during the recall process, affecting the completeness and accuracy of the final query. In addition, when faced with a query fragment associated with multiple fields, the scheme in the related art lacks the ability to intelligently disambiguate and streamline the business usage preferences and user historical usage preferences, which may lead to the redundancy of related fields, increase the complexity of the downstream natural language to SQL conversion (NL2SQL) task, and ultimately affect the overall system performance and query accuracy.
[0027] Based on this, the disclosed technical solution can dynamically adjust the segmentation of the search question according to the context information based on the search question input by the user, so as to dynamically adjust the search for the database according to the entity segments obtained by the segmentation, accurately locate the most relevant information, and use context clues for disambiguation processing, which not only improves the accuracy of the query, but also provides a more natural and smooth dialogue experience in complex and changeable user interactions. In this way, the problems of missing recall results, false recall and ambiguity are significantly reduced, and more accurate and efficient information retrieval services can be provided.
[0028] According to an embodiment of the present disclosure, an embodiment of a method for determining the retrieval of data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] In this embodiment, a method for determining retrieved data is provided, which can be used in computer devices, such as computers, tablet computers, etc. Figure 1 is a flowchart of a method for determining retrieved data according to an embodiment of the present disclosure. Figure 1 As shown, the process includes the following steps:
[0030] Step S101, obtaining a search question and determining a rough call field set related to the search question.
[0031] The search question is a question generated when a user initiates a search request according to business needs, such as "view live broadcast data in the last 7 days". Specifically, the computer device provides a user interaction interface, and the user can edit the search question on the interaction interface by accessing an input device of the computer device (such as a keyboard, a mouse, a touch tablet, etc.), and accordingly, the computer device can obtain the search question input by the user.
[0032] The rough-recall field set is a field set generated by preliminary field recall of the search question, and the rough-recall field set includes multiple related fields and their field dimension values that are semantically similar or identical to the search question, and multiple related fields and their field dimension values that are similar or identical to the search question fields. Specifically, after obtaining the search question, the computer device regards the search question as a complete question, performs word segmentation and entity recognition on the complete natural language constituting the search question, decomposes the complete natural language into words or phrases, and recognizes the entities included in the natural language, such as time, name, etc., uses the keywords in the word segmentation and entity to match with the fields in the database, recalls the fields that are identical or similar to them, completes the preliminary field recall for the search question, and obtains the corresponding rough-recall field set.
[0033] Step S102: Based on the context information of the search question, named entity recognition is performed on the search question to obtain multiple entity fragments corresponding to the search question.
[0034] A pre-trained information retrieval model is deployed in a computer device, and the context information of the retrieval question is understood through the information retrieval model. The information retrieval model may be a pre-trained large language model, a deep learning model, a machine learning model, a neural network model, etc. The information retrieval model is not specifically limited here, and any model that can achieve context understanding is acceptable.
[0035] The search question is input into the information retrieval model, the context information of the search question is understood by the information retrieval model, and named entity recognition is performed according to the understanding results to identify and classify specific types of key entities, such as time, product name, place name, etc., from the unstructured text that constitutes the search question. In this way, the search question can be divided into multiple independent segments to obtain multiple entity segments corresponding to the search question.
[0036] Step S103: associate each entity fragment with a field in the rough-call field set to determine an associated field corresponding to each entity fragment.
[0037] An associated field is a related field that is similar or identical to an entity fragment. The relationship between a natural language query and a rough-recall field set is established using a schema linking method. Each entity fragment identified from the search question is associated and matched with a field in the rough-recall field set. By using the context understanding ability of the information retrieval model, an associated field that is accurately associated with each entity fragment can be found in the rough-recall field set. Specifically, the associated field can be 0, 1, or more, where 0 associated fields means that no related fields are found in the rough-recall field set; 1 associated field means that only 1 related field is matched in the rough-recall field set; and multiple associated fields mean that multiple related fields are matched in the rough-recall field set.
[0038] Step S104 , recalling the relevant fields of the entity fragment based on the number of associated fields to obtain the target associated fields corresponding to the search question.
[0039] According to the number of associated fields corresponding to each entity fragment, the type of the entity fragment can be determined, that is, missing fields and non-missing fields. If the number of associated fields corresponding to the entity fragment is 0, it can be determined that the entity fragment is a missing field. At this time, the relationship between the natural language query and the database can be established by using the pattern linking method to supplement the recall of the field fragment from the database to obtain the supplementary recall associated field of the entity fragment, which is the actual associated field of the entity fragment.
[0040] If the number of associated fields corresponding to the entity fragment is not 0, it can be determined that the entity fragment is a non-missing field. At this time, field verification and field disambiguation can be performed on the entity fragment to make the recalled associated fields accurately fit the search requirements, and the associated fields recalled after field verification and field disambiguation are determined as the actual associated fields of the entity field. The actual associated fields corresponding to each entity fragment are merged to form the target associated fields corresponding to the search question.
[0041] Step S105: perform data search for the search question according to the target associated fields to generate search results.
[0042] According to the target related fields, a structured query statement for the search question is constructed, and the structured query statement is used to search the database for data related to the search question. Then, the relevant data retrieved is integrated to generate corresponding search results, and the search results are displayed through the interactive interface of the computer device.
[0043] The method for determining the retrieval data provided in this embodiment uses the retrieval question as a whole to perform preliminary field rough recall, thereby improving the rough recall accuracy; the named entity recognition is performed on the retrieval question in combination with the context information of the retrieval question, so that the user's true intention can be fully understood in combination with the context information, so as to dynamically adjust the entity fragment segmentation according to the user's true intention, facilitate the refined processing of the retrieval question, ensure the recognition accuracy of the entity fragment, and improve the accuracy of the matching of the entity fragment with the database field. Associate each entity fragment with the field in the rough recall field set, and determine the target associated field corresponding to the retrieval question using the number of associated fields corresponding to the entity fragment, so as to ensure that the target associated field can accurately fit the entity fragment and reduce the redundancy of the target associated field. Using the target associated field for data retrieval improves the data retrieval efficiency and ensures the accuracy of the retrieval results.
[0044] In this embodiment, a method for determining retrieved data is provided, which can be used in computer devices, such as computers, tablet computers, etc. Figure 2 is a flowchart of a method for determining retrieved data according to an embodiment of the present disclosure. Figure 2 As shown, the process includes the following steps:
[0045] Step S201, obtain a search question and determine a coarse-call field set related to the search question. For details, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.
[0046] Step S202: Based on the context information of the search question, named entity recognition is performed on the search question to obtain multiple entity fragments corresponding to the search question. For details, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.
[0047] Step S203: associate each entity segment with a field in the rough call field set to determine the associated field corresponding to each entity segment. For details, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.
[0048] Step S204 , recalling the relevant fields of the entity fragment based on the number of associated fields to obtain the target associated fields corresponding to the search question.
[0049] Specifically, the above step S204 includes:
[0050] Step S2041 : Based on the number of associated fields corresponding to the entity fragments, relevant fields of the entity fragments are recalled to obtain candidate associated fields corresponding to the entity fragments.
[0051] Candidate associated fields are candidate fields obtained when recalling entity fragments. Specifically, according to the number of associated fields corresponding to the entity fragment, determine whether the entity fragment is a missing fragment. Recall the associated fields for the missing fragments again to obtain the corresponding candidate associated fields to ensure that all fields can be fully covered. Recall and recall disambiguation of the associated fields for the non-missing fields to obtain the corresponding candidate associated fields to ensure that the recalled candidate associated fields can fit the entity fragment.
[0052] In some optional implementations, the above step S2041 includes:
[0053] Step a1: when an entity fragment corresponds to multiple associated fields, historical search behavior data is obtained.
[0054] Step a2: screening multiple associated fields based on historical search behavior data to determine candidate associated fields.
[0055] The historical search behavior data is the behavior data of the search request initiated by the user in the historical time, and the historical search behavior data includes the historical usage preference data (such as common dimension values, common dimensions, etc.) and the business usage preference data. Specifically, the historical search behavior data is stored in the search database, and the search request data initiated by the user in the historical time will be recorded in the corresponding search database. The search request can represent the behavior data adopted by the user in the search process.
[0056] When an entity fragment has multiple associated fields in the rough recall field set, the search database is queried to read the historical search behavior data from the search database. The recalled multiple associated fields are screened and disambiguated through the historical search behavior data, and candidate associated fields are determined from the multiple associated fields. Specifically, by analyzing the user's historical usage preference data in terms of demand tendencies and usage habits, the ambiguity in the associated fields can be eliminated in a targeted manner to ensure that the candidate associated fields obtained by screening more accurately fit the user's real search needs. For example, the entity fragment "Pet Industry" corresponds to multiple associated fields: 'Third-level sub-track name': [Pet] and 'New main category': ['Pet / Pet food and supplies']. According to the user's historical usage preference data, it can be known that the user tends to use the 'new main category'. At this time, multiple similar associated fields can be screened and disambiguated to obtain the corresponding candidate associated fields.
[0057] By filtering and disambiguating multiple associated fields, the multiple associated fields can be streamlined to avoid using wrong fields when performing a natural language to structured query statement (NL2SQL) task.
[0058] In some optional implementations, the above step S2041 includes:
[0059] Step b1, when an entity fragment does not have an associated field, obtain the field type of the entity fragment.
[0060] Step b2: Supplementally recall the relevant fields of the entity fragment according to the field type, and determine the candidate related fields based on the supplementary recall result.
[0061] The field type is the category of the field corresponding to the entity fragment. The field type determines the field category to which the entity fragment belongs, such as indicators, time, categories, etc. When an entity fragment does not have an associated field, the entity fragment can be determined as a missing field. In order to ensure that all fields required for the retrieval can be covered, it is necessary to obtain the field type of the entity fragment. Through the field type of the missing field, the missing related fields are supplemented and recalled through the recall module of the information retrieval model to obtain the corresponding candidate related fields. For example, if there is no associated field for the entity fragment "Alliance Author GMV" in the rough recall field set of the preliminary recall, you can try to supplement the recall of the related field "Alliance Author Payment GMV".
[0062] When there is no associated field corresponding to the entity fragment, supplementary recall is performed on the relevant fields of the entity fragment to ensure that all fields required for retrieval are fully covered to ensure the accuracy and rationality of subsequent recall.
[0063] In some optional implementations, the above step S2041 includes:
[0064] Step c1: when an entity fragment corresponds to an associated field, a supplementary recall is performed based on the field type of the entity fragment to obtain a recalled field set.
[0065] Step c2: Check whether the associated field is in the recalled field set.
[0066] Step c3: if the associated field is in the recalled field set, the associated field is determined as a candidate associated field.
[0067] Step c4: if the associated field is not in the recalled field set, the candidate associated field corresponding to the entity fragment is corrected according to the recalled field set.
[0068] If an entity fragment only corresponds to one associated field, although there is a one-to-one correspondence between the entity fragment and the associated field, in order to ensure the accuracy of the associated field corresponding to the entity fragment, it is necessary to verify the entity fragment and the associated field. Specifically, for an entity fragment that only corresponds to one associated field, the field type of the entity fragment can be obtained, and the field fragment can be supplemented and recalled according to the field type to obtain the associated field obtained by the supplementary recall, and generate a recalled field set.
[0069] The associated field is compared with the fields in the recalled field set to determine whether the associated field is in the recalled field set. If the associated field is in the recalled field set, it means that there is an association relationship between the entity fragment and the associated field. At this time, the initially recalled associated field can be determined as a candidate associated field.
[0070] If the associated field is not in the recall field set, it means that there is no association relationship between the associated field of the initial recall and the entity fragment, and there is an incorrect association between the entity fragment and the associated field. At this time, it is necessary to select relevant fields from the recall field set to correct the associated field for the entity fragment, and determine the associated field obtained after the correction as the candidate associated field of the entity fragment. For example, if the entity fragment "product GMV" is associated with the associated field "payment GMV" of the initial recall, and when the supplementary recall is performed through the entity fragment, the "product GMV" can be recalled, but the "payment GMV" is not recalled, it means that the association relationship between the entity fragment and the associated field is incorrect. At this time, it is necessary to correct the association relationship between the associated field and the entity fragment, and determine the candidate associated field associated with "product GMV" from the recall field set obtained by the supplementary recall.
[0071] When the entity fragments and associated fields are in one-to-one correspondence, supplementary recall is performed on the relevant fields of the entity fragments to verify whether the associated fields can be found in the recalled field set of the supplementary recall, so as to prevent the information retrieval model from making incorrect associations during the pattern linking process. By verifying the rationality of the associated fields through supplementary recall, errors in subsequent retrieval processing caused by incorrect associations can be avoided, further ensuring the accuracy of the retrieval.
[0072] Step S2042: perform field simplification at least once on the candidate associated fields corresponding to each entity fragment to obtain the simplification fields corresponding to each entity fragment.
[0073] The candidate associated fields obtained after the supplementary recall and verification screening process are further simplified to obtain the simplified segments corresponding to each entity segment. Specifically, the information retrieval model is used to perform at least one concurrent simplification on the candidate associated segments corresponding to each entity segment to remove redundant associated fields, retain key associated fields, and determine the retained key associated fields as simplified fields.
[0074] Step S2043, merging the various simplified fields to obtain the target associated field corresponding to the search question.
[0075] The simplified fields obtained through concurrent simplification are merged to obtain the union of the simplified fields. The most relevant and accurate field set of each entity fragment is retained in the union of the simplified fields, and the fields in the field set are determined as the target associated fields corresponding to the search question.
[0076] Step S205: perform data retrieval for the retrieval question according to the target associated field to generate retrieval results. For details, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.
[0077] The method for determining retrieval data provided in this embodiment determines candidate associated fields according to the number of associated fields, and performs one or more concurrent simplifications on the candidate associated fields of each entity fragment, thereby reducing the redundancy of the candidate associated fields, and then merging all the simplification fields to obtain the target associated fields. Thus, by extracting the simplification fields to generate the target associated fields, the accuracy and efficiency of the retrieval processing task are improved.
[0078] In this embodiment, a method for determining retrieved data is provided, which can be used in computer devices, such as computers, tablet computers, etc. Figure 3 is a flowchart of a method for determining retrieved data according to an embodiment of the present disclosure. Figure 3 As shown, the process includes the following steps:
[0079] Step S301, obtaining a search question and determining a rough call field set related to the search question.
[0080] Specifically, the above step S301 includes:
[0081] Step S3011, obtaining the recall parameters for the search question.
[0082] Recall parameters are pre-set parameters for preliminary recall. Specifically, recall parameters include field quotas and similarity thresholds. Field quotas are the maximum number of fields that can be recalled, and similarity thresholds include field semantic similarity thresholds and literal similarity thresholds. The setting of field quotas and similarity thresholds is based on the balance between the number of recalls and the recall accuracy. The specific values of field quotas and similarity thresholds are not specifically limited here.
[0083] Step S3012: recall fields according to the recall parameters to obtain a coarse-recall field set that meets the recall parameters.
[0084] The complete natural language of the search question is segmented and entity recognized to obtain multiple fragments that constitute the search question. For the multiple fragments of the search question, field recall is performed according to the field quota and similarity threshold, and dimension fields / indicator fields / dimension enumeration value fields that meet the similarity threshold conditions and the number of recalled fields are recalled from the database. The recalled dimension fields / indicator fields / dimension enumeration value fields and their field dimension values form a coarse recall field set.
[0085] Among them, the indicator field is a specific measurement field used to quantify the business, and its value can be a numerical value for measurement and tracking. For example, indicators for measuring GMV such as "live broadcast GMV share", "mall GMV share", and "search GMV share" can be used to evaluate transaction levels. The dimension field is a field used for attributes. The type of the field is determined by the dimension field, such as geographic location, time, product category, etc. The dimension enumeration value field is a specific value list of the dimension attribute, which is used to describe the possible categories or tags of the field to facilitate field classification, grouping, and filtering operations.
[0086] In a specific example, in the "City" dimension, "City A", "City B", and "City C" are all dimension enumeration values. The "City" dimension can be used to group data by city, where "City A", "City B", and other cities are members or values of this dimension.
[0087] Step S302: Based on the context information of the search question, named entity recognition is performed on the search question to obtain multiple entity fragments corresponding to the search question. For details, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.
[0088] Step S303: associate each entity segment with a field in the rough call field set to determine the associated field corresponding to each entity segment. For details, please refer to the relevant description of the corresponding steps in the above embodiment, which will not be repeated here.
[0089] Step S304: Recall the relevant fields of the entity fragment based on the number of related fields to obtain the target related fields corresponding to the search question. Please refer to the relevant description of the corresponding steps in the above embodiment for details, which will not be repeated here.
[0090] Step S305: perform data search for the search question according to the target associated fields to generate search results.
[0091] Specifically, the above step S305 includes:
[0092] Step S3051, obtaining the dimension value corresponding to the target associated field.
[0093] Dimension values are different field values associated with the target associated field. The dimension value can be obtained from the database by reading the database. Taking the target associated field "Payment GMV" as an example, its corresponding dimension values may include "Payment GMV", "Author Payment GMV", etc.
[0094] Step S3052: construct search prompt information using the target associated fields and dimension values.
[0095] Search prompt information is prompt information set for search. Specifically, the target associated field and dimension value are assembled to determine the search conditions for the search question, and the text information corresponding to the search conditions is combined with the system prompt text to form the search prompt information. For example, if the text information corresponding to the search condition is text, and the system prompt text is "Please search for data in combination with the above text information", the search prompt information "[text], please search for data in combination with the above text information" can be constructed using the search condition and the system prompt text.
[0096] Step S3053, generating a search query statement according to the search prompt information, performing data search through the search query statement, and obtaining search results.
[0097] The search query statement is a structured query statement generated for the search prompt information. The search prompt information is input into the information retrieval model, and the query statement generation function of the information retrieval model is used to analyze the search prompt information and generate a structured query statement that matches the search prompt information. By executing the structured query statement to search the database for the search question, the search results that match the search question are obtained.
[0098] The method for determining the retrieval data provided in this embodiment sets the recall parameters for the retrieval question, and uses the recall parameters to perform preliminary recall of related fields, thereby obtaining a rough recall field set that meets the recall parameters. Since the recall parameters balance the recall quantity and the recall accuracy, efficient recall and accurate recall of the rough recall field set can be achieved. After determining the target associated field of the entity fragment, the target associated field and the dimension value are used to construct the retrieval prompt information, so as to use the constructed retrieval prompt information to accurately generate the retrieval query statement, and then perform data retrieval through the retrieval query statement, thereby improving the accuracy of data retrieval.
[0099] In the present embodiment, a kind of determination device of retrieval data is also provided, and this device is used to realize the above-mentioned embodiment and preferred implementation mode, and the description that has been carried out is not repeated. As used below, the term "module" can realize the combination of software and / or hardware of predetermined function. Although the device described in the following embodiment is preferably realized with software, the realization of hardware, or the combination of software and hardware is also possible and conceived.
[0100] This embodiment provides a determination device for retrieving data, such as Figure 4 As shown, including:
[0101] The acquisition module 401 is used to acquire a search question and determine a coarse-call field set related to the search question.
[0102] The entity recognition module 402 is used to perform named entity recognition on the search question based on the context information of the search question to obtain multiple entity fragments corresponding to the search question.
[0103] The association module 403 is used to associate each entity fragment with a field in the rough call field set to determine the associated field corresponding to each entity fragment.
[0104] The recall module 404 is used to recall the relevant fields of the entity fragment based on the number of related fields to obtain the target related fields corresponding to the search question.
[0105] The search module 405 is used to perform data search for the search question according to the target associated fields and generate search results.
[0106] In some optional implementations, the recall module 404 includes:
[0107] The associated field recall unit is used to recall the related fields of the entity fragment based on the number of associated fields corresponding to the entity fragment, and obtain the candidate associated fields corresponding to the entity fragment.
[0108] The simplified element is used to simplify the candidate associated fields corresponding to each entity fragment at least once to obtain the simplified fields corresponding to each entity fragment.
[0109] The merging unit is used to merge various simplified fields to obtain the target associated fields corresponding to the search question.
[0110] In some optional implementations, the associated field recall unit includes:
[0111] The historical data acquisition subunit is used to acquire historical search behavior data when an entity fragment corresponds to multiple associated fields.
[0112] The first determination subunit is used to screen multiple associated fields based on the historical search behavior data to determine candidate associated fields.
[0113] In some optional implementations, the associated field recall unit includes:
[0114] The field type acquisition subunit is used to obtain the field type of an entity fragment when an entity fragment does not have an associated field.
[0115] The second determination subunit is used to supplement and recall the relevant fields of the entity fragment according to the field type, and determine the candidate related fields based on the supplementary recall result.
[0116] In some optional implementations, the associated field recall unit includes:
[0117] The supplementary recall subunit is used to perform supplementary recall based on the field type of the entity fragment when an entity fragment corresponds to an associated field, so as to obtain a recalled field set.
[0118] The detection subunit is used to detect whether the associated field is in the recalled field set.
[0119] The third determining subunit is configured to determine the associated field as a candidate associated field if the associated field is in the recalled field set.
[0120] The fourth determining subunit is configured to correct the candidate associated field corresponding to the entity fragment according to the recalled field set if the associated field is not in the recalled field set.
[0121] In some optional implementations, the acquisition module 401 includes:
[0122] The parameter acquisition unit is used to acquire the recall parameter for the retrieval question.
[0123] The coarse recall unit is used to recall fields according to the recall parameters to obtain a coarse recall field set that meets the recall parameters.
[0124] In some optional implementations, the retrieval module 405 includes:
[0125] The dimension value acquisition unit is used to obtain the dimension value corresponding to the target associated field.
[0126] The prompt information construction unit is used to construct the search prompt information using the target associated field and dimension value.
[0127] The data retrieval unit is used to generate a retrieval query statement according to the retrieval prompt information, perform data retrieval through the retrieval query statement, and obtain a retrieval result.
[0128] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0129] The device for determining the retrieved data in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0130] The device for determining retrieval data provided by the embodiment of the present disclosure uses the retrieval question as a whole to perform preliminary field rough recall, thereby improving the rough recall accuracy; the named entity recognition is performed on the retrieval question in combination with the context information of the retrieval question, so that the user's true intention can be fully understood in combination with the context information, which facilitates the refined processing of the retrieval question and ensures the recognition accuracy of the entity fragment. Each entity fragment is associated with a field in the rough recall field set, and the target associated field corresponding to the retrieval question is determined by the number of associated fields corresponding to the entity fragment, ensuring that the target associated field can accurately fit the entity fragment and reduce the redundancy of the target associated field. Using the target associated field for data retrieval improves the data retrieval efficiency and ensures the accuracy of the retrieval results.
[0131] The present disclosure also provides a computer device having the above Figure 4 The retrieval data determination device shown.
[0132] See also Figure 5 , Figure 5 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0133] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0134] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0135] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0136] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0137] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0138] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0139] The computer device also includes a communication interface, which is used for the computer device to communicate with other devices or a communication network.
[0140] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0141] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0142] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for determining retrieval data, characterized in that: The method comprises: Obtaining a search question, and determining a rough call field set related to the search question; Based on the context information of the retrieval question, performing named entity recognition on the retrieval question to obtain a plurality of entity fragments corresponding to the retrieval question; Associating each of the entity fragments with a field in the rough-call field set to determine an associated field corresponding to each of the entity fragments; Recalling the relevant fields of the entity fragment based on the number of the associated fields to obtain the target associated fields corresponding to the search question; Data is searched for the search question according to the target associated fields to generate search results.
2. The method according to claim 1, characterized in that Recalling the relevant fields of the entity fragment based on the number of the associated fields to obtain the target associated fields corresponding to the search question includes: Based on the number of the associated fields corresponding to the entity fragments, recall the related fields of the entity fragments to obtain candidate associated fields corresponding to the entity fragments; Performing at least one field simplification on the candidate associated fields corresponding to each of the entity fragments to obtain simplification fields corresponding to each of the entity fragments; Each of the simplified fields is merged to obtain a target associated field corresponding to the search question.
3. The method according to claim 2, characterized in that Based on the number of the associated fields corresponding to the entity fragments, relevant fields are recalled for the entity fragments to obtain candidate associated fields corresponding to the entity fragments, including: When one entity fragment corresponds to multiple associated fields, obtaining historical search behavior data; The plurality of associated fields are screened based on the historical search behavior data to determine the candidate associated fields.
4. The method according to claim 3, characterized in that The recalling of related fields for the entity fragments based on the number of the related fields corresponding to the entity fragments to obtain candidate related fields corresponding to the entity fragments further includes: When the associated field does not exist in one of the entity fragments, obtaining the field type of the entity fragment; Supplementary recall is performed on the related fields of the entity fragment according to the field type, and the candidate associated fields are determined based on the supplementary recall result.
5. The method according to claim 3, characterized in that: The recalling of related fields for the entity fragments based on the number of the related fields corresponding to the entity fragments to obtain candidate related fields corresponding to the entity fragments further includes: When one of the entity fragments corresponds to one of the associated fields, supplementary recall is performed based on the field type of the entity fragment to obtain a recalled field set; Detecting whether the associated field is in the recalled field set; If the associated field is in the recalled field set, the associated field is determined as the candidate associated field.
6. The method according to claim 5, characterized in that The recalling of related fields for the entity fragments based on the number of the related fields corresponding to the entity fragments to obtain candidate related fields corresponding to the entity fragments further includes: If the associated field is not in the recalled field set, the candidate associated field corresponding to the entity fragment is corrected according to the recalled field set.
7. The method according to claim 1, characterized in that The step of performing data retrieval for the search question according to the target associated field and generating a search result includes: Obtaining the dimension value corresponding to the target associated field; Constructing search prompt information using the target associated field and the dimension value; A search query statement is generated according to the search prompt information, and data is searched through the search query statement to obtain the search result.
8. The method according to claim 1, characterized in that The obtaining of the search question and determining the rough call field set related to the search question include: obtaining a recall parameter for the search question; Field recall is performed according to the recall parameters to obtain a coarse recall field set that meets the recall parameters.
9. A device for determining retrieved data, characterized in that: The device comprises: An acquisition module, used for acquiring a search question and determining a coarse-call field set related to the search question; An entity recognition module, configured to perform named entity recognition on the search question based on the context information of the search question, and obtain a plurality of entity fragments corresponding to the search question; An association module, used to associate each of the entity fragments with a field in the rough call field set, and determine an associated field corresponding to each of the entity fragments; A recall module, used for recalling the relevant fields of the entity fragment based on the number of the associated fields, to obtain the target associated fields corresponding to the search question; The retrieval module is used to perform data retrieval for the retrieval question according to the target associated field and generate retrieval results.
10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for determining retrieval data according to any one of claims 1 to 8 by executing the computer instructions.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for determining retrieval data according to any one of claims 1 to 8.
12. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method for determining retrieval data according to any one of claims 1 to 8.