Data processing method and device, medium, equipment and computer program product

By representing the knowledge in the knowledge database as structured data and matching it with the search data, the problem of low knowledge retrieval efficiency and accuracy is solved, the accuracy and efficiency of knowledge recall is improved, and the large language model is provided with better Data support.

CN118964428APending Publication Date: 2024-11-15BEIJING YOUZHUJU NETWORK TECH CO LTD

Patent Information

Application Number
CN202411206336.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the prior art, the low efficiency and accuracy of knowledge retrieval has affected the efficiency and accuracy of answers of large language models. Especially under the RAG architecture, the retrieved knowledge recall efficiency and accuracy are insufficient.

Method used

By representing the knowledge in the knowledge database as structured data, using structured data to match the search data, obtain candidate question data and candidate answer data, thereby generating target search results, reducing data processing volume, and improving matching accuracy and comprehensiveness .

Benefits of technology

It improves the accuracy and efficiency of recall in the knowledge retrieval process, provides effective data support for subsequent data analysis, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964428A_ABST
    Figure CN118964428A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, a medium, equipment and a computer program product. The method comprises the following steps: receiving retrieval data; matching is carried out according to the retrieval data and structured data in a knowledge database, candidate question data and candidate answer data are obtained, knowledge in the knowledge database is expressed through the structured data, and candidate question data and candidate answer data are obtained; each piece of structured data comprises one piece of answer data and at least one piece of question data corresponding to the answer data; and according to the candidate question data and the candidate answer data, generating a target retrieval result corresponding to the retrieval data. Therefore, the knowledge in the knowledge database is expressed through the structured data, so that the corresponding knowledge can be obtained through the matching problem in the knowledge retrieval process, the data volume needing to be matched is effectively reduced, the data processing efficiency is improved, and the recall accuracy and efficiency of the knowledge in the knowledge retrieval process are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a data processing method, apparatus, medium, device and computer program product. Background Art

[0002] With the development of computer technology, users can interact with large language models to retrieve the knowledge they need. In related technologies, the RAG (Retrieval Augmented Generation) architecture retrieves relevant knowledge and then integrates the retrieved knowledge into the large language model so that it can refer to the corresponding knowledge and give a reasonable answer based on the user's input. The efficiency and accuracy of knowledge recall will seriously affect the efficiency and accuracy of the model's answer. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a data processing method, the method comprising: receiving the retrieved data; According to the search data, candidate question data and candidate answer data are obtained by matching the search data with structured data in a knowledge database, wherein the knowledge in the knowledge database is represented by the structured data, and each structured data includes an answer data and at least one question data corresponding to the answer data; Generate a target search result corresponding to the search data based on the candidate question data and the candidate answer data.

[0005] In a second aspect, the present disclosure provides a data processing device, the device comprising: A receiving module, used for receiving the search data; A matching module, configured to match the search data with structured data in a knowledge database to obtain candidate question data and candidate answer data, wherein the knowledge in the knowledge database is represented by the structured data, and each structured data includes an answer data and at least one question data corresponding to the answer data; A generation module is used to generate a target search result corresponding to the search data based on the candidate question data and the candidate answer data.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processing device.

[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0009] In the above technical solution, the knowledge in the knowledge database is represented by structured data, so that the corresponding knowledge can be obtained by matching questions in the process of knowledge retrieval, effectively reducing the amount of data that needs to be matched, thereby improving data processing efficiency. In addition, the structured data contains answer data and at least one question data to ensure the matching of the retrieval data and the question data, improve the accuracy of the matched question data, and at the same time, to a certain extent, ensure the comprehensiveness of the matched question data, thereby ensuring the accuracy of the obtained candidate answer data. This can effectively improve the recall accuracy and efficiency of knowledge in the knowledge retrieval process, and provide effective data support for subsequent data analysis based on the target retrieval results.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 It is a flowchart of a data processing method provided according to an embodiment of the present disclosure.

[0012] Figure 2 It is a schematic diagram of an interactive interface provided based on an embodiment of the present disclosure.

[0013] Figure 3 It is a block diagram of a data processing device provided according to an embodiment of the present disclosure.

[0014] Figure 4 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0016] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0017] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0018] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0019] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0021] 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.

[0022] 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.

[0023] 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.

[0024] 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.

[0025] At the same time, 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.

[0026] Figure 1 As shown, it is a flow chart of a data processing method provided based on an embodiment of the present disclosure. Figure 1 As shown, the method may include: In step 11, retrieval data is received, wherein the retrieval data refers to data input by a user for retrieval, for example, the retrieval data may be input text data, or input voice data, etc.

[0027] In step 12, candidate question data and candidate answer data are obtained by matching the search data with the structured data in the knowledge database.

[0028] The knowledge in the knowledge database is represented by the structured data, which can effectively improve the quality of the knowledge in the knowledge database, so as to improve the retrieval efficiency of the knowledge. Accordingly, each structured data contains an answer data and at least one question data corresponding to the answer data. For example, each knowledge is represented by a structured data, the structured data contains the answer data corresponding to the knowledge, and the structured data also contains at least one question for retrieving the knowledge. For example, the answer data for explaining AI may contain the following question data: Question 1: What is AI?; Question 2: What is AI?; Question 3: What can AI do? This means that when searching based on any of the above questions 1-3, the answer data can be fed back as a search result.

[0029] Therefore, in this step, when searching from the knowledge database based on the search data, there is no need to match the search data with the corpus in the knowledge database. By matching with the question data, the data processing volume is effectively reduced, thereby improving data retrieval efficiency.

[0030] In step 13, a target search result corresponding to the search data is generated based on the candidate question data and the candidate answer data.

[0031] As an example, the retrieved candidate question data and candidate answer data can be used as the target retrieval results. For example, the retrieved candidate question data and candidate answer data can be displayed to the user as the target retrieval results. The user can then select the question he or she needs from the candidate question data based on his or her retrieval needs, and then the answer corresponding to the selected question can be displayed, thereby improving the efficiency of data retrieval.

[0032] In the above technical solution, the knowledge in the knowledge database is represented by structured data, so that the corresponding knowledge can be obtained by matching questions in the process of knowledge retrieval, effectively reducing the amount of data that needs to be matched, thereby improving data processing efficiency. In addition, the structured data contains answer data and at least one question data to ensure the matching of the retrieval data and the question data, improve the accuracy of the matched question data, and at the same time, to a certain extent, ensure the comprehensiveness of the matched question data, thereby ensuring the accuracy of the obtained candidate answer data. This can effectively improve the recall accuracy and efficiency of knowledge in the knowledge retrieval process, and provide effective data support for subsequent data analysis based on the target retrieval results.

[0033] In a possible embodiment, matching the search data with structured data in a knowledge database to obtain candidate question data and candidate answer data may include: The search data is preprocessed to obtain processed search data.

[0034] Among them, the preprocessing may include synonym replacement, removal of non-text elements, text segmentation, filtering of stop words, etc., which can be configured based on the needs of the actual application scenario. For example, stop words in the retrieval data can be deleted to perform text standardization, and then a vectorized representation corresponding to the standard text is generated, and the vectorized representation is used as the processed retrieval data.

[0035] Afterwards, the processed retrieval data is matched with the question data in the structured data, the matched question data is used as the candidate question data, and the answer data corresponding to the candidate question data is used as the candidate answer data.

[0036] As an example, vector calculations can be performed based on the vectorized representations corresponding to the processing retrieval data and the question data, respectively. When the meanings of the two question representations are similar, their representations in the vector space are similar. For example, the cosine similarity between the two vectors can be determined as the matching degree. The greater the similarity, the higher the matching degree. For example, when it is determined that the similarity between the vectors is less than a preset threshold, it can be considered that the processing retrieval data and the question data match, so that the candidate question data that matches the retrieval data can be quickly determined from the knowledge database. Furthermore, the answer data corresponding to the candidate retrieval question can be used as candidate answer data to generate data for answering the retrieval data.

[0037] Therefore, through the above technical solution, when recalling knowledge in the knowledge database, the search data can be directly matched with the question data, effectively reducing the amount of data processing and improving the efficiency of data processing. In addition, the recall rate of knowledge can be improved through the symmetric matching of question matching, providing comprehensive data support for determining the target search results.

[0038] In a possible embodiment, generating a target search result corresponding to the search data according to the candidate question data and the candidate answer data may include: Obtaining the degree of match between each candidate question data and the search data. The method for determining the degree of match has been described in detail above and will not be repeated here.

[0039] Afterwards, if there is a matching degree greater than a preset threshold, the candidate answer data corresponding to the candidate question data with the highest matching degree is determined as the target retrieval result.

[0040] Among them, the preset threshold can be set based on the actual application scenario, and the present disclosure does not limit this. If the matching degree between the retrieval data and a question data is greater than the preset threshold, it can be considered that the retrieval data and the question data are consistent. Therefore, in this scenario, the candidate answer data corresponding to the candidate question data with the highest matching degree is determined as the target retrieval result, thereby determining the most matching question therefrom, and directly using the answer data in the knowledge database as feedback for the retrieval data.

[0041] Therefore, by matching the search data with the question data, the amount of data processing can be effectively reduced on the one hand, and the accuracy and effectiveness of the search recall data can be guaranteed on the other hand. After determining the matching question, the answer data corresponding to the question can be directly used as the search result, thereby effectively improving the accuracy and determination efficiency of the search results, improving the search efficiency of knowledge in the knowledge database, and responding to users in a timely manner, improving the user experience.

[0042] In another possible embodiment, generating a target search result corresponding to the search data according to the candidate question data and the candidate answer data may include: Obtaining the degree of match between each candidate question data and the search data. The determination method has been described in detail above.

[0043] If there is no match greater than a preset threshold, a prompt text is constructed according to the candidate question data, the candidate answer data and the retrieval data to generate the target retrieval result based on the prompt text and the retrieval model.

[0044] If there is no match greater than the preset threshold, it means that the question consistent with the retrieval data has not been recalled in the knowledge database. In this scenario, it is difficult to ensure the consistency between the retrieval results and the retrieval data when the candidate answer data is directly fed back as the retrieval result. In this embodiment, the recalled candidate question data, the candidate answer data and the retrieval data can be combined for further data processing to obtain the target retrieval result.

[0045] As an example, the prompt text can be constructed based on the prompt project. For example, a template of the prompt text can be pre-set. After determining the candidate question data, candidate answer data and search data, the above data can be spliced ​​based on the template to obtain the prompt text. For example, please combine the following questions and answers {candidate question data 1, candidate answer data 1}, {candidate question data 2, candidate answer data 2}... to summarize the answer to the following question {search data}, then the above information can be spliced ​​to the corresponding position in sequence to obtain the prompt text.

[0046] Afterwards, the prompt text can be input into the retrieval model to analyze and summarize the data in the prompt text based on the retrieval model to obtain the target retrieval result. Wherein, the retrieval model can be implemented based on a common large language model in the art, and in this step, the prompt text can be input into the large language model to analyze based on the data analysis capability of the large language model to obtain the return result of the large language model as the target retrieval result.

[0047] Therefore, through the above technical solution, when determining the target search results corresponding to the search data, it can be determined based on the answer data corresponding to the question data recalled from the knowledge database, thereby effectively improving the efficiency of knowledge recall and ensuring the comprehensiveness and completeness of the recalled knowledge to ensure the accuracy of the target search results.

[0048] In a possible embodiment, a method for determining the structured data in the knowledge database may include: Get the corpus data corresponding to the knowledge.

[0049] The corpus data may be text content, conversation records, work order processing records, etc., knowledge obtained from the Internet, or business data knowledge obtained from a business system, such as record documents or communication records.

[0050] The corpus data is processed to obtain a processed text corresponding to the corpus data.

[0051] As an example, if the corpus data is of text type, the text corresponding to the corpus data can be used as the processing text. If the corpus data is not of text type, such as the corpus data can be of audio and video type, the corresponding text obtained by the audio through speech recognition technology can be used as the processing text. For example, in the case of video type, the image can also be recognized, and the description information of the image can be used as the processing text. Among them, the key frames in the video can be extracted in advance through the key frame model to obtain the key frames therein, and then the text information in the key frames is extracted. Among them, the recognition of the key frames can be analyzed and extracted based on the general model or large language model in this field. For example, it can be combined with the similarity between the image frames in the video for recognition, etc., and the present disclosure does not limit this.

[0052] Therefore, through the above processing method, the obtained corpus data can be converted into a text type representation.

[0053] Afterwards, based on the processing text, at least one processing structured data corresponding to the processing text is generated, and the processing structured data includes a processing answer data and at least one processing question data corresponding to the processing answer data.

[0054] Among them, a prompt text can be constructed based on the processed text, and a large language model can be called based on the prompt text. The processed text is analyzed by the large language model, such as generating the following prompt text for calling: Please generate question-answer pair data based on the following input {processed text}, and the output format is {[question 1], [question 2],…; [answer]}.

[0055] As an example, in this step, the processed text can be uploaded through the visual interface to build a prompt text based on the prompt template to call the large language model, and obtain the processed structured data output by the large language model. Figure 2 As shown in the schematic diagram of the interactive interface, the user can input the processing text into the document area Q1, and then trigger the generation of structured data by clicking the generate button B1.

[0056] Afterwards, the processed structured data is verified to determine the target structured data.

[0057] Among them, the analysis process of the large language model has a certain degree of randomness, so the processed structured data can be verified in this step to improve the accuracy and high quality of the generated question and answer pairs.

[0058] As an example, determining the structured data in the knowledge database based on the processing of the structured data may include: For each of the processing structured data, it is determined whether the processing question data and the processing answer data in the processing structured data match.

[0059] If there is only one question data in the structured data, the question data and answer data can be used to construct a prompt text, such as analyzing whether the following question {question data} and answer {answer data} match. Then, the large language model can be called based on the prompt text to perform data analysis to determine whether the answer is used to answer the question. If there are multiple question data in the structured data, prompt text can be constructed for each question in the same way for subsequent matching.

[0060] Verifying the processed structured data based on the matching result and the verification condition to obtain the target structured data; The verification conditions include: If the processing question data and the processing answer data do not match, deleting the processing question data; If there is no processing question data matching the processing answer data in the processing structured data, the processing structured data is deleted.

[0061] Among them, the processing answer data may correspond to multiple questions. If the processing question data and the processing answer data do not match, it means that the processing answer data cannot be used to answer the processing question data. At this time, the processing question data can be deleted. And it can be determined whether the processing answer data can match other corresponding question data. If there is a matching processing question data, the processing question data can be retained. For example, for structured data D1, it contains questions A11, A12, A13 and answer A1; for structured data D2, it contains questions A21, A22, A23 and answer A2.

[0062] If it is determined through the above steps that question A11 and answer A1 do not match, then question A11 is deleted; if question A12 and answer A1 match, then question A12 is retained; similarly, if question A13 and answer A1 match, then question A13 is retained. The target structured data obtained can be expressed as D1{A12,A13;A1}.

[0063] After the matching is completed in sequence, if there is no processing question data matching the processing answer data in the processing structured data, it means that the processing answer data cannot be used to answer any question in the processing structured data, that is, the question and answer pair in the processing structured data is considered unreasonable. At this time, the processing structured data can be directly deleted.

[0064] For example, for structured data D2, questions A21, A22, and A23 do not match answer A2, and the structured data D2 can be directly deleted, so that the structured data obtained after the verification process is executed is used as the target structured data.

[0065] Therefore, through the above technical solution, structured data can be automatically verified, which saves the workload of manual analysis and can also ensure the accuracy of the target structured data to a certain extent, providing data support for subsequent effective retrieval and recall of knowledge.

[0066] As another example, the verifying the processed structured data to determine the target structured data may include: Shows the processing of structured data.

[0067] like Figure 2 As shown, the generated structured data can be displayed in the interactive interface, such as displaying the processed question data in the display area Q2 and displaying the processed answer data in Q3, so that the user can browse.

[0068] Afterwards, in response to receiving a user's update operation on the processing problem data in the processing structured data, the processing problem data in the processing structured data is updated with the problem data obtained after the update operation to obtain the target structured data.

[0069] For example, the user can add new question data by clicking on the add control B2, such as the generated processing question data displayed in the input boxes K1-K3, and the user clicks B2 to display the input box K4 so that the user can enter a new question. For another example, the user can select the input boxes in K1-K3 to implement the update operation on the generated question data, wherein the update operation can include the addition, modification and deletion operations on the question data. After the user confirms, he can click Submit, and the questions in each input box can be used as processing question data to replace the processing question data in the processing structured data, and together with the processing answer data as the target structured data.

[0070] Therefore, through the above technical solution, users can be supported to modify question data in order to implement verification processing of structured data, improve the accuracy of generated target structured data, and ensure the accuracy and effectiveness of subsequent knowledge recall by improving the accuracy of question data.

[0071] After the target structured data is determined, the structured data of the knowledge database may be updated based on the target structured data.

[0072] As an example, the target structured data may be directly stored in the knowledge database. In actual scenarios, some knowledge may change over time, and there may be conflicts between answer data in the structured data generated at different times. As another example, updating the structured data of the knowledge database based on the target structured data includes: It is determined whether there is second question data matching the first question data in the target structured data in the structured data stored in the knowledge database.

[0073] Among them, the first question data and the second question data can be vectorized and then similarity can be calculated based on their respective corresponding vectors. If the similarity exceeds a preset threshold, it can be determined that the first question data and the second question data match. In this scenario, it is considered that the first question data and the second question data represent the same question.

[0074] If the second question data does not exist, the target structured data is stored in the knowledge database.

[0075] If the second question data does not exist, it means that the same question as the target structured data does not exist in the knowledge database. This means that there is no conflict between the target structured data and the data stored in the knowledge database, so the target structured data can be directly stored.

[0076] If the second question data exists, updated answer data corresponding to the second question data is generated based on the first answer data in the target structured data and the second answer data corresponding to the second question data.

[0077] If the second question data exists, it means that the same question as the target structured data exists in the knowledge database. At this time, the target structured data may conflict with the data stored in the knowledge database, and the data stored in the database needs to be updated.

[0078] As an example, the second answer data may replace the first answer data as updated answer data, that is, the previously stored answer may be replaced with the latest answer to ensure the timeliness of the answer. As another example, a prompt text may be constructed based on the first answer data in the target structured data and the second answer data corresponding to the second question data, so as to call a large language model for comprehensive analysis based on the prompt text, so as to generate comprehensive answer data in combination with the first answer data and the second answer data, and obtain updated answer data. As another example, the prompt text may also include the time information of each answer data generation, so that the large language model can process it in combination with the time information.

[0079] Generate updated target structured data according to the first question data, the second question data and the updated answer data, and store the updated target structured data in the knowledge database.

[0080] As an example, the updated answer data can be used as answer data, and the first question data and the second question data can be used as question data respectively to generate target structured data and store them in a knowledge database, and updated target structured data can be jointly generated based on the generated target structured data and the data already stored in the database.

[0081] Therefore, through the above technical solution, the corpus data corresponding to the knowledge can be processed, so that the corpus data can be converted into structured data for storage in the knowledge database. On the one hand, it can realize the unified management and representation of knowledge data, and on the other hand, it can facilitate the rapid retrieval and recall of knowledge, provide support for the large language model to respond quickly to users, and improve the user experience.

[0082] Based on the same inventive concept, the present disclosure also provides a data processing device, such as Figure 3 As shown, the device 10 comprises: The receiving module 100 is used to receive the search data; A matching module 200 is used to match the search data with structured data in a knowledge database to obtain candidate question data and candidate answer data, wherein the knowledge in the knowledge database is represented by the structured data, and each structured data includes an answer data and at least one question data corresponding to the answer data; The generating module 300 is used to generate a target search result corresponding to the search data according to the candidate question data and the candidate answer data.

[0083] Optionally, the matching module includes: A first processing submodule, used for preprocessing the search data to obtain processed search data; A matching submodule is used to match the question data in the processed retrieval data and the structured data, use the matched question data as the candidate question data, and use the answer data corresponding to the candidate question data as the candidate answer data.

[0084] Optionally, the generating module includes: A first acquisition submodule, used to obtain the matching degree between each candidate question data and the search data; The first determination submodule is used to determine the candidate answer data corresponding to the candidate question data with the highest matching degree as the target retrieval result if there is a matching degree greater than a preset threshold.

[0085] Optionally, the generating module includes: A first acquisition submodule, used to obtain the matching degree between each candidate question data and the search data; The second determination submodule is used to construct a prompt text according to the candidate question data, the candidate answer data and the search data if there is no matching degree greater than a preset threshold, so as to generate the target search result based on the prompt text and the search model.

[0086] Optionally, the determination of the structured data in the knowledge database is generated by a determination module, and the determination module includes: The second acquisition submodule is used to acquire corpus data corresponding to the knowledge; A second processing submodule is used to process the corpus data to obtain a processed text corresponding to the corpus data; A first generating submodule is used to generate at least one processing structured data corresponding to the processing text based on the processing text, wherein the processing structured data includes a processing answer data and at least one processing question data corresponding to the processing answer data; A third processing submodule is used to perform verification processing on the processed structured data to determine target structured data; The first updating submodule is used to update the structured data of the knowledge database based on the target structured data.

[0087] Optionally, the third processing submodule includes: A third determination submodule is used to determine, for each of the processing structured data, whether the processing question data and the processing answer data in the processing structured data match; A verification submodule, used to verify the processed structured data based on the matching result and the verification condition to obtain the target structured data; The verification conditions include: If the processing question data and the processing answer data do not match, deleting the processing question data; If there is no processing question data matching the processing answer data in the processing structured data, the processing structured data is deleted.

[0088] Optionally, the third processing submodule includes: A display submodule, used for displaying the processed structured data; The second updating submodule is used to respond to receiving a user's update operation on the processing problem data in the processing structured data, so as to update the processing problem data in the processing structured data with the problem data obtained after the update operation to obtain the target structured data.

[0089] Optionally, the first updating submodule includes: A fourth determination submodule, used to determine whether there is second question data matching the first question data in the target structured data in the structured data stored in the knowledge database; A first storage submodule, configured to store the target structured data in the knowledge database if the second question data does not exist; a fifth determining submodule, configured to generate updated answer data corresponding to the second question data based on the first answer data in the target structured data and the second answer data corresponding to the second question data, if the second question data exists; The second storage submodule is used to generate updated target structured data according to the first question data, the second question data and the updated answer data, and store the updated target structured data in the knowledge database.

[0090] Reference below Figure 4, which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0091] like Figure 4 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0092] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0093] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0094] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0095] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0096] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0097] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: receives retrieval data; matches the retrieval data with the structured data in the knowledge database to obtain candidate question data and candidate answer data, wherein the knowledge in the knowledge database is represented by the structured data, and each of the structured data contains an answer data and at least one question data corresponding to the answer data; generates a target retrieval result corresponding to the retrieval data based on the candidate question data and the candidate answer data.

[0098] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0099] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0100] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, a receiving module may also be described as a "module for receiving retrieval data".

[0101] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0102] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0103] According to one or more embodiments of the present disclosure, Example 1 provides a data processing method, wherein the method includes: receiving the retrieved data; According to the search data, candidate question data and candidate answer data are obtained by matching the search data with structured data in a knowledge database, wherein the knowledge in the knowledge database is represented by the structured data, and each structured data includes an answer data and at least one question data corresponding to the answer data; Generate a target search result corresponding to the search data based on the candidate question data and the candidate answer data.

[0104] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein the step of matching the search data with structured data in a knowledge database to obtain candidate question data and candidate answer data includes: Preprocessing the search data to obtain processed search data; Based on the processed retrieval data and the question data in the structured data, the matched question data is used as the candidate question data, and the answer data corresponding to the candidate question data is used as the candidate answer data.

[0105] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein generating a target search result corresponding to the search data according to the candidate question data and the candidate answer data includes: Obtaining a matching degree between each of the candidate question data and the search data; If there is a matching degree greater than a preset threshold, the candidate answer data corresponding to the candidate question data with the highest matching degree is determined as the target retrieval result.

[0106] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1, wherein generating a target search result corresponding to the search data according to the candidate question data and the candidate answer data includes: Obtaining a matching degree between each of the candidate question data and the search data; If there is no match greater than a preset threshold, a prompt text is constructed according to the candidate question data, the candidate answer data and the retrieval data to generate the target retrieval result based on the prompt text and the retrieval model.

[0107] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein the method of determining the structured data in the knowledge database includes: Obtain corpus data corresponding to the knowledge; Processing the corpus data to obtain a processed text corresponding to the corpus data; Based on the processing text, generating at least one processing structured data corresponding to the processing text, wherein the processing structured data includes a processing answer data and at least one processing question data corresponding to the processing answer data; Performing verification processing on the processed structured data to determine target structured data; The structured data of the knowledge database is updated based on the target structured data.

[0108] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 5, wherein the verifying the processed structured data to determine the target structured data includes: For each of the processing structured data, determining whether the processing question data and the processing answer data in the processing structured data match; Verifying the processed structured data based on the matching result and the verification condition to obtain the target structured data; The verification conditions include: If the processing question data and the processing answer data do not match, deleting the processing question data; If there is no processing question data matching the processing answer data in the processing structured data, the processing structured data is deleted.

[0109] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 5, wherein the verifying the processed structured data to determine the target structured data includes: presenting the processed structured data; In response to receiving a user's update operation on the processing problem data in the processing structured data, the processing problem data in the processing structured data is updated with the problem data obtained after the update operation to obtain the target structured data.

[0110] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 5, wherein updating the structured data of the knowledge database based on the target structured data includes: Determine whether there is second question data matching the first question data in the target structured data in the structured data stored in the knowledge database; If the second question data does not exist, storing the target structured data in the knowledge database; If the second question data exists, generating updated answer data corresponding to the second question data based on the first answer data in the target structured data and the second answer data corresponding to the second question data; Generate updated target structured data according to the first question data, the second question data and the updated answer data, and store the updated target structured data in the knowledge database.

[0111] According to one or more embodiments of the present disclosure, Example 9 provides a data processing device, the device comprising: A receiving module, used for receiving the search data; A matching module, configured to match the search data with structured data in a knowledge database to obtain candidate question data and candidate answer data, wherein the knowledge in the knowledge database is represented by the structured data, and each structured data includes an answer data and at least one question data corresponding to the answer data; A generation module is used to generate a target search result corresponding to the search data based on the candidate question data and the candidate answer data.

[0112] According to one or more embodiments of the present disclosure, Example 10 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in any one of Examples 1-8 when executed by a processing device.

[0113] According to one or more embodiments of the present disclosure, Example 11 provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in any one of Examples 1-8.

[0114] According to one or more embodiments of the present disclosure, Example 12 provides a computer program product, including a computer program, which implements the steps of the method described in any one of Examples 1-8 when executed by a processor.

[0115] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0116] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0117] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A data processing method, It is characterized in that The method comprises: receiving the retrieved data; According to the search data, candidate question data and candidate answer data are obtained by matching the search data with structured data in a knowledge database, wherein the knowledge in the knowledge database is represented by the structured data, and each structured data includes an answer data and at least one question data corresponding to the answer data; Generate a target search result corresponding to the search data based on the candidate question data and the candidate answer data.

2. The method according to claim 1, It is characterized in that The step of matching the search data with structured data in a knowledge database to obtain candidate question data and candidate answer data includes: Preprocessing the search data to obtain processed search data; Based on the processed retrieval data and the question data in the structured data, the matched question data is used as the candidate question data, and the answer data corresponding to the candidate question data is used as the candidate answer data.

3. The method according to claim 1, It is characterized in that The step of generating a target search result corresponding to the search data according to the candidate question data and the candidate answer data includes: Obtaining a matching degree between each of the candidate question data and the search data; If there is a matching degree greater than a preset threshold, the candidate answer data corresponding to the candidate question data with the highest matching degree is determined as the target retrieval result.

4. The method according to claim 1, It is characterized in that The step of generating a target search result corresponding to the search data according to the candidate question data and the candidate answer data includes: Obtaining a matching degree between each of the candidate question data and the search data; If there is no match greater than a preset threshold, a prompt text is constructed according to the candidate question data, the candidate answer data and the retrieval data to generate the target retrieval result based on the prompt text and the retrieval model.

5. The method according to claim 1, It is characterized in that The method for determining the structured data in the knowledge database includes: Obtain corpus data corresponding to the knowledge; Processing the corpus data to obtain a processed text corresponding to the corpus data; Based on the processing text, generating at least one processing structured data corresponding to the processing text, wherein the processing structured data includes a processing answer data and at least one processing question data corresponding to the processing answer data; Performing verification processing on the processed structured data to determine target structured data; The structured data of the knowledge database is updated based on the target structured data.

6. The method according to claim 5, It is characterized in that The verifying the processed structured data to determine the target structured data includes: For each of the processing structured data, determining whether the processing question data and the processing answer data in the processing structured data match; Verifying the processed structured data based on the matching result and the verification condition to obtain the target structured data; The verification conditions include: If the processing question data and the processing answer data do not match, deleting the processing question data; If there is no processing question data matching the processing answer data in the processing structured data, the processing structured data is deleted.

7. The method according to claim 5, It is characterized in that The verifying the processed structured data to determine the target structured data includes: presenting the processed structured data; In response to receiving a user's update operation on the processing problem data in the processing structured data, the processing problem data in the processing structured data is updated with the problem data obtained after the update operation to obtain the target structured data.

8. The method according to claim 5, It is characterized in that The updating of the structured data of the knowledge database based on the target structured data includes: Determine whether there is second question data matching the first question data in the target structured data in the structured data stored in the knowledge database; If the second question data does not exist, storing the target structured data in the knowledge database; If the second question data exists, generating updated answer data corresponding to the second question data based on the first answer data in the target structured data and the second answer data corresponding to the second question data; Generate updated target structured data according to the first question data, the second question data and the updated answer data, and store the updated target structured data in the knowledge database.

9. A data processing device, It is characterized in that The device comprises: A receiving module, used for receiving the search data; A matching module, configured to match the search data with structured data in a knowledge database to obtain candidate question data and candidate answer data, wherein the knowledge in the knowledge database is represented by the structured data, and each structured data includes an answer data and at least one question data corresponding to the answer data; A generation module is used to generate a target search result corresponding to the search data based on the candidate question data and the candidate answer data.

10. A computer readable medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 8 are implemented.

11. An electronic device, It is characterized in that include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.

12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Knowledge base-based question answer determination method and apparatus

    CN111159363A

  • Question and answer method and device, equipment and medium

    CN118445395A

Cited By

  • Object query model generation method, object generation method and device

    CN121412278A

  • Object query model generation method, object generation method and device

    CN121412278B

  • Data retrieval method, apparatus and computing device

    WO2026130217A1