Data updating method and device, cluster, storage medium and computing equipment

By comprehensively calculating the similarity between key knowledge points and original text segments, the problem of quality degradation in LLM knowledge base updates is solved, achieving efficient and accurate knowledge base updates and ensuring high quality and consistency of the knowledge base.

CN121614564APending Publication Date: 2026-03-06HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411165025.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2026-03-06

Smart Images

  • Figure CN121614564A_ABST
    Figure CN121614564A_ABST
Patent Text Reader

Abstract

The invention discloses a data updating method and device, a cluster, a storage medium and computing equipment, relates to the technical field of computers, and aims at improving the accuracy of determining second text data similar to first text data and improving the validity of data updating by comprehensively calculating knowledge key points among text data and the similarity of original text segments. The method comprises the steps that first text data are obtained, second text data are determined from a database according to the first text data, and the target similarity between the second text data and the first text data meets a set threshold value; the target similarity is determined according to the first similarity and the second similarity; the first similarity is the similarity between the knowledge key points of the first text data and the knowledge key points of the text data in the database; the second similarity is the similarity between the original text segment of the first text data and the original text segment of the text data in the database, and then the computing device updates the second text data stored in the database according to the first text data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data update method, apparatus, cluster, storage medium and computing device. Background Technology

[0002] Currently, large language models (LLMs) can handle a variety of natural language processing tasks very well, such as question answering, text translation, and even code generation. However, LLMs also have limitations, such as generating illusions, lack of interpretability of generated text, lack of expertise, and lag in updates. To further improve the capabilities of LLMs, retrieval-augmented generation (RAG) techniques can be employed.

[0003] Retrieval Enhancement (RAG) technology refers to the process where, before an LLM generates an answer based on a user-input prompt, it first retrieves relevant knowledge from a designated knowledge base. This relevant knowledge, along with the prompt, is then input into the LLM, allowing it to refer to more and more reliable information when generating an answer. This improves the LLM's performance, such as significantly reducing the likelihood of the LLM generating false information and increasing its accuracy in answering questions in a specialized field.

[0004] How to more effectively improve the quality of knowledge in the knowledge base is crucial to whether RAG technology can significantly improve the performance of LLM. Summary of the Invention

[0005] This application provides a data updating method, apparatus, cluster, storage medium, and computing device, which comprehensively calculates the similarity between new knowledge points and knowledge points in the knowledge base, as well as the similarity between new original text segments and original text segments in the knowledge base, significantly improving the accuracy of judging similar knowledge and thus improving the effectiveness of updating the knowledge base.

[0006] In a first aspect, this application provides a data updating method, which includes: a computing device acquiring first text data, the first text data including key points and original text segments, the key points including key information extracted from the original text segments; the computing device determining second text data from a database based on the first text data, the target similarity between the second text data and the first text data meeting a set threshold; the target similarity being determined based on a first similarity and a second similarity; the first similarity being the similarity between the key points of the first text data and the key points of the text data in the database; the second similarity being the similarity between the original text segments of the first text data and the original text segments of the text data in the database; and then the computing device updating the second text data stored in the database based on the first text data.

[0007] Understandably, since the target similarity is determined based on the similarity between the knowledge points of the first text data and the knowledge points of the text data in the database (first similarity), and the similarity between the original text segment of the first text data and the original text segment of the text data in the database (second similarity), it significantly improves the accuracy of judging similar knowledge, thereby improving the effectiveness of updating the knowledge base.

[0008] In one possible implementation, determining the second text data from the database based on the first text data includes: obtaining a first similarity and a second similarity between the first text data and each text data in the database; determining the target similarity between each text data and the first text data based on the first similarity, the second similarity, and a set weight parameter; and determining the text data in the database whose target similarity meets a set threshold as the second text data.

[0009] Understandably, by setting weight parameters, the weights of similarity between knowledge points (first similarity) and similarity between original text segments (second similarity) can be flexibly controlled when determining target similarity, which helps to further improve the accuracy of judging similar knowledge.

[0010] In one possible implementation, updating the second text data stored in the database based on the first text data includes: if there is conflicting text data in the second text data, replacing the conflicting text data with the first text data, wherein the conflicting text data is text data in the second text data that conflicts with the knowledge points in the first text data.

[0011] It is understandable that replacing the second text data, which conflicts with the knowledge points of the first text data, with the first text data can avoid the existence of conflicting knowledge in the database at the same time, and improve the effectiveness of updating the database.

[0012] In one possible implementation, updating the second text data stored in the database based on the first text data includes: if there is duplicate text data in the second text data, obtaining the quality scores of the duplicate text data and the first text data, wherein the duplicate text data is text data in the second text data that has content that is repeated with the first text data; if the quality score of the duplicate text data is less than or equal to the quality score of the first text data, replacing the duplicate text data with the first text data; and if the quality score of the duplicate text data is greater than the quality score of the first text data, retaining the duplicate text data.

[0013] It is understandable that when there is text data in the second text data that is duplicated with the content of the first text data, by comparing their respective quality scores, retaining the text data with the higher quality score in the database can effectively improve the quality of the database and improve the efficiency of updating the database.

[0014] In one possible implementation, updating the second text data stored in the database based on the first text data includes: if complementary text data exists in the second text data, generating third text data based on the complementary text data and the first text data, wherein the complementary text data is text data in which the knowledge points in the second text data do not conflict with the knowledge points in the first text data, and the original text segment is complementary to the original text segment of the first text data; and replacing the complementary text data with the third text data.

[0015] It is understandable that by combining complementary text data from the first and second text data to generate third text data, knowledge fusion can be achieved, avoiding the discarding of existing valid text data in the database during the update process. This can further improve the quality and amount of information in the database, and also improve the effectiveness of updating the database.

[0016] In one possible implementation, updating the second text data stored in the database based on the first text data includes: setting the state parameter corresponding to the first text data to a first value, where the first value indicates that the state of the text data is the evaluation state; and setting the state parameter corresponding to the second text data to a second value, where the second value indicates that the state of the text data is the hidden state.

[0017] It is understandable that by setting different state parameters for text data, the efficiency and flexibility of controlling the state of each text data in the database can be improved, and the efficiency of undoing updates to the database can be increased.

[0018] In one possible implementation, after updating the second text data stored in the database based on the first text data, the updated database is obtained. The method further includes: obtaining the quality score of the updated database; if the quality score is lower than the quality score of the database before the update, modifying the state parameters of each text data in the updated database that meet the second value to the third value, and modifying the state parameters that meet the first value to the second value, whereby the third value indicates that the state of the text data is available.

[0019] Understandably, by comparing the database quality scores before and after the update, it is possible to accurately determine whether the database quality has improved. Furthermore, if the database quality declines, by modifying the status parameters corresponding to each text data, the database can be efficiently restored to a state with a higher quality score, thus preventing the degraded database from continuously affecting the normal operation of the business.

[0020] In one possible implementation, the method further includes: providing an interactive interface for displaying the text content of the first text data and the second text data; receiving trigger operations on interactive controls in the interactive interface, and updating the database according to the setting functions corresponding to the interactive controls; the setting functions include modifying the text content of the first text data and / or the second text data, as well as the state parameters corresponding to the first text data and / or the second text data respectively.

[0021] Understandably, by providing an interactive interface, the process of manually intervening in data updates can be realized. The experience of relevant personnel can be used to further improve the effectiveness of updating the database and to promptly expose any anomalies in the text data, thereby improving the security of the system.

[0022] Secondly, this application provides a data updating apparatus, which includes a module that performs the method described in the first aspect or any implementation thereof.

[0023] In one possible implementation, embodiments of this application can divide the data update device into functional modules according to the method provided in the first aspect above. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. For instance, embodiments of this application can divide the data update device into an acquisition module, a determination module, and an update module, etc., according to their functions. The descriptions of the possible technical solutions and beneficial effects of the various functional modules described above can be found in the technical solutions provided in the first aspect above or its corresponding possible implementations, and will not be repeated here.

[0024] Thirdly, embodiments of this application provide a computing device that includes a processor and a memory, the processor being coupled to the memory; the memory is used to store computer instructions that are loaded and executed by the processor to enable the computing device to implement the data update method as described above.

[0025] Fourthly, embodiments of this application provide a computing device cluster, which includes at least one computing device, each computing device including a processor and a memory, the processor being coupled to the memory; the processor of the at least one computing device is used to execute computer instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the data update method provided in the various optional implementations of the first aspect above.

[0026] Fifthly, embodiments of this application provide a computer-readable storage medium storing at least one computer program instruction, which is loaded and executed by a processor to implement the data update method as described above.

[0027] Sixthly, embodiments of this application provide a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computing device to perform the data update method provided in the various optional implementations of the first aspect described above.

[0028] For a detailed description of aspects two through six and their various implementations in this application, please refer to the detailed description in aspect one and its various implementations; and for a detailed description of the beneficial effects of aspects two through six and their various implementations, please refer to the beneficial effect analysis in aspect one and its various implementations, which will not be repeated here.

[0029] These or other aspects of this application will become more readily apparent in the following description. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the architecture of a data update system provided in an embodiment of this application;

[0031] Figure 2 A flowchart illustrating a data update method provided in an embodiment of this application;

[0032] Figure 3 for Figure 2 The illustrated embodiment is a schematic diagram of a knowledge extraction interface.

[0033] Figure 4 for Figure 2The illustrated embodiment is a schematic diagram of a knowledge extraction result display interface.

[0034] Figure 5 for Figure 2 The illustrated embodiment is a schematic diagram of a similar knowledge display interface;

[0035] Figure 6 for Figure 2 The illustrated embodiment is a schematic diagram of a knowledge quality assessment method.

[0036] Figure 7 for Figure 2 The illustrated embodiment is a schematic diagram of a knowledge fusion interface.

[0037] Figure 8 for Figure 2 The illustrated embodiment is a schematic diagram of a knowledge update interface.

[0038] Figure 9 for Figure 2 The illustrated embodiment is a schematic diagram of a data update process;

[0039] Figure 10 This is a schematic diagram illustrating an application scenario of a data update method provided in an embodiment of this application.

[0040] Figure 11 for Figure 10 The illustrated embodiment is a schematic diagram of the interface of an exemplary intelligent question-answering system.

[0041] Figure 12 for Figure 10 The illustrated embodiment is a schematic diagram of a system evaluation interface.

[0042] Figure 13 A schematic diagram of a data update apparatus provided as an exemplary embodiment of this application;

[0043] Figure 14 A schematic diagram of a computing device provided for an exemplary embodiment of this application;

[0044] Figure 15 A schematic diagram of a computing device cluster provided for an exemplary embodiment of this application;

[0045] Figure 16 This is a schematic diagram illustrating the connection method between computing device clusters provided in an exemplary embodiment of this application. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0047] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0048] Furthermore, in the description of the embodiments of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0049] Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0050] First, the application scenarios of the embodiments of this application will be introduced by way of example.

[0051] A high-quality knowledge base can improve the efficiency and quality of many business operations. For example, in a customer service system, a high-quality knowledge base can help customer service personnel quickly find answers to questions; in legal or compliance operations, a high-quality knowledge base can help relevant personnel quickly find legal provisions and related cases; in an intelligent question-answering system, through search-enhanced generation (RAG) technology, a high-quality knowledge base can significantly improve the quality of answers.

[0052] Correspondingly, if new knowledge is added directly to the knowledge base without effective updates, the quality of the knowledge base may deteriorate. For example, the knowledge base may contain a large amount of outdated knowledge, duplicate knowledge, or even conflicting knowledge. If such a knowledge base is used in business, it may provide incorrect information to relevant personnel, causing misleading or even losses.

[0053] In related technologies, knowledge bases are usually composed of several knowledge points. For example, knowledge points containing key information are extracted from text data, and the extracted knowledge points are represented as vector data through an embedding model. A vector-based knowledge base is formed by storing a large amount of vector data.

[0054] When updating the knowledge base, the relevant technology first extracts new knowledge points from the new file specified by the user, then filters out old knowledge points in the knowledge base that have a high semantic similarity to the new knowledge points, deletes these old knowledge points, and writes the new knowledge points, thereby completing the knowledge base update.

[0055] In this approach, since the knowledge points are highly condensed information, relying solely on the semantic similarity between knowledge points to determine which knowledge points in the knowledge base need updating may not necessarily have a strong correlation with the new knowledge points, and could even conflict with them. For example, the new knowledge point might be "mitosis and amitosis are the modes of division in eukaryotic cells," while the knowledge point with the highest semantic similarity might be "mitosis and meiosis are the modes of division in eukaryotic cells." Both are semantically related to the modes of division in eukaryotic cells, but their content is not entirely the same or completely different; rather, there is some overlap. Therefore, "mitosis and meiosis are the modes of division in eukaryotic cells" should not be directly replaced with "mitosis and amitosis are the modes of division in eukaryotic cells." In other words, the quality of the knowledge base after direct replacement is not improved, demonstrating that this update method cannot effectively improve the quality of the knowledge base.

[0056] In view of this, this application proposes a data update method, which extracts knowledge into knowledge points and original text segments. Then, when updating the knowledge base, it comprehensively calculates the similarity between the new knowledge points and the knowledge points in the knowledge base, as well as the similarity between the new original text segments and the original text segments in the knowledge base. This significantly improves the accuracy of judging similar knowledge and thus improves the effectiveness of updating the knowledge base.

[0057] In some feasible embodiments, the method includes: a computing device acquiring first text data, the first text data including key points and original text segments, the key points including key information extracted from the original text segments; the computing device determining second text data from a database based on the first text data, the target similarity between the second text data and the first text data meeting a set threshold; the target similarity being determined based on a first similarity and a second similarity; the first similarity being the similarity between the key points of the first text data and the key points of the text data in the database; the second similarity being the similarity between the original text segments of the first text data and the original text segments of the text data in the database; and then the computing device updating the second text data stored in the database based on the first text data. Since the target similarity is determined based on the similarity between the key points of the first text data and the key points of the text data in the database (first similarity), and the similarity between the original text segments of the first text data and the original text segments of the text data in the database (second similarity), the accuracy of judging similar knowledge is significantly improved, thereby improving the effectiveness of updating the knowledge base.

[0058] Secondly, the system architecture of the embodiments of this application will be described by way of example.

[0059] Figure 1 This is a schematic diagram of the architecture of a data update system provided in an embodiment of this application. Figure 1 As shown, the data update system 100 includes at least a computing device 110.

[0060] The computing device 110 includes at least a computing module 111, which is used to execute the data update method provided in this application.

[0061] Specifically, the calculation module 111 may include: an acquisition module 101, a determination module 102, and an update module 103.

[0062] In this embodiment, the acquisition module 101 can be used to acquire first text data; the first text data includes key points and original text segments, the key points including key information extracted from the original text segments; the determination module 102 can be used to determine second text data from the database based on the first text data, the target similarity between the second text data and the first text data meeting a set threshold; the target similarity is determined based on the first similarity and the second similarity; the first similarity is the similarity between the key points of the first text data and the key points of the text data in the database; the second similarity is the similarity between the original text segments of the first text data and the original text segments of the text data in the database; the update module 103 can be used to update the second text data stored in the database based on the first text data.

[0063] In some feasible embodiments, the data update system 100 may also include one or more of the following: database 120, terminal device 130, data storage system 140, and data acquisition device 150.

[0064] The database 120 can be used to store the original data of the knowledge to be extracted collected by the data acquisition device 150. In some feasible embodiments, the database 120 can also be used to store the first text data obtained by the computing device 110.

[0065] Terminal device 130 can be used to display an interactive interface, including displaying to the user first text data obtained by computing device 110, second text data determined by computing device 110 from data storage system 140 and / or database 120, as well as similarity, quality score, etc. of the text data, and receiving user interaction operations.

[0066] The data storage system 140 can be used to store the first text data obtained by the computing device 110, and can also be used to store the logic code called, the generated instructions, cached data, etc., that the computing device 110 needs to call during the execution of the data update method provided in the embodiments of this application.

[0067] The data acquisition device 150 can be used to collect raw data from which knowledge is to be extracted. For example, the data acquisition device 150 may obtain data from a specified website by running data scraping software, or obtain electronic documents related to specified keywords, or the data acquisition device 150 may receive data uploaded by users.

[0068] In some feasible embodiments, the computing device 110 may also include an I / O interface 112, a preprocessing module 113, and a data storage module 114.

[0069] The I / O interface 112 can be used to return the processing results of the computing module 111 to the terminal device 130, thereby displaying them to the user for viewing. In the embodiments of this application, the processing results may be a quality score of the first text data, the similarity between the first and second text data, etc. The I / O interface 112 can also be used to interact with external devices of the computing device 110. That is, the user can input data into the I / O interface 112 through the terminal device 130, for example, inputting the original data to be extracted, inputting an instruction to replace the second text data with the first text data, etc. In addition, the input data of the I / O interface 112 may also come from the aforementioned database 120.

[0070] The preprocessing module 113 is used to preprocess the input data received through the I / O interface 112. In this embodiment, the preprocessing module 113 can be used to extract text content from the input data received through the I / O interface 112 (such as optical character recognition (OCR) on image data), remove duplicate data and format errors from the text content according to predefined rules, and eliminate outliers from the text content by statistically analyzing the features of the text content, such as word frequency and character length, so as to improve the quality of the text content and thus help improve the effectiveness of updating the knowledge base.

[0071] The data storage module 114 is used to transmit the first text data obtained by the calculation module 111 to the aforementioned data storage system 140 and / or database 120 for storage in a default format (such as vector and / or text format) or a user-specified format.

[0072] It should be noted that the above description should not be construed as limiting the embodiments of this application. For example, in actual applications, the data maintained in the database 120 may not all come from the data acquisition device 150, but may also be received from other devices.

[0073] Optionally, the computing device 110 can be a terminal, such as a computer, mobile terminal, tablet computer, laptop computer, or other computing device; it can also be an edge device (e.g., a portable box with a processing chip); or a computing device connected to a base station; or a computing device deployed at a base station, such as a server or cloud device.

[0074] Optionally, taking a computer as an example, the computing module 111 can be a central processing unit (CPU), other general-purpose processors, digital signal processing (DSP) chips, application-specific integrated circuit (ASIC) chips, field-programmable gate array (FPGA) chips, graphics processing unit (GPU) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0075] Figure 1 This is merely a schematic diagram of a system architecture provided in an embodiment of this application. Figure 1The positional relationships between the devices, components, modules, etc., shown are not limiting. Depending on the user's data update needs, the data update system 100 and computing device 110 may include more or fewer hardware components; this application does not limit this. For example, in Figure 1 In this context, the data storage system 140 is an external storage device relative to the computing device 110. In other cases, the data storage system 140 may also be placed within the computing device 110.

[0076] It should be noted that the execution of a certain step (such as S110 to S130 below) by the computing device described in the following embodiments can be understood as the computing device 110 performing the step.

[0077] Below Figure 1 Based on the data update system and computing devices shown, combined with Figures 2 to 9 The data update method provided in this application is described in detail, wherein, Figure 2 The following is a flowchart illustrating a data update method provided in an embodiment of this application. The data update method specifically includes the following steps:

[0078] S110, the computing device acquires the first text data.

[0079] In this step, specifically it can be Figure 1 The acquisition module 101 acquires the first text data, which includes key points and original text segments. The key points include the key information extracted from the original text segments. In other words, the key points are a summary of the original text segments, removing some unnecessary content. The original text segments are the original content extracted from the input text, which is also supplementary information to the key points.

[0080] In some feasible embodiments, the first text data may be input by a computing device into a pre-trained knowledge extraction model (KEM), which may be running on... Figure 1 The acquisition module 101 in the KEM can also run independently on other computing devices that can communicate with the computing device 110, and then generate corresponding output data by the KEM.

[0081] For example, such as Figure 3 As shown, Figure 3 for Figure 2 The illustrated embodiment is a schematic diagram of a knowledge extraction interface, which can be displayed on... Figure 1 On the terminal device 130, and receive user interaction operations, Figure 3The text specifically demonstrates interactive controls such as "Upload" and "Extract," as well as three raw data items (1-3) uploaded by the user by triggering the "Upload" control. Figure 3 In the middle, the user clicked the "Extract" interactive control for the original data 1, which then allows the user to first extract the data. Figure 1 The preprocessing module 113 extracts the following text data for knowledge extraction from the original data 1 (image data): "The main goal of evaluating the RAG model is to understand and optimize its performance in various application scenarios. The evaluation of the RAG model mainly focuses on its performance in specific downstream tasks, and these evaluations use standard metrics applicable to the tasks involved. For example, question-answering evaluation may rely on EM and F1 scores. Retrieval quality: Evaluating retrieval quality is crucial to determining the effectiveness of the context provided by the retrieval component. Standard metrics in the fields of search engines, recommendation systems, and information retrieval systems are used to measure the performance of the RAG retrieval module. Metrics such as hit rate, average reciprocal ranking (MRR), and normalized depreciation cumulative gain (NDCG) are commonly used for this purpose. Generation quality: The evaluation of generation quality mainly focuses on the ability of the large model to generate coherent and correct answers from the context obtained after the retrieval is returned. Depending on the generated content, generation quality evaluation can be divided into unlabeled content quality evaluation and labeled content quality evaluation. For unlabeled content quality evaluation, the evaluation includes the authenticity, relevance, and harmlessness of the generated answers. In contrast, for labeled content, the focus is on the accuracy of the information generated by the large model."

[0082] Then, the above text data is input into the pre-trained KEM to obtain the corresponding output data (first text data), including: knowledge point: "The main evaluation objectives of the RAG system include retrieval quality and generation quality", and the original text segment 1 corresponding to the knowledge point: "Retrieval quality: Evaluating retrieval quality is crucial for determining the effectiveness of the context provided by the retrieval component. Standard metrics in the fields of search engines, recommendation systems and information retrieval systems are used to measure the performance of the RAG retrieval module. Metrics such as hit rate, average reciprocal ranking (MRR) and normalized depreciation cumulative gain (NDCG) are commonly used for this purpose

[91] ", and the original text segment 2: "Generation quality: The evaluation of generation quality focuses on the ability of the large model to generate coherent and correct answers from the context obtained after the retrieval. Depending on the generated content, generation quality evaluation can be divided into unlabeled content quality evaluation and labeled content quality evaluation. For unlabeled content quality evaluation, the evaluation includes the authenticity, relevance and harmlessness of the generated answer. In contrast, for labeled content, the focus is on the accuracy of the information generated by the large model."

[0083] In some feasible embodiments, the computing device can display the results of knowledge extraction to the user through an interactive interface and receive user interaction operations.

[0084] Furthermore, in some feasible embodiments, if the user edits the knowledge extraction results displayed in the interactive interface, the corresponding editing results can also be fed back to KEM as training data to further improve the accuracy of the model's knowledge extraction.

[0085] For example, such as Figure 4 As shown, Figure 4 for Figure 2 The illustrated embodiment is a schematic diagram of a knowledge extraction result display interface, which can be displayed on... Figure 1 On the terminal device 130, and receive user interaction, Figure 4 The document specifically showcases interactive controls such as "Confirm," "Edit," and "Evaluate," as well as key knowledge points and original text segments 1 and 2. Underlined sections represent specific text content, allowing users to easily assess the accuracy of the knowledge extraction results. Figure 4 The demonstration also showed a user clicking the "Edit" interactive control for a knowledge point, allowing the user to edit it. For example, the user could change the aforementioned knowledge point "The main evaluation objectives of the RAG system include retrieval quality and generation quality" to "The main evaluation metrics of the RAG system include retrieval quality and generation quality." Furthermore, the computing device uses the user-edited knowledge point "The main evaluation metrics of the RAG system include retrieval quality and generation quality," along with the original text segments 1 and 2, as label data in the training data. The input text is then fed back to the KEM as sample data in the training data to further train the model and improve the accuracy of knowledge extraction.

[0086] S120, the computing device determines the second text data from the database based on the first text data.

[0087] In this step, specifically it can be Figure 1 The determining module 102 determines the second text data from the database based on the first text data. In this embodiment, the target similarity between the second text data and the first text data meets a set threshold. The target similarity is determined based on the similarity between the knowledge points of the first text data and the knowledge points of the text data in the database (first similarity), and the similarity between the original text segment of the first text data and the original text segment of the text data in the database (second similarity).

[0088] Specifically, the computing device may iterate through the database to determine the target similarity between each piece of text data and the first text data, or it may first use a pruning algorithm to filter out a portion of the text data most likely to contain the second text data from the database, and then the computing device determines the target similarity between this portion of text data and the first text data. This application does not impose any limitations on this. In determining the first and second similarities, the computing device can at least use the similarity between the vectors corresponding to the text data and / or the characters.

[0089] It should be noted that when the computing device determines the first similarity and / or the second similarity through the vector corresponding to the text data, it can specifically achieve this through similarity measurement, such as cosine similarity, Euclidean distance, Manhattan distance, etc. This application does not limit this.

[0090] For example, the computing device inputs the first text data into a pre-trained embedding model to obtain vectors corresponding to the first text data. These vectors include vectors corresponding to key knowledge points in the first text data and vectors corresponding to each original text segment. The computing device then calculates the cosine similarity between the vectors corresponding to key knowledge points in the first text data and the vectors corresponding to key knowledge points in each text data in the database. It also calculates the proportion of character overlap between the key knowledge points in the first text data and the key knowledge points in each text data in the database to the total number of characters. This weighted similarity determines the first similarity. Furthermore, the second similarity is determined by the cosine similarity between the vectors corresponding to each original text segment in the first text data and the vectors corresponding to each original text segment in each text data in the database.

[0091] When the computing device determines the first similarity and the second similarity, that is, the computing device obtains the first similarity and the second similarity between the first text data and each text data in the database; furthermore, the computing device can also determine the target similarity between each text data and the first text data based on the first similarity, the second similarity and the set weight parameters, and then the computing device determines the text data in the database whose target similarity meets the set threshold as the second text data.

[0092] For example, the first similarity and second similarity between the first text data obtained by the computing device and each text data in the database include: the first similarity between the first text data and text data A in the database is 0.80 and the second similarity is 0.90; the first similarity between the first text data and text data B in the database is 0.80 and the second similarity is 0.50, and the set weight parameter corresponding to the first similarity is 0.90 and the set weight parameter corresponding to the second similarity is 0.10, thereby determining that the target similarity between the first text data and text data A in the database is 0.81; the target similarity between the first text data and text data B in the database is 0.77. If the set threshold is greater than or equal to 0.80, the computing device determines that text data A in the database is the second text data.

[0093] As can be seen from the above examples, by comprehensively calculating the second similarity between the original text segments, this application embodiment can further distinguish the similarity between the first text data and the second text data in the database when the similarity of knowledge points is the same, thereby improving the accuracy of the computing device in determining similar knowledge.

[0094] In some feasible embodiments, the computing device can display first text data and second text data determined from a database to the user through an interactive interface. In other words, the computing device displays first text data (new knowledge) and second text data (old knowledge) determined from a database to the user through an interactive interface and receives user interaction operations.

[0095] For example, such as Figure 5 As shown, Figure 5 for Figure 2 The illustrated embodiment is a schematic diagram of a similar knowledge display interface, which can be displayed on... Figure 1 On the terminal device 130, and receive user interaction operations, Figure 5 The text specifically demonstrates interactive controls such as "reacquire" and "irrelevant," as well as the first text data acquired by the computing device in step S110, namely new knowledge, and the second text data determined from the database in step S120, namely similar knowledge 1 and similar knowledge 2. Figure 5 In addition, users can select similar knowledge 1 (knowledge 2), and then click the "irrelevant" interactive control. The computing device can then hide knowledge 2 from the interactive interface and provide feedback on the irrelevant record. Figure 1 The determination module 102 is used to further improve the accuracy of the module in judging similar knowledge.

[0096] In step S120, the computing device comprehensively calculates the first similarity between knowledge points and the second similarity between original text segments, thereby improving the accuracy of the computing device in determining similar knowledge and thus helping to improve the effectiveness of updating the database as follows.

[0097] S130, the computing device updates the second text data stored in the database based on the first text data.

[0098] In this application embodiment, at least the following three possible implementations are provided for the computing device to perform the above step S130:

[0099] 1) If there is conflicting text data in the second text data, the computing device will replace the conflicting text data with the first text data.

[0100] Among them, conflicting text data refers to text data in which the knowledge points in the second text data conflict with the knowledge points in the first text data.

[0101] In this implementation, whether there is conflicting text data in the second text data can specifically be... Figure 1 The update module 103 determines that, when determined, the computing device can input the knowledge points of the second text data and the knowledge points of the first text data into the trained conflict judgment model or the trained LLM, and then obtain the confidence level of each second text data as conflict text data, and determine the second text data with a confidence level higher than the set conflict confidence level threshold as conflict text data.

[0102] For example, the key knowledge point of the first text data is "The population of City W is 2 million", while the key knowledge point of the second text data A is "The population of City W is 1.95 million", and the key knowledge point of the second text data B is "The population of City W is 2 million". The computing device can input the key knowledge points of the first text data and the second text data A, and the key knowledge points of the first text data and the second text data B into a pre-trained conflict judgment model, respectively, to obtain a confidence level of 95% for the second text data A as conflicting text data and a confidence level of 1% for the second text data B as conflicting text data. Then, the computing device determines the second text data A, whose confidence level is higher than the set conflict confidence threshold of 90%, as conflicting text data, and replaces the second text data B (including the key knowledge points and the original text segment) with the first text data.

[0103] 2) If there is duplicate text data in the second text data, the computing device obtains the quality scores of the duplicate text data and the first text data. If the quality score of the duplicate text data is less than or equal to the quality score of the first text data, the computing device replaces the duplicate text data with the first text data; if the quality score of the duplicate text data is greater than the quality score of the first text data, the computing device retains the duplicate text data.

[0104] Duplicate text data refers to text data in the second text data that contains content that is identical to that in the first text data.

[0105] In this implementation, whether there is duplicate text data in the second text data can specifically be... Figure 1 The update module 103 determines that, during the determination, the computing device can input the second text data and the first text data into a trained duplication judgment model or a trained LLM to obtain the confidence level of each second text data as duplicate text data (or the degree of duplication between each second text data and the first text data). The second text data with a confidence level higher than a set duplication confidence threshold is determined as duplicate text data. Then, the quality scores of the duplicate text data and the first text data are obtained. The quality scores are obtained by inputting the text data into a trained quality assessment model. If the quality score of the duplicate text data is less than or equal to the quality score of the first text data, in other words, the quality of the first text data is better than the duplicate text data, the computing device replaces the duplicate text data with the first text data. If the quality score of the duplicate text data is greater than the quality score of the first text data, the computing device retains the duplicate text data. Furthermore, the computing device can also retain the duplicate text data if the quality score of the duplicate text data is greater than the quality score of the first text data and the difference is greater than a set quality difference threshold. When acquiring a quality score for a piece of text data, the computing device can obtain not only the quality score for the knowledge points of that text data, but also the quality score for the original text segment. Specifically, for example... Figure 6 As shown, Figure 6 for Figure 2 The illustrated embodiment is a schematic diagram of a knowledge quality assessment method. Figure 6 The image shows a comparison of text data before and after quality scoring. The score for the knowledge point is 95, the score for the original text segment 1 is 85, and the score for the original text segment 2 is 90. The computing device can also calculate the quality score of the text data based on each score, such as taking the minimum value or weighted calculation, etc.

[0106] In some feasible embodiments, the quality score of text data can be based on multiple dimensions, such as text fluency, information content, etc. The computing device can calculate the quality score of the text data based on the scores of each dimension, such as taking the maximum value or weighted calculation, etc.

[0107] For example, the knowledge point of the first text data is "the main evaluation indicators of the RAG system include retrieval quality and generation quality", while the knowledge point of the second text data A is "the main evaluation indicators of the RAG system include not only retrieval quality", and the knowledge point of the second text data B is "the evaluation indicator of the RAG system can be generation quality". The computing device can input the first text data and the second text data A, and the first text data and the second text data B into a pre-trained duplicate judgment model respectively, and obtain a confidence level of 94% for the second text data A as duplicate text data and a confidence level of 95% for the second text data B as duplicate text data. Then, the computing device determines the second text data A and the second text data B, whose confidence levels are higher than the set duplicate confidence threshold of 90%, as duplicate text data, and obtains a quality score of 95 for the first text data, a quality score of 80 for the second text data A, and a quality score of 85 for the second text data B. Since the quality score of the first text data is higher than the quality scores of the second text data A and the second text data B, the computing device replaces the second text data A and the second text data B with the first text data.

[0108] 3) If complementary text data exists in the second text data, the computing device generates third text data based on the complementary text data and the first text data, and then the computing device replaces the complementary text data with the third text data.

[0109] Among them, complementary text data is text data in which the knowledge points of the second text data do not conflict with the knowledge points of the first text data, and the original text segment is complementary to the original text segment of the first text data.

[0110] In this implementation, whether complementary text data exists in the second text data can specifically be... Figure 1The update module 103 determines that, during the determination, the computing device can input the second text data and the first text data into a trained complementarity judgment model, or a trained LLM, or input the knowledge points of the second text data and the knowledge points of the first text data into a trained conflict judgment model and input the original text segments of the second text data and the original text segments of the first text data into a trained complementarity judgment model, thereby obtaining the confidence level of each second text data as complementary text data. Second text data with confidence levels higher than a set complementarity confidence threshold are determined as complementary text data, and then the complementary text data and the first text data are input into the aforementioned KEM or other trained text generation model. See details in [link to documentation]. Figure 7 , Figure 7 for Figure 2 The illustrated embodiment is a schematic diagram of a knowledge fusion interface. Figure 7 The first text data (new knowledge) is presented, specifically including knowledge point 1, original text segment 1-1 and original text segment 1-2, and complementary text data (similar knowledge), specifically including knowledge point 2, original text segment 2-1, original text segment 2-2 and original text segment 2-3. Then, the computing device generates a third text data (fused knowledge) based on the aforementioned first text data and complementary text data, specifically including knowledge point 3, original text segment 1-1, original text segment 2-1 and original text segment 2-3.

[0111] For example, the computing device first inputs the key knowledge points of the first text data: "The main evaluation metrics of the RAG system include retrieval quality" and the key knowledge points of the second text data: "The evaluation metrics of the RAG system can be generation quality" into a trained conflict judgment model. It obtains a confidence level of 1% that the second text data is conflicting text data, which is lower than the set conflict threshold of 95%. Therefore, the computing device determines that the key knowledge points of the second text data do not conflict with the key knowledge points of the first text data. Then, the computing device inputs the original text segment of the second text data: "RAG system generation quality: The evaluation of generation quality mainly focuses on the ability of the large model to generate coherent and correct answers from the context obtained after the retrieval. Depending on the generated content, generation quality evaluation can be divided into unlabeled content quality evaluation and labeled content quality evaluation. For unlabeled content quality evaluation, the evaluation includes the authenticity, relevance, and harmlessness of the generated answer. In contrast, for labeled content, the focus is on the accuracy of the information generated by the large model." and the original text segment of the first text data: "RAG system retrieval quality: Evaluating retrieval quality is crucial for determining the effectiveness of the context provided by the retrieval component. Standard metrics in the fields of search engines, recommendation systems, and information retrieval systems are used to measure the performance of the RAG retrieval module. For example, hit rate..." Indicators such as Rate, Average Reciprocal Ranking (MRR), and Normalized Discount Cumulative Gain (NDCG) are typically used for this purpose. The data is input into a trained complementarity judgment model, and the confidence level that the second text data is complementary is 95%, which is higher than the set complementarity confidence threshold of 90%. Therefore, the computing device determines that the second text data is complementary. The complementary text data and the first text data are then input into a trained KEM to obtain the generated third text data. In this example, the key knowledge points of the third text data can be "The main evaluation indicators of the RAG system include retrieval quality and generation quality," and the corresponding original text segment 1 is "Generation quality of the RAG system: the evaluation of generation quality..." The evaluation primarily focuses on the ability of large models to generate coherent and correct answers from the context obtained after retrieval. Depending on the generated content, the quality assessment can be divided into unlabeled content quality assessment and labeled content quality assessment. For unlabeled content quality assessment, the evaluation includes the authenticity, relevance, and harmlessness of the generated answers. In contrast, for labeled content, the focus is on the accuracy of the information generated by the large model. The original text paragraph 2 states: "Retrieval quality of RAG systems: Evaluating retrieval quality is crucial for determining the effectiveness of the context provided by retrieval components. Standard metrics in the fields of search engines, recommendation systems, and information retrieval systems are used to measure the performance of RAG retrieval modules. Metrics such as Hit Rate, Average Reciprocal Rank (MRR), and Normalized Discount Cumulative Gain (NDCG) are commonly used for this purpose." The computing device replaces complementary text data with third-party text data.

[0112] In some feasible embodiments, the computing device can display a knowledge update interface to the user through an interactive interface and receive user interaction operations.

[0113] For example, such as Figure 8 As shown, Figure 8 for Figure 2 The illustrated embodiment is a schematic diagram of a knowledge update interface, which can be displayed on... Figure 1 On the terminal device 130, and receive user interaction operations, Figure 8 The document specifically demonstrates interactive controls such as "Select All and Replace," "Batch Replace," "Merge," "Replace," and "Delete," as well as the new knowledge (Knowledge 1) and similar knowledge (Knowledge 2) acquired by the computing device through the aforementioned steps. Figure 8 The device also displays knowledge point 1-1 of knowledge 1 and knowledge point 2-1 of knowledge 2 selected by the user. If the user clicks the "Replace" interactive control next, the computing device can replace knowledge point 2-1 of knowledge 2 with knowledge point 1-1 of knowledge 1.

[0114] In the various implementation methods of knowledge updating mentioned above, when updating the second text data in the database with the first text data (such as replacing conflicting text data with the first text data as mentioned above), not only can the knowledge points of the text data in the database be updated, but also the original text segment corresponding to the knowledge points can be updated. Moreover, not only can the knowledge points of the second text data and the text content of the original text segment be updated, but also the vector corresponding to the text content can be updated. The specific data that needs to be updated is related to the data format stored in the actual database and can be determined according to actual needs.

[0115] In this application embodiment, the above-described data update process can also be referred to Figure 9 , Figure 9 for Figure 2 The illustrated embodiment provides a flowchart of a data update process, demonstrating how raw data is extracted, compared for similarity, and assessed for quality before being added to a knowledge base (database). It also visually represents the extraction of new knowledge (first text data) from the raw data and the identification of similar knowledge (second text data) from the database. The text content of the new knowledge, the text content of the similar knowledge, and the corresponding quality assessment results can be displayed to knowledge base maintainers via the aforementioned interactive interface, allowing for interactive operations from the maintainers. Figure 9 The knowledge base maintainers, as shown in the image, can determine knowledge 3 as irrelevant based on the quality assessment results (and provide feedback to the module executing the similarity comparison process, such as...). Figure 1The module 102 in the middle determines the new knowledge as the knowledge to be added to the database, determines the knowledge 2 as the knowledge to be replaced, and performs operations such as editing the new knowledge.

[0116] Through the above steps S110-S130, the computing device improves the accuracy of identifying text data in the database that is similar to the first text data by comprehensively calculating the similarity between knowledge points (first similarity) and the similarity between original text segments (second similarity). It also significantly improves the effectiveness of updating the knowledge base for various types of second text data (including conflicting / repeated / complementary text data), and can display multiple interfaces to further improve the flexibility of data updates.

[0117] After updating the database, it may be necessary to undo the update for some purpose. For example, after applying the updated database to an intelligent question-answering system using the aforementioned RAG technology for a period of time, it may be found that user satisfaction with the intelligent question-answering system has decreased. To improve the efficiency and flexibility of database update and undo operations, in this embodiment, corresponding state parameters can be set for the text data in the database, and different values ​​of the state parameters can represent different states of the text data in the database. In one possible implementation, when updating the database, the computing device can also set the state parameter corresponding to the first text data to a first value, which indicates that the text data is in an evaluation state; and set the state parameter corresponding to the second text data to a second value, which indicates that the text data is in a hidden state.

[0118] It should be noted that, when users use the aforementioned... Figure 8 When the knowledge update interface shown interacts with text data (including new knowledge and similar knowledge), for example, when... Figure 8 When knowledge point 2-1 of knowledge 2 is replaced with knowledge point 1-1 of knowledge 1, it is equivalent to instructing the computing device to set the status parameter of knowledge point 2-1 of knowledge 2 to the second value and set knowledge point 1-1 of knowledge 1 to the first value.

[0119] In other words, when updating the database, the computing device can retain the updated second text data in the database instead of deleting it directly. By changing the state parameter of the second text data, this part of the second text data (i.e., the second text data with the state parameter of the second value) can be hidden from the database. The hidden state can mean that when the computing device performs operations such as searching the database, it ignores the second text data with the state parameter of the second value. Furthermore, when the computing device updates the first text data to the database, it sets the state parameter of this part of the text data to the first value representing the evaluation state, so as to distinguish it from other text data that originally existed in the database.

[0120] In this way, the computing device can subsequently change the status parameters corresponding to the text data in the database, thereby efficiently controlling the status of each text data in the database, and thus controlling whether the database update takes effect, significantly improving the flexibility of data updates.

[0121] After the computing device performs the above steps S110-S130, in other words, after the database is updated, the computing device can further obtain the quality score of the updated database; if the quality score is lower than the quality score of the database before the update, the computing device modifies the status parameters that meet the second value in the status parameters corresponding to each text data in the updated database to the third value, and modifies the status parameters that meet the first value to the second value, wherein the third value indicates that the status of the text data is available.

[0122] Specifically, the quality score of a database can be determined during the application process through methods such as surveying user satisfaction, answer accuracy scores, and using RAG assessment (RAGAS) tools.

[0123] Taking the application of a database in an intelligent question-answering system as an example, such as Figure 10 As shown, Figure 10 This is a schematic diagram illustrating an application scenario of a data update method provided in an embodiment of this application. Figure 10 The intelligent question-solving system includes a knowledge base (database) and a Large Language Model (LLM). The knowledge base is applied to the LLM using RAG technology, providing it with rich background knowledge and improving the accuracy of the LLM's generated answers. This intelligent question-solving system can interact with users (e.g., inputting questions and displaying answers), and... Figure 10 The application also demonstrates the data update method provided in this application for updating the knowledge base of an intelligent question-answering system. This includes processes such as knowledge cleaning and similarity comparison. Knowledge cleaning may include the preprocessing steps described above, such as removing duplicate data and formatting errors using predefined rules, knowledge extraction, and text data vectorization. The similarity comparison process is similar to step S120 above and will not be elaborated upon here. Figure 10 Performance evaluation can be conducted through automated tools (such as RAGAS) or by combining human scoring by users and / or knowledge base maintainers. Moreover, the evaluation can be based on multiple indicators such as retrieval quality, generation quality, noise robustness, negative sample rejection, and counterfactual robustness.

[0124] In one possible implementation, the raw data includes not only user-uploaded data, but also data generated during the application of the intelligent question-answering system. For example, the raw data may include text data input by the user into the intelligent question-answering system, and may also include text data generated by LLM.

[0125] based on Figure 10 The intelligent question-and-answer system in China Figure 11 The diagram further illustrates an exemplary intelligent question-answering system interface, through which users can... Figure 11 The interface shown prompts the user to input a question. The computing device then uses Retrieval Enhancement Generative Planning (RAG) technology to retrieve relevant background knowledge (i.e., text data from the database) from a database. This retrieved background knowledge is then fed into the LLM (Limited Language Management) system along with the input question. The LLM generates an answer, which the computing device displays on the interface. In this exemplary application scenario, the computing device can collect user satisfaction data regarding the intelligent question-answering system's output (e.g., ...). Figure 11 The updated database is assessed by determining its quality score based on whether the user is satisfied or dissatisfied with the updated data. This score is then compared to the quality score of the database before the update. If the updated quality score is lower than the previous one, the computing device reverts the database to its previous state. This involves modifying the status parameters of each text data item in the updated database that match the second value to the third value, indicating an available state, and modifying the status parameters that match the first value to the second value. This achieves rapid database rollback. If storage resources are limited, to minimize the storage space occupied by the database, in one possible implementation, the computing device can delete text data with status parameters matching the second value if it confirms that the updated database's quality score has increased.

[0126] In some feasible embodiments, the computing device can display a system evaluation interface to the user through an interactive interface and receive user interaction operations.

[0127] For example, such as Figure 12 As shown, Figure 12 for Figure 10 The illustrated embodiment is a schematic diagram of a system evaluation interface. Figure 12 The text displays information such as the different system versions and creation times of the databases before and after the update. Figure 12 The system version is 1.0 (before the update) and the creation time is "2016-01-01", while version 2.0 (after the update) and the creation time is "2016-01-05". Interactive controls such as "Evaluation" are also included. Figure 12 As shown, if the user clicks the "Evaluate" interactive control for version 2.0, the computing device can further display... Figure 12 The evaluation results on the right, update confirmation prompts, and interactive controls such as "Confirm" and "Return" are displayed to facilitate users to quickly confirm or revert to the database version (modify the status parameters of the text data).

[0128] In this embodiment of the application, by setting corresponding state parameters for each data in the database, the flexibility of data updates can be significantly improved, and the efficiency of changing the state of each data in the database can be increased.

[0129] The foregoing mainly describes the solutions of the embodiments of this application from a methodological perspective. It is understood that, in order to achieve the above functions, the data update device includes at least one of the hardware structures and software modules corresponding to each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.

[0130] This application embodiment can divide the data update device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0131] For example, Figure 13 A schematic diagram of a data update apparatus 1100 provided in an exemplary embodiment of this application is shown. The data update apparatus 1100 is applied in a computing device, or the data update apparatus 1100 may be a computing device. The data update apparatus 1100 includes:

[0132] The acquisition module 1110 is used to acquire first text data, which includes key knowledge points and original text segments, wherein the key knowledge points include key information extracted from the original text segments.

[0133] The determining module 1120 is used to determine second text data from a database based on the first text data, wherein the target similarity between the second text data and the first text data meets a set threshold; the target similarity is determined based on a first similarity and a second similarity; the first similarity is the similarity between the knowledge points of the first text data and the knowledge points of the text data in the database; the second similarity is the similarity between the original text segment of the first text data and the original text segment of the text data in the database;

[0134] The update module 1130 is used to update the second text data stored in the database based on the first text data.

[0135] For example, combining Figure 2 The acquisition module 1110 can be used to perform actions such as... Figure 2 As shown in S110, the determination module 1120 can be used to perform, for example... Figure 2 As shown in S120, the update module 1130 can be used as follows: Figure 2 S130 is shown.

[0136] In one possible implementation, the determining module 1120 is further configured to: obtain the first similarity and the second similarity between the first text data and each text data in the database; determine the target similarity between each text data and the first text data based on the first similarity, the second similarity, and a set weight parameter; and determine the text data in the database whose target similarity meets the set threshold as the second text data.

[0137] In one possible implementation, the update module 1130 is further configured to replace the conflicting text data with the first text data if there is conflicting text data in the second text data, wherein the conflicting text data is text data in the second text data that conflicts with the knowledge points of the first text data.

[0138] In one possible implementation, the update module 1130 is further configured to: if duplicate text data exists in the second text data, obtain the quality scores of the duplicate text data and the first text data, wherein the duplicate text data is text data in the second text data that has content that is repeated with the first text data; if the quality score of the duplicate text data is less than or equal to the quality score of the first text data, replace the duplicate text data with the first text data; if the quality score of the duplicate text data is greater than the quality score of the first text data, retain the duplicate text data.

[0139] In one possible implementation, the update module 1130 is further configured to generate third text data based on the complementary text data and the first text data if complementary text data exists in the second text data, wherein the complementary text data is text data in which the knowledge points in the second text data do not conflict with the knowledge points in the first text data, and the original text segment is complementary to the original text segment of the first text data; and replace the complementary text data with the third text data.

[0140] In one possible implementation, the update module 1130 is further configured to set the state parameter corresponding to the first text data to a first value, the first value indicating that the state of the text data is an evaluation state; and set the state parameter corresponding to the second text data to a second value, the second value indicating that the state of the text data is a hidden state.

[0141] In one possible implementation, after updating the second text data stored in the database based on the first text data to obtain an updated database, the update module 1130 is further configured to obtain a quality score of the updated database; if the quality score is lower than the quality score of the database before the update, the status parameters of each text data in the updated database that meet the second value are modified to a third value, and the status parameters that meet the first value are modified to the second value, wherein the third value indicates that the status of the text data is an available status.

[0142] In one possible implementation, the data update device further includes an interaction module, which is used to: provide an interactive interface for displaying the text content of the first text data and the second text data; receive trigger operations on interactive controls in the interactive interface; and update the database according to the setting function corresponding to the interactive control; the setting function includes modifying the text content of the first text data and / or the second text data, as well as the status parameters corresponding to the first text data and / or the second text data respectively.

[0143] As a feasible example, the data update device 1100 provided in this application is implemented through a software module. For example, the software module can be provided to users through a cloud service subscription model, and users can choose different subscription levels according to their needs. Alternatively, the software module can also provide enterprise-level customized services with professional domain customization, interface personalization and extended functions according to the needs of users or enterprises.

[0144] Furthermore, the data update device 1100 provided in this application can also be provided to users as a value-added service, and this application does not limit this. When the data update device 1100 is implemented through a software module, the data update device 1100 can also be embedded into other data update software or RAG systems.

[0145] This application also provides a computing device 100. For example... Figure 14As shown, the computing device 100 includes a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other via the bus 102. The computing device 100 may be a server or a terminal device. It should be understood that the embodiments of this application do not limit the number of processors and memories in the computing device 100.

[0146] Bus 102 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 14 The bus 104 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 104 may include a path for transmitting information between various components of the computing device 100 (e.g., memory 106, processor 104, communication interface 108).

[0147] The processor 104 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0148] Memory 106 may include volatile memory, such as random access memory (RAM). Processor 104 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0149] The memory 106 stores executable program code, and the processor 104 executes the executable program code to implement the functions of the aforementioned first acquisition module, determination module, partitioning module, and second acquisition module, thereby realizing the data update method. That is, the memory 106 stores instructions for executing the data update method.

[0150] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0151] like Figure 15 As shown, the computing device cluster includes at least one computing device 100. The memory 106 of one or more computing devices 100 in the computing device cluster may store the same instructions for executing data update methods.

[0152] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the data update method. In other words, a combination of one or more computing devices 100 can jointly execute the instructions for executing the data update method.

[0153] It should be noted that the memory 106 in different computing devices 100 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the data update device. That is, the instructions stored in the memory 106 of different computing devices 100 can implement the functions of one or more modules among the acquisition module, determination module, and update module.

[0154] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 16 One possible implementation is shown. For example... Figure 16 As shown, two computing devices 100A and 100B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this possible implementation, the memory 106 in computing device 100A stores instructions for executing the functions of the acquisition module. Meanwhile, the memory 106 in computing device 100B stores instructions for executing the functions of the determination module and the update module.

[0155] It should be understood that Figure 16 The functions of the computing device 100A shown can also be performed by multiple computing devices 100. Similarly, the functions of the computing device 100B can also be performed by multiple computing devices 100.

[0156] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a data update method.

[0157] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform a data update method, or instruct the computing device to perform a data update method.

[0158] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data updating method characterized by comprising: The method comprises: acquiring first text data, the first text data comprising knowledge points and original text segments, the knowledge points comprising key information extracted from the original text segments; determining second text data from a database according to the first text data, the second text data having a target similarity to the first text data that meets a set threshold; the target similarity being determined according to a first similarity and a second similarity; the first similarity being a similarity between the knowledge points of the first text data and the knowledge points of the text data in the database; the second similarity being a similarity between the original text segments of the first text data and the original text segments of the text data in the database; updating the second text data stored in the database according to the first text data.

2. The method of claim 1, wherein, The determining of the second text data from the database according to the first text data comprises: acquiring the first similarity and the second similarity between the first text data and each text data in the database; determining the target similarity of each text data to the first text data according to the first similarity, the second similarity, and a set weight parameter; determining the text data in the database having the target similarity meeting the set threshold as the second text data.

3. The method according to claim 1 or 2, characterized in that, The updating of the second text data stored in the database according to the first text data comprises: if there is conflicting text data in the second text data, replacing the conflicting text data with the first text data, the conflicting text data being text data in the second text data having conflicting knowledge points with the knowledge points of the first text data.

4. The method according to any one of claims 1 to 3, characterized in that, The updating of the second text data stored in the database according to the first text data comprises: if there is repeated text data in the second text data, acquiring quality scores of the repeated text data and the first text data, the repeated text data being text data in the second text data having repeated content with the first text data; if the quality score of the repeated text data is less than or equal to the quality score of the first text data, replacing the repeated text data with the first text data; if the quality score of the repeated text data is greater than the quality score of the first text data, retaining the repeated text data.

5. The method according to any one of claims 1 to 4, characterized in that, The updating of the second text data stored in the database according to the first text data comprises: if there is complementary text data in the second text data, generating third text data according to the complementary text data and the first text data, the complementary text data being text data in the second text data having no conflicting knowledge points with the knowledge points of the first text data, and having complementary original text segments with the original text segments of the first text data; replacing the complementary text data with the third text data.

6. The method according to any one of claims 1 to 5, characterized in that, The updating of the second text data stored in the database according to the first text data comprises: set a state parameter corresponding to the first text data as a first value, the first value indicating that the state of the text data is an evaluation state; set a state parameter corresponding to the second text data as a second value, the second value indicating that the state of the text data is a hidden state.

7. The method of claim 6, wherein, after the updating of the second text data stored in the database according to the first text data, an updated database is obtained, and the method further comprises: obtaining a quality score of the updated database; if the quality score is lower than a quality score of the database before the updating, modifying a state parameter corresponding to each text data in the updated database, which meets the second value, as a third value, and modifying a state parameter meeting the first value as the second value, the third value indicating that the state of the text data is an available state.

8. The method according to any one of claims 1 to 7, characterized in that, the method further comprises: providing an interactive interface for displaying text content of the first text data and the second text data; receiving a triggering operation on an interactive control in the interactive interface, and updating the database according to a set function corresponding to the interactive control; the set function comprises modifying the text content of the first text data and / or the second text data, and the respective state parameters of the first text data and / or the second text data.

9. A data updating apparatus characterized by comprising: the device comprises: an acquisition module for acquiring first text data, the first text data comprising a knowledge point and an original text segment, the knowledge point comprising key information extracted from the original text segment; a determination module for determining second text data from a database according to the first text data, the second text data meeting a set threshold value in terms of target similarity with the first text data; the target similarity is determined according to a first similarity and a second similarity; the first similarity is a similarity between the knowledge point of the first text data and the knowledge point of the text data in the database; the second similarity is a similarity between the original text segment of the first text data and the original text segment of the text data in the database; an updating module for updating the second text data stored in the database according to the first text data.

10. The data updating apparatus according to claim 9, wherein the determination module is further configured to: acquire the first similarity and the second similarity between the first text data and each text data in the database; determine the target similarity between the text data and the first text data according to the first similarity, the second similarity, and a set weight parameter; determine the text data in the database meeting the set threshold value in terms of the target similarity as the second text data.

11. The data updating apparatus according to claim 9 or 10, characterized by the updating module is further configured to: if there is a conflict text data in the second text data, replace the conflict text data with the first text data, the conflict text data being text data in which the knowledge point of the second text data conflicts with the knowledge point of the first text data.

12. The data updating apparatus according to any one of claims 9 to 11, characterized by the updating module is further configured to: If there is repeated text data in the second text data, obtaining a quality score of the repeated text data and the first text data, the repeated text data being text data in the second text data that is repeated with the content of the first text data; If the quality score of the repeated text data is less than or equal to the quality score of the first text data, replacing the repeated text data with the first text data; If the quality score of the repeated text data is greater than the quality score of the first text data, retaining the repeated text data.

13. The data updating apparatus according to any one of claims 9 to 12, characterized by The updating module is further configured to, If there is complementary text data in the second text data, generating third text data according to the complementary text data and the first text data, the complementary text data being text data in the second text data that has no conflict with the knowledge points of the first text data and that is complementary to the original text segment of the first text data; Replace the complementary text data with the third text data.

14. The data updating apparatus according to any one of claims 9 to 13, characterized by The updating module is further configured to, Set a state parameter corresponding to the first text data to a first value, the first value indicating that the state of the text data is an evaluation state; Set a state parameter corresponding to the second text data to a second value, the second value indicating that the state of the text data is a hidden state.

15. The data updating apparatus according to claim 14, wherein After the database stored in the second text data is updated according to the first text data, an updated database is obtained, and the updating module is further configured to, Obtain a quality score of the updated database; If the quality score is lower than the quality score of the database before the update, modify a state parameter that meets the second value among the state parameters corresponding to each text data in the updated database to a third value, and modify a state parameter that meets the first value to the second value, the third value indicating that the state of the text data is an available state.

16. The data updating apparatus according to any one of claims 9 to 15, characterized by The data updating apparatus further comprises an interaction module, and the interaction module is configured to, provide an interaction interface, the interaction interface being configured to display text content of the first text data and the second text data; receive a triggering operation on an interaction control in the interaction interface, and update the database according to a set function corresponding to the interaction control; the set function including modifying the text content of the first text data and / or the second text data, and the state parameters corresponding to the first text data and / or the second text data.

17. A cluster of computing devices, characterized in that, The at least one computing device includes a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the data updating method according to any one of claims 1-8.

18. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises computer instructions; when the computer instructions are executed in a computing device, the computing device executes the data updating method according to any one of claims 1-8.

19. A computer program product, characterised in that, When the computer program product is executed in a computing device, the computing device executes the data updating method according to any one of claims 1-8.