Data processing method, device and computer program product
By retrieving at least two preset databases in turn when receiving the query object, the problem of time-consuming and unknown answer accuracy of the question-and-answer process is solved, and efficient and accurate query results are achieved.
Patent Information
- Application Number
- CN202411992711.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the question and answer process takes a long time, and the accuracy and usability of the generated answers are unknown.
When receiving the query object, at least two preset databases are sequentially retrieved, the reference query results of the query object whose similarity is greater than the preset threshold are retrieved, and determined as the target query results.
Reduces the time-consuming process of the Q&A process, improves the accuracy and usability of answers, and ensures that the retrieved results meet user expectations.
Smart Images

Figure CN119807379A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to but is not limited to the field of information technology, and in particular to a data processing method, device, and computer program product. Background Art
[0002] In the related art, a query operation can be performed on an input query object and an answer corresponding to the query object can be obtained. For example, a knowledge base of a given source can be used as a search scope to recall relevant content fragments, and then the content fragments and the query object can be given to a large model for outputting an answer.
[0003] However, answering questions in the above manner not only involves many steps and takes a long time, but also the accuracy and usability of the generated answers are unknown from the perspective of the questioner. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a data processing method, device and computer program product, which can not only reduce the time consumption of the question-answering process, but also retrieve query results that meet the user's expectations.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a data processing method, including:
[0006] When a first query object is received, at least two preset databases are sequentially searched based on the first query object;
[0007] When a second query object having a similarity with the first query object greater than a preset similarity threshold is retrieved, obtaining a reference query result of the second query object from a database where the second query object is located;
[0008] The reference query result of the second query object is determined as the target query result.
[0009] According to a second aspect of an embodiment of the present disclosure, there is provided a data processing device, including:
[0010] A retrieval module, configured to, upon receiving a first query object, sequentially search at least two preset databases based on the first query object;
[0011] A first acquisition module is configured to, when a second query object having a similarity with the first query object greater than a preset similarity threshold is retrieved, acquire a reference query result of the second query object from a database where the second query object is located;
[0012] The first determining module is configured to determine the reference query result of the second query object as the target query result.
[0013] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0014] processor;
[0015] Memory for storing computer programs or instructions;
[0016] The processor executes the computer program or instructions to implement the steps of any one of the methods in the first aspect above.
[0017] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, wherein the storage medium stores a computer program or instructions. When the computer program or instructions in the storage medium are executed by a processor, the steps of the method described in any one of the first aspects are implemented.
[0018] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the steps of any one of the methods described in the first aspect.
[0019] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0020] In the disclosed embodiment, a question-answer pair consisting of at least two preset database cache query objects and reference query results can be used. When a first query object is received, the at least two databases can be searched in sequence. That is, when the second query object is not retrieved in one database, the next database will continue to be searched.
[0021] Since the database pre-stores question-and-answer pairs consisting of query objects cached at historical moments and reference query results, by constructing a multi-level cache of at least two databases, multiple attempts are made to retrieve a second query object similar to the first query object based on at least two databases, and then the reference query result of the second query object is determined as the target query result.
[0022] On the one hand, compared with the related technology of recalling relevant content fragments through a knowledge base of a given source as the retrieval scope, and then giving the content fragments and query objects to the large model for outputting answers, it is possible to directly use the retrieved target query results as the final answer, reducing the time-consuming question-answering process; on the other hand, since the query objects and reference query results are pre-stored in the database, the accuracy and availability are known, and query results that meet user expectations can be retrieved.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0025] Figure 1 A data processing method according to an exemplary embodiment is shown in FIG. Figure 1 .
[0026] Figure 2 A data processing method according to an exemplary embodiment is shown in FIG. Figure 2 .
[0027] Figure 3 A data processing method according to an exemplary embodiment is shown in FIG. Figure 3 .
[0028] Figure 4 It is a block diagram of a data processing device according to an exemplary embodiment.
[0029] Figure 5 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0030] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0031] Figure 1 A data processing method according to an exemplary embodiment is shown in FIG. Figure 1 .like Figure 1 As shown, the method mainly includes the following steps:
[0032] In step 101, when a first query object is received, at least two preset databases are searched in sequence based on the first query object;
[0033] In step 102, when a second query object having a similarity with the first query object greater than a preset similarity threshold is retrieved, a reference query result of the second query object is obtained from the database where the second query object is located;
[0034] In step 103, the reference query result of the second query object is determined as the target query result.
[0035] The data processing method proposed in the present disclosure can be applied to electronic devices or servers. Here, the electronic device may include: terminal devices, for example, mobile terminals or fixed terminals. Among them, mobile terminals may include: mobile phones, tablet computers, laptop computers and other devices. Fixed terminals may include: desktop computers or smart TVs, etc. The data processing method in the embodiment of the present disclosure may be configured in a data processing device, which may be set in a server or in an electronic device, and the embodiment of the present disclosure does not limit this.
[0036] The execution subject of the embodiments of the present disclosure may be, for example, a central processing unit (CPU) in a server or electronic device in terms of hardware, or may be, for example, a related background service in a server or electronic device in terms of software, without limitation.
[0037] In some embodiments, the data processing method of the present disclosure can be applied to a system that needs to parse and respond to the intent of a query object input by a user. Exemplarily, the data processing method of the present disclosure can be applied to a question-and-answer system or a conversation system.
[0038] It should be noted that, in the case of using the question-answering system in the above example, the question-answering system can be a system with a retrieval-augmented generation (RAG) function, that is, it can be a query system including a RAG architecture. The RAG architecture is a language model architecture that combines retrieval technology and generation technology.
[0039] In some embodiments, the question-answering system may include a retrieval module and a generation module. When performing a question-answering task, the retrieval module may be used to retrieve text segments related to the query object (question) to be processed from a preset corpus (knowledge base), and then the generation module may be used to generate an answer based on the retrieved text segments and context information of the query object to be processed. The query object to be processed may be a question input by a user, and the text segment may also be called a document segment.
[0040] It should be noted that the query object can be an object input by the user for performing a query operation, the query object can include vocabulary, or the content included in the query object can be recognized and understood as including vocabulary, for example, the expression of a smiley face can be understood as happy or smiling face, and the expression of a smiley face can be understood as including vocabulary related to happiness.
[0041] In some embodiments, the format and type of the query object are related to the entry point for the user to input the query object or the user's needs. The query object may include content in one format, or may be composed of a combination of content in different formats. Exemplarily, the query object may include at least one of the following: content in audio format; content in text format; content in image format. For example, the query object may include at least one of the following: audio, image, text, emoticon, or dynamic image.
[0042] In some other embodiments, the query object may also be a query statement. Taking the query object as an example, the query statement may include at least one of the following: a query statement in voice format, a query statement in text format, and a query statement in image format.
[0043] Exemplarily, the question-answering system is a RAG system, which first uses a retrieval module to retrieve text fragments related to the question from a preset corpus (e.g., a large text library), and then uses a generation module to generate a final answer based on the retrieved text fragments and the context information of the question.
[0044] In some embodiments, the predetermined knowledge source can be preprocessed based on the question-answering system, and then the preprocessed data can be converted into vectors and stored as a data source that the question-answering system needs to refer to, that is, a knowledge base. After receiving the query object to be processed, the question-answering system can determine the user's question intention based on the query object to be processed, and perform word segmentation on the query object to be processed, and then retrieve relevant text fragments from the knowledge base based on the result of the word segmentation, sort the retrieved text fragments, and the question-answering system obtains the final answer based on the sorting result and the text fragments.
[0045] Exemplarily, the RAG system can first prepare knowledge: filter and / or segment the predetermined knowledge sources (e.g., documents), and convert the results of the filtering and / or segmentation into vectors and store them as a data source for the big model to answer references, i.e., the knowledge base; then the sentences input by the user can be processed, the big model can determine the user's question intention, and perform word segmentation on the sentences input by the user, and then perform retrieval based on the results of the word segmentation, and sort the retrieved text fragments, and obtain the final answer based on the sorting results and the text fragments.
[0046] In some embodiments, text fragments with higher relevance, timeliness, authority, etc. in the knowledge base can be recalled preferentially, the text fragments can be sorted, and the sorting results and the corresponding text fragments can be input into the big model to control the big model to answer based on the text fragments (recall fragments), thereby improving the accuracy, explainability and timeliness of the answers output by the model.
[0047] In the embodiment of the present disclosure, when the question-answering system receives the first query object, it can sequentially search at least two preset databases based on the first query object. The database can also be called a question-answering database, and the database can include a question-answering pair consisting of a preset query object and a reference query result. Sequentially searching at least two preset databases based on the first query object can be understood as sequentially determining the similarity between the first query object and the preset query objects in each database in a traversal manner.
[0048] It should be noted that the database can be understood as a temporary storage area in the question-and-answer system that stores historical query objects (questions) and corresponding reference query results (answers). When a user asks a question (for example, the first query object), the system will first check whether there is an answer related to the question in the cache (for example, the reference query result of the second query object). If the corresponding answer is already in the cache, the system can directly obtain the answer from the cache without the need for complex retrieval sorting and generation again.
[0049] Exemplarily, when a first query object is received, the similarity between the first query object and a preset query object in a database can be determined. Exemplarily, the similarity between the first query object and the preset query object can be determined based on a similarity algorithm in a traversal manner, and the determined similarity can be compared with a preset similarity threshold, and when a second query object having a similarity with the first query object greater than the preset similarity threshold is retrieved, a reference query result of the second query object is obtained from the database where the second query object is located.
[0050] In some embodiments, after the question-and-answer system distributes intent based on the first query object, it enters the question-and-answer phase. After entering the question-and-answer phase, a second query object whose similarity to the first query object is greater than a preset similarity threshold can be determined from at least two preset databases according to a similarity algorithm. That is, if the second query object is not retrieved in one database, the next database will continue to be searched until the second query object is retrieved or all databases are traversed.
[0051] like Figure 2As shown, the first query object input by the user enters the question-and-answer phase after the intention distribution process. First, the custom database 201 is determined to determine whether the second query object exists according to the similarity algorithm. When the similarity between all preset query objects in the custom database 201 and the first query object is less than or equal to the preset similarity threshold, it is determined that the second query object does not exist in the custom database 201 (recall is not satisfied). Further, the first database 202 is determined to determine whether the second query object exists according to the similarity algorithm. When the similarity between all preset query objects in the first database 202 and the first query object is less than or equal to the preset similarity threshold, it is determined that the second query object does not exist in the first database 202 (recall is not satisfied). Then, the second query object can be determined from the second database 203 according to the similarity algorithm until the second query object is retrieved, and the reference query result of the second query object is determined as the target query result, or all databases are traversed. Among them, the question-and-answer system can be a RAG system, and the database can also be called a QA database.
[0052] In some embodiments, upon receiving the first query object, at least two preset databases are sequentially retrieved based on the first query object, including: upon receiving the first query object, at least two databases are sequentially retrieved according to the level order of the databases.
[0053] Exemplarily, when the question-answering system receives a first query object, at least two databases may be searched in order from high to low levels; wherein the degree of match between the query object in the database and the reference query result of the query object is positively correlated with the level of the database.
[0054] It should be noted that the matching degree between the query object in the database and the reference query result of the query object is used to indicate the matching degree between the preset query object and the reference query result.
[0055] Exemplarily, if the data in the database is customized and has been reviewed by the user, the preset query objects in the database have a high degree of match with the reference query results; if the database is created based on the operation information of the query results obtained by the question-answering system, the preset query objects in the database have a low degree of match with the reference query results. Another exemplary example is that if the database is created based on the operation information of the query results obtained by the question-answering system, the preset query objects in the database have a high degree of match with the reference query results; if the database is created based on the query results obtained by the question-answering system without any operation, the preset query objects in the database have a low degree of match with the reference query results.
[0056] In the disclosed embodiment, since the matching degree between the query object in the database and the reference query result of the query object is positively correlated with the level of the database, at least two databases are searched in order from high to low levels, and the database with a higher level is searched first, so that the probability of retrieving the second query object is higher, and the steps of invalid search can be reduced, thereby reducing the time consumption of the question-answering process and improving the efficiency of question-answering.
[0057] Exemplarily, the level of the custom database in the above embodiment is higher than that of the first database, and the level of the first database is higher than that of the second database. The second query object can be retrieved in sequence according to the level of each database.
[0058] In other embodiments, when the question-answering system receives the first query object, it may also search at least two databases in sequence from low to high levels or in a preset order, which is not specifically limited here.
[0059] In some embodiments, when the first query object is received, searching at least two preset databases in sequence based on the first query object includes:
[0060] Upon receiving the first query object, retrieving a customized database based on the first query object;
[0061] If the second query object is not found in the custom database, searching the first database based on the first query object; wherein the first database is created based on the operation information acting on the historical query results;
[0062] In the case that the second query object is not retrieved in the first database, the second database is retrieved based on the first query object; wherein the second database is created based on the historical query results.
[0063] It should be noted that the historical query results may be query results obtained based on the same question-answering system at historical moments.
[0064] The custom database may be a custom database, or may be referred to as a manually reviewed database (manually reviewed QA database). Exemplarily, the custom database may include question-answer pairs (preset query objects and reference query results) that are manually reviewed and confirmed by knowledge managers, i.e., experts, of the business department. In some embodiments, the confirmed preset query objects and reference query results may be entered into the custom database by manual import, wherein the custom database has the highest recall priority, i.e., the highest level.
[0065] The first database may be a database created based on the operation information of the historical query results obtained by the question-answering system, and may also be called a high-quality database (high-quality QA library), wherein the historical query results acted upon by the operation may be the query results obtained by the question-answering system at a historical moment. In the process of the user using the question-answering system, if the question-answering system obtains the query results, the query results may be displayed to the user through a page, and the user may operate the query results, and then determine whether to enter the query results into the first database based on the operation information. Among them, the operations acting on the query results may include at least one of the following: a like operation on the query results, a copy operation on the query results, a share operation on the query results, etc. Among them, the recall priority of the first database is lower than the recall priority of the custom database, that is, the level of the first database is lower than the level of the custom database.
[0066] The second database can be a database (cached QA library) created based on the historical query results obtained by the question-answering system, wherein the historical query results can be query results obtained by the question-answering system at historical moments and not operated by the user. In the process of the user using the question-answering system, if the question-answering system obtains the query results, the query results can be displayed to the user through a page. If the user neither adopts the query results nor denies the query results, the query results can be directly entered into the second database. It can be understood that the second database is to solve the problem of output stability, has strong timeliness, and also comes from the user side of the question-answering system. Exemplarily, the second database can be: a database obtained by storing query results that have recalled fragments for each query object and have not been clicked by the user. Among them, the recall priority of the second database is lower than the recall priority of the first database, that is, the level of the second database is lower than the level of the first database.
[0067] The failure to retrieve the second query object from the database based on the first query object may be understood as: the similarities between all query objects retrieved from the database based on the first query object and the first query object are lower than a set similarity threshold.
[0068] In the embodiment of the present disclosure, by setting three levels of databases, during the retrieval process, the second query object can be retrieved from the custom database first, and when the second query object does not exist in the custom database, the first database is searched, and when the second query object does not exist in the first database, the second database is searched. When the second query object is retrieved from any database, the retrieval is stopped.
[0069] By building a dynamically updated database with clear grading standards, we solve the problems of inaccurate and unstable answer output and time-consuming response caused by incomplete and inaccurate information retrieval or large model hallucination in current question-answering systems, thereby improving the ease of use and usability of the entire question-answering system.
[0070] Since the database pre-stores a question-answer pair consisting of a preset query object and a reference query result, when a preset query object whose similarity with the first query object is greater than a preset similarity threshold is determined, the preset query object can be determined as the second query object, and the reference query result corresponding to the preset query object can be determined as the reference query result of the second query object, and then the reference result of the second query object can be determined as the target query result, that is, the target query result can be the final query result for the first query object. After determining the target query result, the question-answering system can output the target query result.
[0071] In some embodiments, the method further includes: when the search of at least two databases is completed and the second query object is not retrieved, obtaining a target corpus from a preset corpus based on the first query object; and generating a target query result based on the target corpus.
[0072] like Figure 2 As shown, taking at least two databases including a custom database 201, a first database 202 and a second database 203 as an example, the second query object can be first retrieved from the custom database 201. If the second query object does not exist in the custom database 201, the first database 202 is retrieved. If the second query object does not exist in the first database 202 either, the second database 203 is continued to be retrieved. If the second query object does not exist in the second database 203 either, it is determined that the similarities between the preset query objects in all databases and the first query object are less than or equal to the preset similarity threshold, that is, the second query object is not retrieved.
[0073] In the disclosed embodiment, after searching at least two databases and failing to find the second query object, the retrieval question-answering process can be entered, the preset corpus is searched based on the first query object, the target corpus is obtained from the preset corpus, and the large model of the question-answering system generates the target query result based on the target corpus. The target corpus can be a document fragment recalled from the preset corpus (knowledge base) based on the first query object, which is used for the large model to analyze, and the target query result of the first query object is obtained based on the recalled document fragment.
[0074] Exemplarily: the first query object is: "What types of services are available in package A?".
[0075] First, you can search a custom database (for example, a manually reviewed QA library), and the preset query object (the most matching question) with the least similarity to the first query object determined from the custom database is "How to renew package A?", and the similarity to the first query object is less than or equal to the preset similarity threshold (has not reached the set value), indicating that the second query object (similar question) has not been retrieved; then you can search the first database (for example, a high-quality QA library), and the preset query object (the most matching question, i.e., the second query object) with the least similarity to the first query object determined from the first database is "What services does package A have?", and the similarity to the first query object is greater than the preset similarity threshold (meets the requirement), at this time, the reference query result (the answer saved in the high-quality QA library) "Package A includes XXXX" corresponding to the second query object in the first database can be directly returned, and the reference query result of the second query object is output as the target query result, and the question-and-answer process ends.
[0076] In other embodiments, if no question-answer pair about the service type of package A is found in all databases, relevant documents can be searched in the preset corpus, and the fragments (target corpus) recalled from the preset corpus can be sent to the large model for answering, so as to obtain the target query result (answer) "Package A includes XXXX".
[0077] In other embodiments, if documents related to Package A (target corpus) are retrieved in the preset corpus, and the user does not click on the target query result generated based on the target corpus, the first query object and the target query result can be recorded as a question-answer pair (QA) in the second database (cached QA library). If the user side is satisfied with the target query result "Package A includes XXXX" and performs at least one of the like operation, copy operation and share operation on the target query result, the target query result is considered to be an answer that meets the user's needs, and the first query object and the target query result can be recorded as a question-answer pair (QA) in the first database (high-quality QA library).
[0078] In the disclosed embodiment, a question-and-answer pair consisting of a query object and a reference query result can be cached by at least two preset databases. When the question-and-answer system receives the first query object, it can search the at least two databases in sequence. That is, when the second query object is not retrieved in one database, it will continue to search the next database.
[0079] Since the database pre-stores question-and-answer pairs consisting of query objects cached at historical moments and reference query results, by constructing a multi-level cache of at least two databases, multiple attempts are made to retrieve a second query object similar to the first query object based on at least two databases, and then the reference query result of the second query object is determined as the target query result.
[0080] On the one hand, compared with the related technology of recalling relevant content fragments through a knowledge base of a given source as the retrieval scope, and then giving the content fragments and query objects to the large model for outputting answers, it is possible to directly use the retrieved target query results as the final answer, reducing the time-consuming question-answering process; on the other hand, since the query objects and reference query results are pre-stored in the database, the accuracy and availability are known, and query results that meet user expectations can be retrieved.
[0081] If the second query object is not retrieved from the database, the retrieval question and answer process can be entered, the preset corpus can be retrieved based on the first query object, the target corpus can be obtained from the preset corpus, and the large model of the question and answer system generates the target query result based on the target corpus. Through the mutual cooperation of the database and the preset corpus, it is adapted to different application scenarios, and the target query result of the first query object can be obtained in different application scenarios, which can improve the flexibility and comprehensiveness of the question and answer system in processing question and answer statements.
[0082] The technical solution disclosed in the present invention, compared with entering the retrieval question and answer process based on the question and answer system, retrieves the preset corpus based on the first query object, obtains the target corpus from the preset corpus, and the large model of the question and answer system generates the target query result based on the target corpus, adds a multi-level cache database and the logic of preferentially recalling the query results from the multi-level cache database, prioritizes retrieval and recall from the multi-level cache database, and directly gives the retrieved answer to the user as the output result. If there is no match in the multi-level cache database, it will be output through the question and answer system.
[0083] In some embodiments, when the target query result is obtained, the method further includes:
[0084] Obtain operation information on target query results;
[0085] Determining an evaluation value of the target query result based on the operation information of the target query result;
[0086] Based on the evaluation value of the target query result, the first query object and the target query result are entered into at least two databases.
[0087] It should be noted that, when the target query result is obtained, the target query result can be displayed through a page, and whether there is a trigger operation acting on the target query result can be detected. When the trigger operation is detected, the operation information corresponding to the trigger operation can be detected, and then the evaluation value of the target query result is determined based on the operation information, and then based on the evaluation value of the target query result, the first query object and the target query result are entered into at least two databases. Among them, the trigger operation on the target query result can include at least one of the following: copy operation, like operation, share operation, and dislike operation.
[0088] In some embodiments, the evaluation value of the target query result is positively correlated with the level of the database in which the first query object and the target query result are entered. The larger the evaluation value of the target query result, the higher the level of the database in which the first query object and the target query result can be entered; the smaller the evaluation value of the target query result, the lower the level of the database in which the first query object and the target query result can be entered. The evaluation value may be a numerical value obtained by quantifying the operation information.
[0089] Exemplarily, an initial evaluation value can be initialized, and when a trigger operation of an adoption behavior is detected, the initial evaluation value can be increased, and when a trigger operation of a non-adoption behavior is detected, the initial evaluation value can be reduced. After the adjustment of the initial evaluation value is completed, the evaluation value of the query result can be obtained. The above is an example of a confirmation method for the evaluation value of the query result. As long as the evaluation value of the target query result can be positively correlated with the first query object and the level of the database into which the target query result is entered, they will not be listed one by one here.
[0090] For example, if it is determined based on the operation information that the user has adopted the target query result, it can be determined that the evaluation value of the target query result is high, and the first query object and the target query result can be entered into the first database. As for the storage rules, for answers for which the user has adopted behavior, both the question and the answer will be stored in the high-quality QA library. User adoption behavior includes at least one of the following: copying the answer, liking the answer, and sharing the answer.
[0091] For another example, if it is determined based on the operation information that the user does not approve the target query result, it can be determined that the evaluation value of the target query result is low, and the first query object and the target query result can be entered into the second database, or the first query object and the target query result can not be entered into the database.
[0092] In an embodiment of the present disclosure, when a target query result is obtained, operation information on the target query result can be obtained, an evaluation value of the target query result can be determined based on the operation information on the target query result, and based on the evaluation value of the target query result, the first query object and the target query result can be entered into at least two databases.
[0093] Through the user's operation information on the target query result, the first query object and the target query result are entered into the corresponding database, which can realize the dynamic update of the database. In addition to solving technical problems such as large model illusion and output stability in the question-answering system, the multi-level cache question database disclosed in this invention also helps solve business problems. For business scenarios where no standard database has been accumulated in the early stage, it can precipitate available high-quality question-answer pairs from the knowledge consumption process; for business scenarios where standard databases have been accumulated, dynamic updates can be realized, significantly reducing the manual maintenance costs of standard databases in the scenario of solving incremental knowledge updates.
[0094] In some embodiments, based on the evaluation value of the target query result, entering the first query object and the target query result into at least two databases includes:
[0095] When the evaluation value of the target query result is greater than the first threshold and an entry operation on the target query result is detected, the first query object and the target query result are entered into a first-level database;
[0096] When the evaluation value of the target query result is greater than a first threshold and no entry operation is detected, the first query object and the target query result are entered into a second-level database; wherein the second level is lower than the first level.
[0097] Here, when the evaluation value of the target query result is greater than the first threshold and an entry operation on the target query result is detected, the first query object and the target query result are entered into the first-level database. The first-level database may be the custom database in the above embodiment.
[0098] Exemplarily, the first-level database may be a manually reviewed database, and the data in the manually reviewed database are all confirmed by professionals (business experts), and the entry operation may be an operation triggered by the professionals after completing the review of the target query results. It should be noted that the data in the first-level database may come directly from the existing knowledge accumulation of the business department, and the data confirmed by professionals may be directly entered manually by the knowledge manager based on the entry operation. In other embodiments, the data in the first-level database may also be transferred from the data in the second-level database, and before transferring the data in the second-level database to the first-level database, it may be confirmed by professionals.
[0099] It should be noted that the second-level database may be the first database in the above embodiment. In the disclosed embodiment, when the evaluation value of the target query result is greater than the first threshold and no entry operation is detected, the first query object and the target query result are entered into the second-level database.
[0100] like Figure 2 As shown, if it is determined based on the operation information that the user has an adoption operation on the target query result, it can be determined that the evaluation value of the target query result is high, and the first query object and the target query result can be entered into the first database. Exemplarily, in terms of the warehousing rules, for answers for which the user has an adoption operation, both the question and the answer will be stored in the first database (high-quality QA library). The user's adoption operation includes at least one of the following: an operation of copying the answer, an operation of liking the answer, and an operation of sharing the answer. Of course, the adoption operation may also include other operations, as long as it can indicate the user's approval of the target query result.
[0101] In the disclosed embodiment, when the evaluation value of the target query result is greater than the first threshold and an entry operation on the target query result is detected, the first query object and the target query result are entered into the first-level database; when the evaluation value of the target query result is greater than the first threshold and no entry operation is detected, the first query object and the target query result are entered into the second-level database. When the evaluation value of the target query result is greater than the first threshold, based on whether an entry operation is detected, the first query object and the target query result are entered into the corresponding database, which can make the data in the database more in line with user needs.
[0102] In some embodiments, based on the evaluation value of the target query result, entering the first query object and the target query result into at least two databases includes:
[0103] When the evaluation value of the target query result is less than or equal to the first threshold and greater than the second threshold, the first query object and the target query result are entered into a database of a third level; wherein the third level is lower than the second level;
[0104] When the evaluation value of the target query result is less than or equal to the second threshold, the method further includes:
[0105] The second query object and the reference query result of the second query object are deleted from the database.
[0106] Exemplarily, if it is determined based on the operation information that the user does not approve the target query result, it can be determined that the evaluation value of the target query result is low, and the first query object and the target query result can be entered into the second database, or the first query object and the target query result can not be entered into the database. It should be noted that the first threshold is greater than the second threshold, and by setting thresholds of different sizes, the hierarchical entry of the target query results can be achieved, thereby improving the accuracy of the database.
[0107] If it is determined based on the operation information that the user has not performed an adoption operation on the target query result, it can be determined that the evaluation value of the target query result is low, and the first query object and the target query result can be entered into the second database. Exemplarily, with respect to the storage rule, for answers for which the user has no adoption operation, both the question and the answer will be stored in the second database (cached QA library).
[0108] In some embodiments, when it is determined that the user has not performed an adoption operation on the target query result and has not performed a negative operation (e.g., a step-on operation) on the target query result, the first query object and the target query result may be entered into the second database. It should be noted that the second database is time-sensitive and can be entered and updated through an automated program without manual intervention.
[0109] In some embodiments, when the target query result is generated based on the target corpus recalled from the preset corpus by the first query object, if the user does not perform a negative operation on the target query result, the first query object and the target query result can be entered into the second database. Exemplarily, with respect to the storage rules, all questions with recalled document fragments and the user not clicking on the answer are stored in the third cache database (cached QA library). Since the answers of the question-and-answer system are often based on questions and recalled document fragments, and the retrieval recall is controlled by the retrieval system, the recall layer is often relatively stable, and if there is no obvious clicking behavior, it is considered that the answer can be cached. By setting up a second database, the stability of the question-and-answer system can be improved.
[0110] In other embodiments, when the evaluation value of the target query result is less than or equal to the second threshold, the second query object and the reference query result of the second query object can be deleted from the database. Exemplarily, when a negative operation on the target query result is detected, the evaluation value of the determined target query result is low. At this time, the evaluation value of the target query result is compared with the second threshold. If the evaluation value of the target query result is less than or equal to the second threshold, it is determined that the user does not approve the target query result. At this time, the second query object and the reference query result of the second query object can be deleted from the database to reduce the probability of retrieving an invalid answer next time.
[0111] In some embodiments, the method further comprises at least one of the following:
[0112] Determine an evaluation value of the reference query result based on the number of times the reference query result is used and operation information on the reference query result in the database, and update the database based on the evaluation value of the reference query result;
[0113] When a preset period is reached, the database is updated based on the query results obtained within the preset period;
[0114] Based on the update operation on the database, the database is updated.
[0115] It should be noted that the evaluation value can be used to indicate the adoption rate of the reference query results, which can also be called the answer adopted ratio (AAR), which is used to measure the question-answering effect of the question-answering system and the user's recognition of the query results, and can be determined based on the proportion of query results adopted.
[0116] In some embodiments, the number of times the query result is used may be determined based on the number of times the query result is displayed. For example, the number of times the query result is displayed may be determined as the number of times the query result is used. In other embodiments, the number of times the query result is generated may be determined based on the number of times the query result is generated. For example, the number of times the query result is generated may be determined as the number of times the query result is used. This is not specifically limited herein.
[0117] In the process of using the question-answering system, if the user is satisfied with a query result, the user can perform an adoption operation on the query result; wherein the user's adoption operation on the query result may include at least one of the following: a copy operation on the query result, a like operation on the query result, and a share operation on the query result. If the user is not satisfied with a query result, the user can perform a negation operation on the query result; wherein the user's negation operation on the query result may include at least one of the following: a step-on operation on the query result, a stop display operation on the query result, and a cancel display operation on the query result. Exemplarily, the evaluation value may include: the proportion of users performing adoption operations when the query result is displayed to the user multiple times.
[0118] In a multi-level cache recall system, a reference query result in the database may be displayed multiple times, and during the multiple displays, it may not be adopted by the user every time. In the embodiment of the present disclosure, the evaluation value of the reference query result can be determined based on the number of times the reference query result in the database is used and the operation information on the reference query result. The present disclosure grades the question-answer pairs (reference query results and query objects corresponding to the reference query results) in the database by introducing evaluation values, and determines the availability of the reference query results based on the evaluation values, and then indicates the value and availability of the reference query results based on the relevant records of user adoption behavior. In some embodiments, the evaluation value can be a value between [0, 1]. The calculation formula of the evaluation value can be as follows:
[0119] A=A1*A2(1);
[0120] In formula (1), A represents the evaluation value, A1 represents the proportion of query results that are adopted, and A2 represents the ratio of the proportion of query results that are copied to the number of times the query results are adopted.
[0121]
[0122] In formula (2), A1 represents the proportion of the query results that are adopted, c represents the number of times the query results are adopted, and m represents the number of times the query results are used.
[0123]
[0124] In formula (3), A2 represents the ratio of the percentage of the query results that are copied to the number of times the query results are adopted, c represents the number of times the query results are adopted, and k represents the percentage of the query results that are copied, where k = k1 + k2 + k3 + k4 ... + k n , k1 to k n They represent the percentage of the query results that are copied at a single time, and n represents the total number of times the query results are copied.
[0125] Based on formulas (1) to (3), it can be determined that:
[0126]
[0127] In formula (4), A represents the evaluation value, k represents the proportion of the query results that are copied, and m represents the number of times the query results are used.
[0128] In some embodiments, m may also represent the number of times the query result is triggered to be recalled. k represents the proportion of the content that is copied when the user adopts (copies / likes / shares) the query result in the number of times it is recalled.
[0129] Exemplarily, if the answer is not liked or shared, but only copied, k≤1; when it is both liked or shared and copied, k=1; when the answer is liked or shared but not copied, k=1; when the same reference query result contains multiple copies, the proportion of the content of each copy is added together, and when the total k>1, k=1.
[0130] For example, there is a question-answer pair in the first database (high-quality QA) as follows:
[0131] Q: What is the amount of accommodation reimbursement? (Query object).
[0132] A: XXXXXXXXX (refer to query results).
[0133] Users A, B, and C all asked similar questions and hit the question-answer pair. User A thought the answer was correct and liked it, but user B did not like it and only copied a section of it, accounting for 30% of the total word count of the answer. User C neither liked it nor copied it. Therefore, the QA pair was displayed 3 times, and the percentage of single citation copies was 100%, 30%, and 0% respectively. The evaluation value (AAR) of the question-answer pair (including the reference query result) was 0.433, which is relatively high.
[0134] In some embodiments, the evaluation value can also be used to indicate the quality of the question-answer pair in which the query result is located, so as to facilitate the synchronous processing of the query result and the query object corresponding to the query result. For example, based on the evaluation value of each query result in the database, the knowledge manager can view which related questions are high-frequency and which questions have received good answers in the entire database, so as to better conduct regular inspections of the entire knowledge consumption process.
[0135] For question-answer pairs with relatively low evaluation values, if there is no need to continue saving them, they can be eliminated by setting a third threshold. For example, when a query result with an evaluation value lower than the third threshold is determined, the query result and the corresponding query object can be deleted from the database. Dynamically updating the database through evaluation values can maintain the accuracy and availability of the database.
[0136] In some embodiments, any database may be updated based on the evaluation value. For example, the first database may be updated based on the evaluation value.
[0137] In some embodiments, the database can be updated based on an update operation on the database, that is, the update of the database can be implemented manually. In the process of using the question-and-answer system, it can be detected first whether there is a negative operation performed on the reference query result. If there is a negative operation, it may be because the reference query result has been updated but the database has not been updated in time. At this time, the database can be updated based on the update operation.
[0138] For example, if a negative operation on the reference query result is detected, and the number of times the negative operation is performed reaches a preset threshold or the evaluation value is lower than a third threshold, the use of the reference query result can be stopped, and the reference query result that needs to be updated can be transferred to the processing area and confirmed, modified and re-entered into the warehouse by professionals based on the update operation.
[0139] Taking the case where the database is a custom database (a manually reviewed QA library), if a reference query result in the custom database is repeatedly clicked on, it may be because the knowledge has been updated but the custom database has not been updated in time. When the number of clicks reaches the set indicator, or the evaluation value of the reference query result is lower than the third threshold, the reference query result is deactivated and enters the pending area. Professionals will confirm, modify and re-enter the reference query result that needs to be updated based on the update operation.
[0140] It should be noted that the question-answer pairs in the custom database can be manually confirmed when they are put into the database, and the evaluation value of the question-answer pairs (including query results) after being put into the database can be defaulted to 1. Exemplarily, the confirmation operation can be manually performed by the administrator or knowledge expert of the question-answer system, such as batch importing some high-quality question-answer pairs according to a preset cycle. It can be understood that the question-answer pairs in the custom database need to go through the "review-confirmation" process, and the review and confirmation process of the question-answer pairs in the custom database can be distinguished from the adoption operation of the query results.
[0141] Taking the database as the first database (high-quality QA database) as an example, when the user expresses disapproval of the reference query result in the first database, the reference query result is eliminated. Exemplarily, the reference query result may be directly eliminated when it is clicked N times (N is an experience value, and a specific value may be selected after multiple evaluations), or when the evaluation value of the reference query result is lower than the third threshold, the reference query result is eliminated.
[0142] For example, user A asks "Where is the subscription entry for enterprise package X?" At this time, an answer is given, and user A thinks the answer is accurate, so he likes it, and the query result is stored in the first database. However, after a period of time, the relevant knowledge of package X is adjusted. Users B and C ask related questions and find that the original answer is no longer applicable, so they like it. If the query result is liked twice in a row, the query result is disabled. At this time, this query result can be directly eliminated or entered into the manual processing area for expert confirmation.
[0143] Taking the database as the second database (cached QA library) as an example, when the preset period is reached, the database can be updated based on the query results obtained by the question and answer system within the preset period. For example, a period of 14 days or 7 days is set as a cycle to update the second database. The preset period can be determined after multiple evaluations based on specific indicators such as question and answer request data and document volume. For example, the more question and answer request data and the larger the document volume, the larger the number of reference query results accumulated after a period of time. Therefore, the preset period can be shortened for system performance considerations.
[0144] In some embodiments, the preset period may also be dynamically updated based on the number of reference query results cached in the database. Exemplarily, the number of reference query results cached in the database may be negatively correlated with the preset period. The more reference query results cached in the database, the shorter the preset period; the fewer reference query results cached in the database, the longer the preset period.
[0145] It should be noted that the different methods of updating a database disclosed in the present invention can be used separately for any type of database, or the various update methods mentioned above can be used in combination for any database. The above is an example description of the application of the update method to the database, and in actual use, it can be adjusted according to user needs, and they are not listed here one by one.
[0146] In other embodiments, in different business scenarios, in order to achieve better response performance and avoid the database being too large, the number of query results in the database can be controlled by adding different update methods. As business knowledge is updated, some query results may no longer be applicable. By setting different update methods to achieve dynamic updates of the database, the availability, stability and real-time performance of the database can be maintained.
[0147] In some embodiments, the database is updated based on the evaluation value of the reference query result, including: when the level of the database where the reference query result is currently located and the degree of match between the evaluation value of the reference query result are less than a preset matching threshold, the reference query result and the query object of the reference query result are updated to a database whose level matches the evaluation value of the reference query result; wherein the evaluation value of the reference query result and the level of the database are positively correlated.
[0148] It should be noted that the matching degree between the level of the database where the reference query result currently resides and the evaluation value of the reference query result can be used to indicate the corresponding relationship between the database where the reference query result currently resides and the evaluation value of the reference query result.
[0149] Exemplarily, reference query results with evaluation values greater than or equal to 0.4 can be cached to the first-level database; reference query results with evaluation values greater than or equal to 0.2 can be cached to the second-level database; reference query results with evaluation values greater than or equal to 0 can be cached to the third-level database. If the level of the database where the reference query result is currently located is the third level, and the evaluation value of the reference query result is 0.3, then the matching degree between the level of the database where the reference query result is currently located and the evaluation value is 0, and at this time, the reference query result can be updated from the third-level database to the second-level database.
[0150] like Figure 3As shown, in the case where the reference query result exists in both the first database 202 and the second database 203, the reference query result can be updated to the first database 202, and the reference query result can be processed based on the update rule of the first database 202. Exemplarily, if a reference query result in the second database 203 is adopted by the user, the reference query result can be updated to the first database 202.
[0151] It should be noted that the first-level database may be a custom database, the second-level database may be the first database, and the third-level database may be the second database. The level of the custom database is higher than that of the first database, and the level of the first database is higher than that of the second database.
[0152] In some embodiments, when updating the reference query results in each database, the reference query results in the low-level database can be updated to the high-level database. Exemplarily, the reference query results in the second database are updated to the first database.
[0153] In other embodiments, each database can be independent of each other, and during use, each database can be updated based on different storage rules and elimination rules. Exemplarily, after a query result obtained after a user asks a question is adopted, it can be stored in the first database. Subsequently, many users adopt this query result. The evaluation value of this query result is very high, such as reaching 1. If there is no active review step, this query result will continue to remain in the first database. However, if a query result is displayed many times but is not adopted, resulting in a very low evaluation value of this query result, such as the evaluation value of this query result is 0.2, then this query result can be eliminated from the first database. In the embodiment of the present disclosure, when the level of the database where the reference query result is currently located and the evaluation value of the reference query result match less than the preset matching threshold, the reference query result and the query object of the reference query result are updated to a database whose level matches the evaluation value of the reference query result, so that the query objects and query results in each database can be dynamically adjusted.
[0154] In some embodiments, when the target query result is obtained, the method further includes: displaying the target query result and / or historical operation information for the target query result.
[0155] In the embodiment of the present disclosure, when a target query result is obtained, the target query result and / or historical operation information for the target query result may be displayed. When the target query result is determined from a database, there may be operations performed by other users on the target query result. When the target query result is displayed, the historical operation information of the target query result may be displayed so that the user can understand the relevant information of the target query result.
[0156] In other embodiments, when the target query result is obtained, the group to which the user who initiated the first query object belongs can be determined, and the target query result and historical operation information of the target query result by users in the same group as the user can be displayed. The group can refer to the business department, team or group to which the user belongs.
[0157] For example, a multi-level cache recall solution can be isolated within the same team or group. All query results and question-answer pairs consisting of query objects are visible to all users in the same team or group.
[0158] For example, user A asks "How to renew package B" and confirms that the target query result is complete and accurate, so he likes the target query result. Based on the above embodiment, it can be seen that the first query object and the target query result will be recorded in the first database. When user B asks a similar question, the answer to how to renew package B will be directly displayed to user B, and the front-end page will display user A's like operation. Therefore, managers of the same business only need to maintain a dynamically updated database to implement all knowledge management actions for the scenario.
[0159] In other embodiments, the query results (answers) confirmed by professionals (business experts) are displayed to new users, and the historical adoption records of the query results are displayed on the front end, which also reduces the communication costs within the business department. On the one hand, it solves the question-and-answer needs in real business scenarios within the business department and improves the response efficiency; on the other hand, databases with high and low levels can also be converted into knowledge accumulation of the business department and have the potential to be converted into digital assets of the enterprise.
[0160] In other embodiments, the data processing method of the present disclosure can be applied to different question-and-answer products, including but not limited to: intelligent question-and-answer, enterprise intelligent assistant, intelligent presentation document, intelligent writing assistant, etc. For business scenarios with high requirements for answer stability and low tolerance for answer accuracy, such as customer service question-and-answer, administrative personnel question-and-answer, sales knowledge question-and-answer, etc., the accuracy of question-and-answer results can be improved.
[0161] The multi-level cache database disclosed in the present invention can provide feedback from the knowledge consumption side to form a closed loop of knowledge production and consumption, that is, the question and answer pairs in the question and answer data will be dynamically added and removed in the question and answer system along with the update of documents and the update of knowledge itself. In addition, the present invention precipitates a batch of question and answer pairs with different hierarchical levels through evaluation values, which helps knowledge managers to conduct further analysis and optimization, understand which are high-frequency questions and popular questions, so as to improve the effect of the entire question and answer system, and the database with high and low levels can also be converted into knowledge precipitation for business departments.
[0162] Figure 4 FIG. 1 is a block diagram of a data processing device according to an exemplary embodiment. Figure 4 As shown, the device 400 mainly includes:
[0163] A search module 401 is configured to search at least two preset databases in sequence based on a first query object when a first query object is received;
[0164] A first acquisition module 402 is configured to, when a second query object having a similarity with the first query object greater than a preset similarity threshold is retrieved, acquire a reference query result of the second query object from a database where the second query object is located;
[0165] The first determining module 403 is configured to determine the reference query result of the second query object as a target query result.
[0166] In some embodiments, the retrieval module 401 is configured to:
[0167] Upon receiving the first query object, searching the at least two databases in sequence according to the level order of the databases;
[0168] The matching degree between the query object in the database and the reference query result of the query object is positively correlated with the level of the database.
[0169] In some embodiments, the retrieval module 401 is configured to:
[0170] Upon receiving the first query object, retrieving a customized database based on the first query object;
[0171] If the second query object is not found in the custom database, searching a first database based on the first query object; wherein the first database is created based on operation information acting on the obtained historical query results;
[0172] If the second query object is not found in the first database, a second database is searched based on the first query object; wherein the second database is created based on the obtained historical query results.
[0173] In some embodiments, the apparatus 400 further includes:
[0174] A second acquisition module is configured to acquire a target corpus from a preset corpus based on the first query object when the search of the at least two databases is completed and the second query object is not retrieved;
[0175] The generating module is configured to generate the target query result based on the target corpus.
[0176] In some embodiments, when the target query result is obtained, the device 400 further includes:
[0177] A third acquisition module is configured to acquire operation information on the target query result;
[0178] A second determination module is configured to determine an evaluation value of the target query result based on the operation information of the target query result;
[0179] An entry module is configured to enter the first query object and the target query result into the at least two databases based on the evaluation value of the target query result.
[0180] In some embodiments, the input module is configured to:
[0181] When the evaluation value of the target query result is greater than a first threshold and an entry operation on the target query result is detected, entering the first query object and the target query result into the database of the first level;
[0182] When the evaluation value of the target query result is greater than the first threshold and the entry operation is not detected, the first query object and the target query result are entered into the database of the second level; wherein the second level is lower than the first level.
[0183] In some embodiments, the input module is configured to:
[0184] When the evaluation value of the target query result is less than or equal to the first threshold and greater than the second threshold, the first query object and the target query result are entered into the database of the third level; wherein the third level is lower than the second level;
[0185] When the evaluation value of the target query result is less than or equal to the second threshold, the device further includes:
[0186] The second query object and the reference query result of the second query object are deleted from the database.
[0187] In some embodiments, the apparatus 400 further includes at least one of the following:
[0188] A first updating module is configured to determine an evaluation value of the reference query result based on the number of times the reference query result in the database is used and operation information on the reference query result, and update the database based on the evaluation value of the reference query result;
[0189] A second updating module is configured to update the database based on the query results obtained within the preset period when the preset period is reached;
[0190] The third updating module is configured to update the database based on the updating operation on the database.
[0191] In some embodiments, the first update module is configured to:
[0192] When the degree of match between the level of the database where the reference query result is currently located and the evaluation value of the reference query result is less than a preset matching degree threshold, the reference query result and the query object of the reference query result are updated to the database whose level matches the evaluation value of the reference query result.
[0193] In some embodiments, when the target query result is obtained, the device 400 further includes:
[0194] The display module is configured to display the target query result and / or historical operation information for the target query result.
[0195] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0196] Based on the same inventive concept, an embodiment of the present disclosure further provides an electronic device, which may be a computer or a terminal in one or more of the above embodiments.
[0197] Figure 5 FIG. 1 is a schematic diagram showing the structure of an electronic device according to an exemplary embodiment. Figure 5As shown, the electronic device 500 adopts general computer hardware and includes a processor 501 , a memory 502 , a bus 503 , an input device 504 , and an output device 505 .
[0198] In some possible implementations, the memory 502 may include computer storage media in the form of volatile and / or non-volatile memory, such as read-only memory and / or random access memory. The memory 502 may store an operating system, application programs, other program modules, executable code, program data, user data, etc.
[0199] Input device 504 can be used to input commands and information to the electronic device, such as a keyboard or a pointing device, such as a mouse, trackball, touchpad, microphone, joystick, game pad, satellite TV antenna, scanner or similar device. Input device 504 can be connected to processor 501 via bus 503.
[0200] The output device 505 can be used to output information to the electronic device 500 . In addition to the monitor, the output device 505 can also be other peripheral output devices, such as a speaker and / or a printing device. The output device 505 can also be connected to the processor 501 through the bus 503 .
[0201] The electronic device 500 may be connected to a network, such as a local area network (LAN), via an antenna 506. In a networked environment, executable instructions may be stored in a remote storage device, rather than being limited to local storage.
[0202] When the processor 501 in the electronic device 500 executes the executable code or application stored in the memory 502, the electronic device 500 can implement the image processing method in the above embodiments. The specific execution process refers to the above embodiments and will not be repeated here.
[0203] The memory 502 may store information for implementing Figure 4 The executable instructions of the functions of the retrieval module 401, the first acquisition module 402 and the first determination module 403 in the embodiment of the present invention. Figure 4 The functions / implementation processes of the retrieval module 401, the first acquisition module 402 and the first determination module 403 can be realized by Figure 5 The processor 501 in the embodiment calls the executable instructions stored in the memory 502 to implement the above-mentioned implementation process and functions.
[0204] Based on the same inventive concept, the embodiment of the present disclosure further provides a storage medium. The storage medium stores instructions. When the instructions are executed on a computer, the instructions are used to execute the data processing method in one or more of the above embodiments.
[0205] Based on the same inventive concept, the embodiments of the present disclosure further provide a computer program or a computer program product. When the computer program product is executed on a computer, the computer implements the data processing method in one or more of the above embodiments.
[0206] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0207] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data processing method, characterized in that: include: When a first query object is received, searching at least two preset databases in sequence based on the first query object; When a second query object having a similarity with the first query object greater than a preset similarity threshold is retrieved, obtaining a reference query result of the second query object from a database where the second query object is located; The reference query result of the second query object is determined as the target query result.
2. The method according to claim 1, characterized in that The step of sequentially searching at least two preset databases based on the first query object upon receiving the first query object includes: When the first query object is received, the at least two databases are searched in sequence according to the level order of the databases.
3. The method according to claim 1, characterized in that The step of sequentially searching at least two preset databases based on the first query object upon receiving the first query object includes: Upon receiving the first query object, searching a custom database based on the first query object; If the second query object is not found in the custom database, searching a first database based on the first query object; wherein the first database is created based on operation information acting on historical query results; If the second query object is not found in the first database, a second database is searched based on the first query object; wherein the second database is created based on historical query results.
4. The method according to claim 1, characterized in that: The method further comprises: When the search of the at least two databases is completed and the second query object is not found, acquiring a target corpus from a preset corpus based on the first query object; Based on the target corpus, the target query result is generated.
5. The method according to any one of claims 1 to 4, characterized in that: When the target query result is obtained, the method further includes: Obtaining operation information on the target query result; Determining an evaluation value of the target query result based on the operation information of the target query result; Based on the evaluation value of the target query result, the first query object and the target query result are entered into the at least two databases.
6. The method according to claim 5, characterized in that The step of entering the first query object and the target query result into the at least two databases based on the evaluation value of the target query result comprises: When the evaluation value of the target query result is greater than a first threshold and an entry operation on the target query result is detected, entering the first query object and the target query result into the database of the first level; When the evaluation value of the target query result is greater than the first threshold and the entry operation is not detected, the first query object and the target query result are entered into the database of the second level; wherein the second level is lower than the first level.
7. The method according to claim 6, characterized in that The step of entering the first query object and the target query result into the at least two databases based on the evaluation value of the target query result comprises: When the evaluation value of the target query result is less than or equal to the first threshold and greater than the second threshold, the first query object and the target query result are entered into the database of the third level; wherein the third level is lower than the second level; When the evaluation value of the target query result is less than or equal to the second threshold, the method further includes: The second query object and the reference query result of the second query object are deleted from the database.
8. The method according to any one of claims 1 to 4, characterized in that: The method further comprises at least one of the following: Determine an evaluation value of the reference query result based on the number of times the reference query result in the database is used and operation information on the reference query result, and update the database based on the evaluation value of the reference query result; When a preset period is reached, updating the database based on the query results obtained within the preset period; Based on the update operation on the database, the database is updated.
9. The method according to claim 8, characterized in that The updating of the database based on the evaluation value of the reference query result comprises: When the matching degree between the level of the database where the reference query result is currently located and the evaluation value of the reference query result is less than a preset matching degree threshold, the reference query result and the query object of the reference query result are updated to the database whose level matches the evaluation value of the reference query result.
10. The method according to any one of claims 1 to 4, characterized in that: When the target query result is obtained, the method further includes: The target query result and / or historical operation information for the target query result are displayed.
11. A data processing device, characterized in that: include: A retrieval module, configured to, upon receiving a first query object, sequentially search at least two preset databases based on the first query object; A first acquisition module is configured to, when a second query object having a similarity with the first query object greater than a preset similarity threshold is retrieved, acquire a reference query result of the second query object from a database where the second query object is located; The first determining module is configured to determine the reference query result of the second query object as the target query result.
12. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.