A data processing method and related apparatus
Patent Information
- Application Number
- CN202310547767.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-15
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-05-15
AI Technical Summary
但是,由于知识库中的内容为人工预先设定存储的,无法保证内容的真实性及可靠性,若知识库中存储的内容被恶意篡改,则自然语言处理模型生成的回答内容的质量将无法保证
[0065]This application provides a data processing method and related apparatus. The method includes: first, receiving an inquiry statement sent by a target object; second, using the inquiry statement as input to a natural language processing (NLP) model, processing the inquiry statement through the NLP model to generate a predicted response result, wherein the NLP model retrieves original information with a relevance higher than a relevance threshold to a knowledge base based on keywords in the inquiry statement, performs NLP processing on the original information with a relevance higher than the relevance threshold to generate a predicted response result, the original information being information containing keywords stored in the knowledge base, which is stored on a blockchain node; and third, extracting keywords from the inquiry statement; then, obtaining the original information containing keywords from the knowledge base stored on the blockchain node based on the keywords; then, verifying the predicted response result based on the original information containing keywords, encapsulating the verified predicted response result and the original information together to generate response information; and finally, sending the response information to the target object. The method provided in this application avoids the problem of malicious tampering of the content stored in the knowledge base by using the knowledge base stored in the blockchain as the retrieval database of the natural language processing model; it verifies the response results generated by the natural language processing model by using the original information related to the keywords of the query statement stored in the knowledge base in the blockchain, and encapsulates the verified content into data, thereby avoiding the situation where the response results generated by the natural language processing model are inconsistent with the original information, ensuring the authenticity and reliability of the response information, and improving the quality of the response information.
Smart Images

Figure CN118964690B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a data processing method and related apparatus. Background Technology
[0002] With the continuous development of artificial intelligence technology, natural language processing models driven by AI (such as ChatGPT) are gradually entering the public eye. Natural language processing models can engage in conversation by understanding and learning human language, and can also interact based on the context of the chat, truly communicating like humans. They can even complete tasks such as writing emails, video scripts, copywriting, translation, coding, and academic papers.
[0003] Existing natural language processing (NLP) models provide knowledge-based answers by extracting keywords from user queries, retrieving them from a knowledge base, packaging the retrieved knowledge, and then outputting the answer. However, since the content in the knowledge base is pre-set and stored manually, its authenticity and reliability cannot be guaranteed. If the content stored in the knowledge base is maliciously tampered with, the quality of the answer generated by the NLP model cannot be guaranteed. Summary of the Invention
[0004] This application provides a data processing method and related apparatus, which avoids the problem of malicious tampering with the content stored in the knowledge base by using a knowledge base stored in the blockchain as a retrieval database for a natural language processing model.
[0005] One aspect of this application provides a data processing method, comprising:
[0006] Receive query statements sent by the target object;
[0007] The query statement is used as input to the natural language processing model. The natural language processing model processes the query statement to generate a predicted response. Specifically, the natural language processing model retrieves raw information with a relevance higher than the keyword threshold from the knowledge base based on the keywords in the query statement. The raw information with a relevance higher than the keyword threshold is processed by natural language to generate a predicted response. The raw information is information containing keywords stored in the knowledge base, which is stored on a blockchain node.
[0008] Extract keywords from query statements;
[0009] Based on the keywords, retrieve the original information containing the keywords from the knowledge base stored in the blockchain nodes;
[0010] The predicted response results are verified based on the original information containing keywords. The verified predicted response results are then combined with the original information to generate response information.
[0011] Send the response information to the target audience.
[0012] Another aspect of this application provides a data processing apparatus, including: an inquiry statement receiving module, a predicted response result generation module, a keyword extraction module, a raw information acquisition module, a verification module, and a response information sending module; specifically:
[0013] The query statement receiving module is used to receive query statements sent by the target object;
[0014] The predictive response generation module takes the query statement as input to the natural language processing model, processes the query statement through the natural language processing model, and generates a predictive response result. Specifically, the natural language processing model retrieves raw information with a relevance higher than the relevance threshold of the keywords in the query statement from the knowledge base, and performs natural language processing on the raw information with a relevance higher than the relevance threshold of the keywords to generate a predictive response result. The raw information is information containing keywords stored in the knowledge base, which is stored on a blockchain node.
[0015] The keyword extraction module is used to extract keywords from query statements;
[0016] The original information acquisition module is used to retrieve original information containing keywords from the knowledge base stored in the blockchain nodes based on the keywords.
[0017] The verification module is used to verify the predicted response results based on the original information containing keywords, and to encapsulate the verified predicted response results with the original information to generate response information.
[0018] The response message sending module is used to send response messages to the target object.
[0019] In another implementation of this application embodiment, the original information acquisition module is further configured to:
[0020] Based on the keywords, query the cached information containing the keywords from the blockchain nodes. The cached information is used to represent information temporarily stored in the blockchain nodes.
[0021] If a blockchain node contains cached information containing keywords, then the cached information containing keywords will be used as the original information.
[0022] If the blockchain node does not contain cached information of the keyword, then the stored information containing the keyword is obtained from the knowledge base stored in the blockchain node, and the stored information containing the keyword is used as the original information.
[0023] In another implementation of this application embodiment, the original information acquisition module is further configured to:
[0024] If the blockchain node does not contain cached information for the keyword, then query the knowledge base stored in the blockchain node to find the stored information containing the keyword.
[0025] If the knowledge base stored by the blockchain node contains stored information of keywords, then the stored information containing keywords will be used as the original information;
[0026] If the knowledge base stored by the blockchain node does not contain the stored information of the keywords, a prompt message indicating that the original information does not exist will be generated.
[0027] In another implementation of this application, the predictive response generation module is further configured to:
[0028] The query statement is used as input to the natural language processing model, and the natural language processing model extracts keywords from the query statement to obtain keywords;
[0029] Retrieve candidate information related to the keywords from the knowledge base;
[0030] Based on the relevance of candidate information related to the keyword to the keyword, identify the original information from the candidate information whose relevance is higher than the relevance threshold;
[0031] Natural language processing is performed on the raw information to generate predicted responses.
[0032] In another implementation of this application, the predictive response generation module is further configured to:
[0033] If no candidate information related to the keyword is retrieved in the knowledge base, a prompt message indicating that the response result cannot be predicted is generated.
[0034] In another implementation of this application's embodiments, the verification module is further configured to:
[0035] The predicted response results are verified based on the original information containing the keywords, and the content in the predicted response results that is consistent with the original information is retained.
[0036] Data encapsulation is performed on the content in the predicted response that is consistent with the original information to generate response information.
[0037] In another implementation of this application embodiment, the original information acquisition module is further configured to:
[0038] Based on the keywords, retrieve link information containing the keywords from blockchain nodes;
[0039] Access links containing keywords through a content delivery network to obtain the original information corresponding to the links.
[0040] In another implementation of this application embodiment, the data processing device further includes: a scoring acquisition module and a sample storage module; specifically:
[0041] The rating acquisition module is used to acquire the rating of the target object for the response information, where the rating is used to represent the target object's satisfaction with the response information;
[0042] The sample storage module is used to store the query statement and response information in the knowledge base if the score exceeds the scoring threshold. The query statement and response information are used to train the natural language processing model.
[0043] In another implementation of this application embodiment, the data processing device further includes: an index information creation module and an index information storage module; specifically:
[0044] The index information creation module is used to create index information based on query statements and response information;
[0045] The index information storage module is used to cache index information in the blockchain node.
[0046] In another implementation of this application's embodiments, the scoring acquisition module is further used for:
[0047] Receive the target object's rating information for the response information, wherein the rating information is information signed by the target object based on the target object's private key;
[0048] Obtain the public key information corresponding to the private key of the target object;
[0049] The scoring information is decrypted using the public key information to obtain the target object's score for the response.
[0050] In another implementation of this application embodiment, the data processing device further includes: a classification module, a category index establishment module, a training target category acquisition module, a target information index link determination module, a target information index link access module, and a natural language processing model training module; specifically:
[0051] The classification module is used to classify the raw information stored in the knowledge base into M categories, where M is an integer greater than or equal to 1.
[0052] The category index building module is used to build index links for the original information in M categories respectively, resulting in M information index links. The original information corresponding to the category is obtained by accessing the information index links.
[0053] The training target category acquisition module is used to acquire the training target category;
[0054] The target information index link determination module is used to obtain the target information index link corresponding to the training target category from M information index links according to the training target category;
[0055] The target information index link access module is used to access the target information index link and obtain the original information corresponding to the target information index link;
[0056] The Natural Language Processing Model Training Module is used to train the Natural Language Processing Model based on the original information linked to the target information index.
[0057] Another aspect of this application provides a computer device, comprising:
[0058] Memory, transceiver, processor, and bus system;
[0059] The memory is used to store programs;
[0060] The processor is used to execute programs in memory, including methods for performing the aspects mentioned above;
[0061] Bus systems are used to connect memory and processor to enable communication between them.
[0062] Another aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described above.
[0063] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the above aspects.
[0064] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0065] This application provides a data processing method and related apparatus. The method includes: first, receiving an inquiry statement sent by a target object; second, using the inquiry statement as input to a natural language processing (NLP) model, processing the inquiry statement through the NLP model to generate a predicted response result, wherein the NLP model retrieves original information with a relevance higher than a relevance threshold to a knowledge base based on keywords in the inquiry statement, performs NLP processing on the original information with a relevance higher than the relevance threshold to generate a predicted response result, the original information being information containing keywords stored in the knowledge base, which is stored on a blockchain node; and third, extracting keywords from the inquiry statement; then, obtaining the original information containing keywords from the knowledge base stored on the blockchain node based on the keywords; then, verifying the predicted response result based on the original information containing keywords, encapsulating the verified predicted response result and the original information together to generate response information; and finally, sending the response information to the target object. The method provided in this application avoids the problem of malicious tampering of the content stored in the knowledge base by using the knowledge base stored in the blockchain as the retrieval database of the natural language processing model; it verifies the response results generated by the natural language processing model by using the original information related to the keywords of the query statement stored in the knowledge base in the blockchain, and encapsulates the verified content into data, thereby avoiding the situation where the response results generated by the natural language processing model are inconsistent with the original information, ensuring the authenticity and reliability of the response information, and improving the quality of the response information. Attached Figure Description
[0066] Figure 1 This is a schematic diagram illustrating the structure of a distributed system applied to a blockchain system according to one embodiment of this application.
[0067] Figure 2 This is a schematic diagram of a block structure provided in one embodiment of this application;
[0068] Figure 3 A schematic diagram of the architecture of a data processing system provided in one embodiment of this application;
[0069] Figure 4 A flowchart illustrating a data processing method provided in one embodiment of this application;
[0070] Figure 5 A flowchart illustrating a data processing method provided in another embodiment of this application;
[0071] Figure 6 A flowchart illustrating a data processing method provided in another embodiment of this application;
[0072] Figure 7 A flowchart illustrating a data processing method provided in another embodiment of this application;
[0073] Figure 8 A flowchart illustrating a data processing method provided in another embodiment of this application;
[0074] Figure 9 A flowchart illustrating a data processing method provided in another embodiment of this application;
[0075] Figure 10 A flowchart illustrating a data processing method provided in another embodiment of this application;
[0076] Figure 11 A schematic diagram of the knowledge base retrieval process in a data processing method provided in a certain embodiment of this application;
[0077] Figure 12 A flowchart illustrating a data processing method provided in another embodiment of this application;
[0078] Figure 13 A flowchart illustrating a data processing method provided in another embodiment of this application;
[0079] Figure 14 A flowchart illustrating a data processing method provided in another embodiment of this application;
[0080] Figure 15 A flowchart illustrating the high-quality content filtering process in a data processing method provided in a certain embodiment of this application;
[0081] Figure 16 A flowchart illustrating a data processing method provided in yet another embodiment of this application;
[0082] Figure 17 A schematic diagram illustrating the process of continuous model optimization and knowledge sharing in a data processing method provided in a certain embodiment of this application;
[0083] Figure 18 A schematic diagram of a data processing system architecture provided in one embodiment of this application;
[0084] Figure 19 A schematic diagram illustrating the construction of a data processing system according to a certain embodiment of this application;
[0085] Figure 20 This is a schematic diagram of the structure of a data processing apparatus provided in one embodiment of this application;
[0086] Figure 21 This is a schematic diagram of the structure of a data processing apparatus provided in another embodiment of this application;
[0087] Figure 22 This is a schematic diagram of the structure of a data processing apparatus provided in another embodiment of this application;
[0088] Figure 23A schematic diagram of the structure of a data processing apparatus provided in another embodiment of this application;
[0089] Figure 24 This is a schematic diagram of a server structure provided in one embodiment of this application. Detailed Implementation
[0090] This application provides a data processing method that uses a knowledge base stored in a blockchain as the retrieval database for a natural language processing model, thus avoiding the problem of malicious tampering with the content stored in the knowledge base. The method verifies the response results generated by the natural language processing model using original information related to the keywords of the query statement stored in the knowledge base on the blockchain, and encapsulates the verified content into data. This avoids inconsistencies between the response results generated by the natural language processing model and the original information, ensuring the authenticity and reliability of the response information and improving its quality.
[0091] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding to,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0092] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0093] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0094] Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language people use in daily life—and thus it has a close relationship with linguistic research. NLP techniques typically include text processing, semantic understanding, machine translation, question answering, and knowledge graphs.
[0095] Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying platform, a platform product service layer, and an application service layer.
[0096] The underlying blockchain platform can include modules for user management, basic services, smart contracts, and operational monitoring. The user management module is responsible for managing the identity information of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between user identities and blockchain addresses (access management). Under authorization, it also monitors and audits transactions of certain real identities and provides risk control rule configuration (risk control audit). The basic services module is deployed on all blockchain node devices to verify the validity of business requests. After consensus is reached on valid requests, they are recorded in storage. For a new business request, the basic services first perform interface adaptation parsing and authentication (interface adaptation), and then encrypt the business information using a consensus algorithm (consensus management). After encryption, the data is transmitted completely and consistently to the shared ledger (network communication) and recorded and stored. The smart contract module is responsible for contract registration, issuance, triggering, and execution. Developers can define contract logic using a programming language and publish it to the blockchain (contract registration). According to the contract terms, the key or other events are invoked to trigger execution and complete the contract logic. It also provides functions for contract upgrades and cancellations. The operation and monitoring module is mainly responsible for deployment, configuration modification, contract settings, cloud adaptation, and real-time status visualization output during product release, such as alarms, network status monitoring, and node device health status monitoring.
[0097] The platform's product service layer provides the basic capabilities and implementation frameworks for typical applications. Developers can leverage these basic capabilities, along with the specific characteristics of their business needs, to implement blockchain-based business logic. The application service layer provides blockchain-based application services to business stakeholders.
[0098] To facilitate understanding of the technical solutions provided in the embodiments of this application, some key terms used in the embodiments of this application will be explained below:
[0099] Smart contracts: A type of program that runs on a blockchain. Unlike ordinary programs, smart contracts must ensure that the result is exactly the same on every node of the blockchain network, so that any node can verify whether the result of the smart contract execution in the block is correct.
[0100] ChatGPT (full name: Chat Generative Pre-trained Transformer) is a chatbot program developed by OpenAI in the United States and released on November 30, 2022. ChatGPT is an artificial intelligence-driven natural language processing model that can engage in conversation by understanding and learning human language. It can also interact based on the context of the chat, truly chatting and communicating like a human. It can even perform tasks such as writing emails, video scripts, copywriting, translation, coding, and writing academic papers.
[0101] Certificates: A digital certificate (or simply certificate) is an electronic file that uniquely identifies a person and a resource on the Internet. Certificates enable secure and confidential communication between two entities. There are many types of certificates, such as personal certificates (used by individuals) and server certificates (used to establish secure sessions between servers and clients via Secure Sockets Layer (SSL) technology).
[0102] Signature verification: A digital signature (also known as a public-key digital signature) is a string of numbers that only the sender of the information can generate and that cannot be forged by others. This string of numbers also serves as valid proof of the authenticity of the information sent by the sender. Signature verification is the process by which the recipient confirms that the encrypted file they received was indeed sent by the sender. It requires checking whether it has been tampered with (unlike decryption). Signature verification ultimately involves comparing the message digest.
[0103] Bloom Filter: A Bloom filter was proposed by Bloom in 1970. It is essentially a long binary vector and a series of random mapping functions. Bloom filters can be used to check whether an element is in a set, and their advantages are that their space efficiency and query time far exceed those of general algorithms.
[0104] CDN: CDN stands for Content Delivery Network. Its basic idea is to bypass bottlenecks and points of failure on the internet that could affect data transmission speed and stability, making content delivery faster and more stable. By placing node servers throughout the network, forming an intelligent virtual network on top of the existing internet infrastructure, the CDN system can redirect user requests to the nearest service node in real time based on comprehensive information such as network traffic, the connectivity and load of each node, as well as distance and response time to the user. Its purpose is to allow users to obtain the content they need from the nearest location, alleviating internet congestion and improving website response speed.
[0105] Existing natural language processing (NLP) models provide knowledge-based answers by extracting keywords from user queries, retrieving them from a knowledge base, packaging the retrieved knowledge, and then outputting the answer. However, since the content in the knowledge base is pre-set and stored manually, its authenticity and reliability cannot be guaranteed. If the content stored in the knowledge base is maliciously tampered with, the quality of the answer generated by the NLP model cannot be guaranteed.
[0106] Current blockchain-based knowledge base systems merely store content on the blockchain to ensure data trustworthiness. However, no blockchain knowledge base system integrates with natural language processing models (such as ChatGPT), making it difficult to achieve question-answering effects and to supplement and optimize the knowledge base content. ChatGPT, as the most influential chatbot program currently available, has immense value in content generation. However, using ChatGPT alone makes it difficult to obtain high-quality knowledge as a data source for training.
[0107] The method provided in this application processes a query statement using a natural language processing (NLP) model to generate a predicted response; it retrieves original information containing keywords from a knowledge base stored on a blockchain node; it verifies the predicted response based on the original information containing keywords; and it encapsulates the verified predicted response with the original information to generate response information. By using the knowledge base stored in the blockchain as the retrieval database for the NLP model, the problem of malicious tampering with the content stored in the knowledge base is avoided; by verifying the response generated by the NLP model with the original information, inconsistencies between the response generated by the NLP model and the original information are avoided, ensuring the authenticity and reliability of the response information and improving its quality.
[0108] The system involved in the embodiments of this application can be a distributed system formed by connecting a client and multiple nodes (any form of computing device in the network, such as a server or user terminal) through network communication.
[0109] Taking a distributed system as an example, see blockchain system. Figure 1 , Figure 1This is an optional structural diagram of the distributed system 100 provided in this application embodiment applied to a blockchain system. It consists of multiple nodes (any form of computing device in the network, such as servers or user terminals) and clients, forming a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In the distributed system, any machine, such as a server or terminal, can join and become a node. A node includes a hardware layer, a middleware layer, an operating system layer, and an application layer.
[0110] See Figure 1 The functions of each node in the blockchain system shown include:
[0111] 1) Routing: A basic function of nodes used to support communication between nodes.
[0112] In addition to routing capabilities, nodes can also have the following functions:
[0113] 2) Applications are deployed in the blockchain to implement specific business needs. They record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system. When other nodes successfully verify the source and integrity of the record data, they add the record data to a temporary block.
[0114] For example, the business logic implemented by the application includes:
[0115] 2.1) A wallet is used to provide the function of conducting electronic currency transactions, including initiating transactions (i.e., sending the transaction record of the current transaction to other nodes in the blockchain system; after other nodes successfully verify the transaction, they store the transaction record data in the temporary block of the blockchain as a response to acknowledge the validity of the transaction; of course, the wallet also supports querying the remaining electronic currency in the electronic currency address;
[0116] 2.2) Shared ledger, used to provide functions such as storage, query and modification of ledger data. It sends the record data of the operation on the ledger data to other nodes in the blockchain system. After the other nodes verify the validity, as a response to acknowledge the validity of the ledger data, they store the record data in a temporary block. They can also send confirmation to the node that initiated the operation.
[0117] 2.3) Smart contracts are computerized protocols that can execute the terms of a contract. They are implemented through code deployed on a shared ledger that executes when certain conditions are met. Based on actual business needs, the code is used to complete automated transactions, such as querying the logistics status of goods purchased by a buyer and transferring the buyer's electronic money to the merchant's address after the buyer signs for the goods. Of course, smart contracts are not limited to executing contracts for transactions; they can also execute contracts for processing received information.
[0118] 3) A blockchain consists of a series of blocks that are sequentially generated. Once a new block is added to the blockchain, it will not be removed. The blocks contain the data submitted by the nodes in the blockchain system.
[0119] See Figure 2 , Figure 2 This is an optional schematic diagram of the block structure provided in this application embodiment. Each block includes the hash value of the transaction records stored in this block (the hash value of this block) and the hash value of the previous block. The blocks are connected through their hash values to form a blockchain. Additionally, the block may include information such as a timestamp when it was generated. A blockchain is essentially a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains relevant information used to verify the validity of the information (anti-counterfeiting) and to generate the next block.
[0120] Please see Figure 3 , Figure 3 This is a diagram illustrating the application environment of the data processing method in the embodiments of this application, such as... Figure 3 As shown, the data processing method in this embodiment is applied to a data processing system. The data processing system includes a server and terminal devices. The server can be an independent physical server, a server cluster consisting of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.
[0121] The server first receives the query from the target object. Next, it uses the query as input to a natural language processing (NLP) model, which processes the query to generate a predicted response. This predicted response is generated by the NLP model retrieving relevant information from a knowledge base (stored on blockchain nodes) based on keywords in the query. Simultaneously, the server extracts keywords from the query. Then, based on these keywords, the server retrieves the relevant information from the knowledge base stored on the blockchain nodes. Next, the server verifies the predicted response based on the relevant information, encapsulates the verified predicted response with the relevant information, and generates a response message. Finally, the server sends the response message to the target object.
[0122] The data processing methods in this application will be described below from the server's perspective. Please refer to [link / reference needed]. Figure 4 The data processing method provided in this application includes steps S110 to S160. It should be noted that steps S120 and S130 to S140 can be parallel steps or sequential steps. For example, step S120 can be executed first, followed by step S130, or steps S130 and S140 can be executed first, followed by step S120. The accompanying drawings of this application embodiment illustrate the parallel execution of steps S120 and S130 to S140 as an example. Specifically:
[0123] S110, Receive the query statement sent by the target object.
[0124] Understandably, the target audience can be users, who can obtain answers to their questions through dialogue using natural language processing models (such as chatbots). Users send their questions to the server in the form of queries. The server receives these queries, which can be in voice, text, or other formats.
[0125] S120. The query statement is used as input to the natural language processing model. The natural language processing model processes the query statement and generates a predicted response.
[0126] The natural language processing model retrieves original information from the knowledge base that is more relevant to the keywords than the relevance threshold based on the keywords in the query statement. Natural language processing is then performed on the original information that is more relevant to the keywords than the relevance threshold to generate a predicted response. The original information is information containing keywords stored in the knowledge base, which is stored on a blockchain node.
[0127] Understandably, a natural language processing (NLP) model can be a chatbot (such as ChatGPT), where the server transmits queries to the NLP model. The NLP model processes the queries, including preprocessing the text, model prediction, and text generation. Preprocessing the text involves cleaning the query data, such as segmenting the query into words, removing useless symbols, punctuation, and stop words to extract effective keywords. Model prediction involves retrieving the extracted keywords from a database (e.g., a knowledge base), ranking the retrieved knowledge based on relevance, and selecting or predicting the most relevant original information to the query. Since the original information in the knowledge base is described in a professional way, the NLP model needs to perform natural language processing (e.g., encapsulation, language translation) to obtain predictive responses that are easy for users to read.
[0128] A blockchain consists of at least three nodes, each storing identical content to ensure data security. The knowledge base is stored on the blockchain nodes in, but not limited to, the following two methods: 1. Storing all information (knowledge) in the knowledge base on the blockchain nodes; 2. Storing the link corresponding to each piece of information (knowledge) in the knowledge base on the blockchain nodes. All information (knowledge) in the knowledge base is stored on a storage server (including but not limited to: local server or cloud server). Information on the storage server can be accessed by accessing the links in the blockchain nodes.
[0129] This application embodiment uses a knowledge base stored in the blockchain as the retrieval database for the natural language processing model. Based on the characteristics of blockchain, the problem of malicious tampering of the content stored in the knowledge base can be avoided. Furthermore, the knowledge base stored in the blockchain can ensure that each piece of knowledge has been screened by experts / users, thereby guaranteeing the authenticity and reliability of the content in the knowledge base.
[0130] S130. Extract keywords from the query statement.
[0131] Understandably, the server preprocesses the query statement, that is, it segments the query statement into words, removes useless symbols, punctuation and stop words, and thus extracts effective keywords.
[0132] S140. Based on the keywords, retrieve the original information containing the keywords from the knowledge base stored in the blockchain node.
[0133] It is understandable that the knowledge base stored from the blockchain nodes contains all the original information of the keywords. Since the natural language processing model is trained using a black-box method, its accuracy in keyword extraction and retrieval is relatively low. Steps S130 and S140 perform further keyword extraction and retrieval on the query statement to verify the predicted response generated by the natural language processing model, thereby improving the accuracy of the response information.
[0134] S150. Verify the predicted response result based on the original information containing the keywords, encapsulate the verified predicted response result with the original information, and generate response information.
[0135] Understandably, natural language processing (NLP) models may introduce processing errors when processing raw information. These errors could arise during data encapsulation or language translation. Therefore, it's necessary to validate the predicted responses generated by the NLP models. This validation process involves verifying the predicted responses against the raw information, retaining the identical content, and then encapsulating this identical content to generate the response information. The response information can be in the form of voice, text, images, video, audio, etc.
[0136] S160. Send the reply information to the target.
[0137] Understandably, the server will send the generated response information to the target object.
[0138] The method provided in this application avoids the problem of malicious tampering of the content stored in the knowledge base by using the knowledge base stored in the blockchain as the retrieval database of the natural language processing model; it verifies the response results generated by the natural language processing model by using the original information related to the keywords of the query statement stored in the knowledge base in the blockchain, and encapsulates the verified content into data, thereby avoiding the situation where the response results generated by the natural language processing model are inconsistent with the original information, ensuring the authenticity and reliability of the response information, and improving the quality of the response information.
[0139] In this application Figure 4 In one optional embodiment of the data processing method provided in the corresponding embodiment, please refer to... Figure 5 Step S140 further includes sub-steps S141 to S143; it should be noted that sub-steps S142 and S143 are parallel steps, and in specific execution, one of sub-steps S142 and S143 needs to be selected for execution based on the judgment condition. Specifically:
[0140] S141. Based on the keyword, query the cached information containing the keyword from the blockchain nodes.
[0141] Among them, cached information is used to represent information temporarily stored in blockchain nodes.
[0142] Understandably, if a keyword in a query is appearing for the first time, the corresponding original information will be cached. When the keyword appears again, or if it's not the first time, the server can directly retrieve the cached original information. When performing a keyword search, the server first checks if the cached information contains the keyword. If it does, the cached information containing the keyword is used as the original information; otherwise, the keyword search is performed in the knowledge base. A Bloom filter can be used to query all cached information for cached information containing the keyword.
[0143] S142. If a blockchain node contains cached information of keywords, then the cached information containing keywords will be used as the original information.
[0144] Understandably, when the server performs keyword retrieval, it first checks whether the cached information contains the keyword. If the cached information contains the keyword, it uses the cached information containing the keyword as the original information.
[0145] S143. If the blockchain node does not contain cached information of keywords, then retrieve the storage information containing keywords from the knowledge base stored in the blockchain node, and use the storage information containing keywords as the original information.
[0146] Understandably, when performing keyword retrieval, the server first checks whether the cached information contains the keyword. If the cached information does not contain the keyword, then the keyword retrieval is performed in the knowledge base.
[0147] The method provided in this application first checks whether the cached information contains the keyword when searching for keywords. If the cached information contains the keyword, the cached information containing the keyword is used as the original information. If the cached information does not contain the keyword, the keyword is searched in the knowledge base. Since the amount of data in the cached information is relatively small compared to the amount of data in the knowledge base, the search time can be shortened, the amount of computation reduced, and the data processing efficiency improved by searching for keywords in the cached information.
[0148] In this application Figure 5 In one optional embodiment of the data processing method provided in the corresponding embodiment, please refer to... Figure 6Sub-step S143 further includes sub-steps S1431 to S1433; it should be noted that sub-steps S1432 and S1433 are parallel steps, and in specific execution, one of sub-steps S1432 and S1433 needs to be selected for execution based on the judgment condition. Specifically:
[0149] S1431. If the blockchain node does not contain cached information of the keyword, then query the storage information containing the keyword from the knowledge base stored in the blockchain node.
[0150] Understandably, when performing keyword retrieval, the server first checks whether the cached information contains the keyword. If the cached information does not contain the keyword, then the keyword retrieval is performed in the knowledge base's stored information.
[0151] S1432. If the knowledge base stored by the blockchain node contains storage information of keywords, then the storage information containing keywords will be used as the original information.
[0152] It is understandable that when performing keyword retrieval in the knowledge base's stored information, if the knowledge base's stored information includes information containing the keywords, then the stored information containing the keywords will be used as the original information.
[0153] S1433. If the knowledge base stored by the blockchain node does not contain the storage information of the keywords, a prompt message indicating that the original information does not exist will be generated.
[0154] Understandably, when performing keyword searches within the knowledge base's stored information, if the knowledge base does not contain stored information containing the keywords, a message indicating that the original information does not exist is generated and sent to the target object to inform the target object that the query it sent does not have a response.
[0155] The method provided in this application, when searching for keywords, first checks whether the cached information contains the keywords. If the cached information does not contain the keywords, then a keyword search is performed in the knowledge base. If information containing the keywords is found in the knowledge base, then that information is used as the original information. If no information containing the keywords is found in the knowledge base, then the target object is informed that there is no response information for the query it sent, thereby improving user interactivity.
[0156] In this application Figure 4 In one optional embodiment of the data processing method provided in the corresponding embodiment, please refer to... Figure 7 Step S120 further includes sub-steps S121 to S124. Specifically:
[0157] S121. The query statement is used as input to the natural language processing model. Keywords are extracted from the query statement by the natural language processing model.
[0158] Understandably, natural language processing models preprocess query statements, that is, they segment the query statements into words, remove useless symbols, punctuation marks and stop words, and thus extract effective keywords.
[0159] S122. Retrieve candidate information related to the keywords from the knowledge base.
[0160] Understandably, using a knowledge base stored on the blockchain as the retrieval database for a natural language processing model leverages the characteristics of blockchain to prevent malicious tampering of the stored content. Furthermore, the blockchain-based knowledge base ensures that each piece of knowledge has been screened by experts / users, guaranteeing the authenticity and reliability of the content. All information retrieved related to the keywords is then used as candidate information.
[0161] S123. Based on the relevance between candidate information related to the keyword and the keyword, determine the original information from the candidate information whose relevance is higher than the relevance threshold.
[0162] Understandably, natural language processing models perform predictions by retrieving extracted effective keywords from a knowledge base, ranking the retrieved knowledge based on relevance, and then filtering out or predicting the most relevant original information to the query. Specifically, based on the relevance of candidate information related to the keywords to the keywords, and the relevance of the candidate information to the query, original information with a relevance higher than a relevance threshold is determined from the candidate information.
[0163] S124. Perform natural language processing on the raw information to generate a predicted response.
[0164] Understandably, since the original information in the knowledge base is described in a professional way, the natural language processing model needs to perform natural language processing on the original information (such as encapsulating the original information, translating it into different languages, etc.) to obtain predictive response results that are easy for users to read.
[0165] The method provided in this application uses a knowledge base stored in the blockchain as the retrieval database for a natural language processing model. Based on the characteristics of blockchain, it can avoid the problem of malicious tampering of the content stored in the knowledge base in the blockchain, thus ensuring the authenticity and reliability of the response information and improving the quality of the response information.
[0166] In this application Figure 7In one optional embodiment of the data processing method provided in the corresponding embodiment, please refer to... Figure 8 Step S125 follows step S122. Specifically:
[0167] S125. If no candidate information related to the keyword is retrieved in the knowledge base, a prompt message indicating that the answer result cannot be predicted is generated.
[0168] Understandably, when performing keyword searches in the knowledge base's stored information, if the knowledge base does not contain stored information containing the keywords, a prompt message indicating that the answer cannot be predicted is generated and sent to the target object to inform the target object that there is no answer to the query it sent.
[0169] The method provided in this application, when a natural language processing model searches for keywords, if no information containing the keywords is found in the knowledge base, it informs the target object that there is no response to the query it sent, thereby improving user interactivity.
[0170] In this application Figure 4 In one optional embodiment of the data processing method provided in the corresponding embodiment, please refer to... Figure 9 Step S150 further includes sub-steps S151 to S152. Specifically:
[0171] S151. Verify the predicted response results based on the original information containing the keywords, and retain the content in the predicted response results that is consistent with the original information.
[0172] Understandably, natural language processing (NLP) models may introduce processing errors when processing raw information, such as encapsulation errors during data encapsulation or language translation errors. Therefore, it's necessary to validate the predicted responses generated by the NLP models. Validating the predicted responses using the raw information involves retaining the content identical to the original information. This validation can be achieved by calculating the repetition rate between the original information and the predicted response. If the repetition rate is higher than a first repetition rate threshold, all information in the predicted response is accurate, and the entire response is retained. If the repetition rate is lower than the first threshold but higher than a second threshold (where the second threshold is lower than the first), some information is accurate, and only the content identical to the original information is retained. If the repetition rate is lower than the second threshold, all information is inaccurate, and only the original information is retained.
[0173] S152. Encapsulate the data of the content in the predicted response result that is consistent with the original information to generate response information.
[0174] Understandably, the content in the predicted response that is identical to the original information is encapsulated to generate response information. A repetition rate is calculated between the original information and the predicted response. If the repetition rate is higher than a first repetition rate threshold, it indicates that all information in the predicted response is accurate, and the entire content of the predicted response is retained. The predicted response is then encapsulated to generate response information. If the repetition rate is lower than the first repetition rate threshold but higher than a second repetition rate threshold (where the second repetition rate threshold is lower than the first repetition rate threshold), it indicates that some information in the predicted response is accurate. Only the content in the predicted response that is identical to the original information is retained, and this identical content is encapsulated. Identical content refers to information in the predicted response that is completely identical to the original information or has the same meaning but a different expression. If the repetition rate is lower than the second repetition rate threshold, it indicates that all information in the predicted response is inaccurate. In this case, only the content of the original information is retained, and the original information is encapsulated.
[0175] Data encapsulation can involve mapping content in the predicted response that matches the original information to the payload of an encapsulation protocol, then filling in the corresponding protocol header to form a data packet with the encapsulation protocol, performing rate adaptation, and generating response information. For example, data encapsulation can involve language packaging of content in the predicted response that matches the original information, adding salutations, honorifics, changing the language style, etc.
[0176] The method provided in this application verifies the response results generated by the natural language processing model by storing original information related to the keywords of the query statement in a knowledge base in the blockchain. It encapsulates the content in the predicted response results that is the same as the original information, thereby avoiding the situation where the response results generated by the natural language processing model are inconsistent with the original information, ensuring the authenticity and reliability of the response information, and improving the quality of the response information.
[0177] In this application Figure 4 In one optional embodiment of the data processing method provided in the corresponding embodiment, please refer to... Figure 10 Step S140 further includes sub-steps S1401 to S1402. Specifically:
[0178] S1401. Based on the keywords, obtain the link information containing the keywords from the blockchain nodes.
[0179] It is understood that this application embodiment stores the link information corresponding to each piece of knowledge in the knowledge base in the blockchain node. By accessing the link information, the knowledge in the knowledge base can be obtained. Link information containing keywords is obtained from the link information corresponding to each piece of knowledge.
[0180] S1402. Access the link information containing the keywords through the content delivery network to obtain the original information corresponding to the link information.
[0181] It is understandable that by accessing links containing keywords through a content delivery network, the original information containing the keywords can be obtained.
[0182] The method provided in this application embodiment stores the link information corresponding to each piece of knowledge in the knowledge base in the blockchain node. Compared with storing the knowledge base in the blockchain node, this can reduce the storage pressure on the blockchain node, free up the storage space of the blockchain node, and improve the computing speed of the blockchain node.
[0183] For easier understanding, please refer to Figure 11 , Figure 11This is a flowchart illustrating the knowledge base retrieval process in the data processing method provided in this application embodiment. This application embodiment describes the knowledge base retrieval and model prediction process corresponding to a user's knowledge base query. The user inputs a query, which serves as input to the natural language processing (NLP) model. The NLP model searches the knowledge base for keywords in the query to determine if a predicted response can be generated. If the keywords in the query are too vague or do not exist in the knowledge base, a message indicating that a predictable response cannot be generated is generated and sent to the target object, informing them that no response exists for their query. If the keywords in the query exist in the knowledge base, the NLP model performs a prediction, retrieving the extracted valid keywords and ranking the retrieved knowledge based on relevance to select or predict the most relevant original information. Then, NLP is applied to this original information to generate a predicted response.
[0184] Simultaneously, the server processes the query, extracts valid keywords, and first searches for these keywords using a Bloom filter. If information containing the keywords is found in the Bloom filter, it is used as the original information. If no information containing the keywords is found in the Bloom filter, the server queries the cached information containing the keywords in the blockchain nodes. If cached information containing the keywords is found in the blockchain nodes, it is used as the original information. If cached information containing the keywords is not found in the blockchain nodes, the server queries the knowledge base stored in the blockchain nodes for the original information containing the keywords. If the original information containing the keywords is not found in the knowledge base stored in the blockchain nodes, a message indicating that the original information does not exist is generated and sent to the target object to inform it that its query has no response. If the original information containing the keywords is found in the knowledge base stored in the blockchain nodes, it is used in the verification step.
[0185] The predicted response is verified using the original information. Content in the predicted response that is identical to the original information is retained. This identical content is then encapsulated to generate response information, which is then sent to the target object.
[0186] Compared to existing solutions where the knowledge base of a natural language processing (NLP) model is manually set, the method provided in this application stores the NLP model's knowledge base in a blockchain node, avoiding the problem of malicious tampering with the content stored in the knowledge base. Compared to existing blockchain knowledge base systems that do not integrate with the NLP model, the method provided in this application combines the NLP model with the knowledge base stored in the blockchain to achieve question-and-answer effects, improving user experience and interactivity. The method provided in this application ensures high-quality knowledge through the blockchain and scalability of the knowledge base through the NLP model, allowing for mutual supplementation and learning, thereby ensuring the high quality and improveability of the system.
[0187] In this application Figure 4 In one optional embodiment of the data processing method provided in the corresponding embodiment, please refer to... Figure 12 Following step S160 are steps S170 to S180. Specifically:
[0188] S170. Obtain the target audience's rating of the response information.
[0189] The rating is used to characterize the target audience's satisfaction with the response information.
[0190] Understandably, after sending the response to the target audience and ensuring that the user receives the response, the user will be invited to rate the response. Once the user rates the response, the rating will be obtained.
[0191] It should be noted that the target audience's rating of the response information does not involve any user privacy, and the user's rating will be kept confidential. This rating will not affect the user's subsequent use of the model.
[0192] S180. If the score exceeds the scoring threshold, the query statement and response information will be stored in the knowledge base.
[0193] The query statements and response information are used to train the natural language processing model.
[0194] Understandably, if the score exceeds the scoring threshold, it indicates that the user is relatively satisfied with the response information generated for the query. The query and response information are then stored in the knowledge base as positive feedback or incentives for training the natural language processing model.
[0195] The method provided in this application adds query statements and answer information that have been rated by users exceeding a rating threshold to the knowledge base, thereby expanding the knowledge volume of the knowledge base. Furthermore, the method provided in this application selects high-quality questions and answers and uses them as positive feedback or incentives to train the natural language processing model, thereby improving the accuracy of the model's predictions and achieving higher prediction accuracy.
[0196] In this application Figure 12 In one optional embodiment of the data processing method provided in the corresponding embodiment, please refer to... Figure 13 Following step S180 are steps S190 to S200. Specifically:
[0197] S190. Create index information based on the query statement and the response information.
[0198] S200: Cache the index information in the blockchain node.
[0199] Understandably, the index information corresponding to the query and response is stored in the blockchain node in a cached manner. When a user or another user sends the query, the query and response are retrieved from the cached information in the blockchain node to build the index information. The index information is then accessed through the content delivery network to obtain the response information corresponding to the query and send the response information to the target object.
[0200] Compared to directly storing query statements and response information in the blockchain node, the method provided in this application embodiment reduces the caching pressure on the blockchain node by establishing index information for query statements and response information and caching the index information in the blockchain node. When a user sends the query statement again or another user sends the query statement, the query statement and response information are retrieved from the cached information in the blockchain node to establish the index information, reducing the computational load of the blockchain node, reducing the computation time of the blockchain node, and improving the operating efficiency of the blockchain node.
[0201] In this application Figure 12 In one optional embodiment of the data processing method provided in the corresponding embodiment, please refer to... Figure 14 Step S170 further includes sub-steps S171 to S173. Specifically:
[0202] S171. Receive the target object's rating information for the response information.
[0203] The scoring information is the signature information made by the target object based on its private key.
[0204] Understandably, after sending the response to the target audience and ensuring the user receives it, the user is invited to rate the response. When the user rates the response, the rating is signed using the user's private key, generating a rating message. The user then sends the rating message, signed with their private key, to the server. The server receives this rating message.
[0205] S172. Obtain the public key information corresponding to the private key of the target object.
[0206] S173. Decrypt the scoring information based on the public key information to obtain the target object's score for the response information.
[0207] Understandably, the server obtains the public key information corresponding to the target object's private key, decrypts the scoring information, and obtains the target object's score for the response information.
[0208] The method provided in this application embodiment involves a user signing a score with a private key to generate encrypted score information, and then transmitting the encrypted score information to improve data security.
[0209] For easier understanding, please refer to Figure 15 , Figure 15 This is a flowchart illustrating the process of selecting high-quality content in the data processing method provided in this application embodiment. This application embodiment describes the process of users rating the response information generated by the model and the selection of high-quality content that can be used for training and prediction of the natural language processing model. Users view the response information and rate its satisfaction. The user signs the rating using their private key, generates rating information, and sends the rating information to the server. The server decrypts the rating information using the public key information corresponding to the user's private key to obtain the user's rating for the response information. If the rating exceeds a rating threshold, the user's query and the model's output response information are stored in the CDN network, and an index of the query and response information is created. This index information is stored in a blockchain node and in a Bloom filter. The selected high-quality content can be used for incremental training of the natural language processing model.
[0210] The method provided in this application evaluates the response information output by the model through user scoring to select high-quality questions and answers, which are then added to the knowledge base to expand the knowledge volume of the knowledge base. Furthermore, the selected high-quality questions and answers can also be used to incrementally train the natural language processing model, thereby achieving higher prediction accuracy of the natural language processing model.
[0211] In this application Figure 4 In one optional embodiment of the data processing method provided in the corresponding embodiment, please refer to... Figure 16The data processing method further includes steps S210 to S260. Specifically:
[0212] S210. Classify the original information stored in the knowledge base to obtain M categories.
[0213] Where M is an integer greater than or equal to 1.
[0214] It is understandable that all the knowledge stored in the knowledge base is classified into M categories.
[0215] S220. Establish index links for the original information in each of the M categories to obtain M information index links.
[0216] Specifically, the original information corresponding to the category is obtained by accessing the information index link.
[0217] It is understandable that by establishing information index links corresponding to each category, when a certain information index link is accessed, all the knowledge under that category can be obtained.
[0218] S230, Obtain the training target category.
[0219] It is understandable that if it is necessary to enhance the model's predictive ability for a certain category, the training target category should be obtained.
[0220] S240. Obtain the target information index link corresponding to the training target category from M information index links according to the training target category.
[0221] It is understandable that the target information index link corresponding to the training target category is obtained from M information index links.
[0222] S250. Access the target information index link to obtain the original information corresponding to the target information index link.
[0223] It is understandable that a content delivery network can be used to access the target information index link in order to obtain all the knowledge corresponding to the target information index link.
[0224] S260. Train the natural language processing model based on the original information linked to the target information index.
[0225] It is understandable that the natural language processing model is trained based on the original information corresponding to the target information index link to improve the model's predictive ability for that category. The method provided in this application supports training the model for one target category, training multiple target categories simultaneously, or training all categories; that is, the number of target categories can be one or any integer less than or equal to M. The training data for model training can include content from the knowledge base, high-quality question-and-answer selected through user ratings, or high-quality question-and-answer obtained from other online channels.
[0226] Compared to existing natural language processing models that can only be trained using all training data, the method provided in this application classifies all content in the knowledge base, allowing the model to be trained on a specific category. This improves the targeting of model training, reduces training time, and increases training efficiency.
[0227] For easier understanding, please refer to Figure 17 , Figure 17 This is a flowchart illustrating the continuous model optimization and knowledge sharing process in the data processing method provided in this application embodiment. The server continuously acquires high-quality question-and-answer data from the network to supplement the knowledge base and optimizes the natural language processing model. Simultaneously, the knowledge base in the blockchain nodes is categorized by type, and information index links (such as subscription interfaces) are provided for each category, helping other content developers acquire high-quality knowledge in specific domains to train their own natural language processing models. High-quality question-and-answer data can be obtained based on user ratings, user-favorited high-quality question-and-answer data, and other online acquisition methods, serving as training data for the model. All training data is categorized, and information index links are established for each category. When a developer needs to train their natural language processing model in a specific category, they can access the information index link for that category to obtain all the training data for that category, thus enabling the training of the natural language processing model in that category.
[0228] The method provided in this application, by classifying all content in the training data and providing information index links for all categories, helps other content developers acquire high-quality knowledge in specific fields to train natural language processing models for specific categories.
[0229] Because blockchain and the knowledge-based question-answering system (the system that hosts the natural language processing model) need to communicate over a network, both need to have network capabilities. Furthermore, because the blockchain and the knowledge-based question-answering system need to mutually authenticate each other, both need to possess their own certificates; otherwise, they cannot trust each other. Therefore, the prerequisites for implementing the data processing system architecture include: 1) the blockchain and the knowledge-based question-answering system need to have network capabilities; 2) the blockchain and the knowledge-based question-answering system need to possess their own certificates.
[0230] For easier understanding, please refer to Figure 18 , Figure 18 This is a schematic diagram of the data processing system architecture provided in an embodiment of this application. The internal implementation of the data processing system and the interactions between its various modules are described in detail below:
[0231] 1. Blockchain Node: A module responsible for tasks such as block generation, consensus, and storage. Figure 18 The focus is on the module in the blockchain that interacts with the knowledge base question-and-answer system.
[0232] 1.1 Smart Contracts: In a blockchain, smart contracts are the code used to execute tasks, carrying all the task logic. In a knowledge-based question-and-answer system, the required smart contract methods mainly include: knowledge base content link notarization and knowledge base content link query. They are the core module of blockchain computing.
[0233] 1.2 Storage: In blockchain, information data and state database data are used to store information data. In a knowledge base question-and-answer system, the required storage content is the links to the content in the knowledge base.
[0234] 2. Knowledge Base Question Answering System: This system provides a unified interface for knowledge base question answering and stores natural language processing models (such as the ChatGPT model) and data links. It mainly includes the following modules:
[0235] 2.1 Network Module: This module is responsible for communicating with the blockchain, CDN, and users, receiving user requests and sending query requests, and finally returning the query results to the user.
[0236] 2.2 Authentication Module: This module is responsible for storing user signatures and cryptographic algorithms and verifying their validity. It includes: user signatures and cryptographic algorithms; specifically:
[0237] 2.2.1 User Signature: The user signature used to send the request;
[0238] 2.2.2 Cryptographic Algorithms: Cryptographic algorithms used to verify the correctness of user signatures.
[0239] 2.3 Interaction Module: This module is responsible for interacting with users, including user voting and determining the correctness of answers; specifically:
[0240] 2.3.1 User Voting: A module that responds to user votes and performs vote statistics;
[0241] 2.3.2 Response Correctness Determination: A module that determines the correctness of responses based on user votes on the responses from the natural language processing model.
[0242] 2.4 Machine Learning Module: The core module of the Natural Language Processing (NLP) model, including: new sample detection module, model prediction module, NLP model module, and model training module; specifically:
[0243] 2.4.1 New Sample Detection Module: This module detects high-quality external knowledge content and retrieves it for training.
[0244] 2.4.2 Model Prediction Module: A module that predicts user queries based on existing natural language processing models (such as the ChatGPT model);
[0245] 2.4.3 Natural Language Processing Model Module: A module that stores natural language processing models (such as the ChatGPT model);
[0246] 2.4.4 Model Training Module: This module performs initial training and incremental optimization training of natural language processing models (such as the ChatGPT model).
[0247] 2.5 Caching Module: This module caches and retrieves knowledge data, including data caching and Bloom filters; specifically:
[0248] 2.5.1 Data caching: A module that stores existing core and frequently accessed data in memory;
[0249] 2.5.2 Bloom Filter: Stores binary placeholders for all data. If a placeholder is accessed, the data may not actually exist; if a placeholder is not accessed, the data definitely exists.
[0250] 2.6 Data Service Module: Centralized data storage location, including full-text search, blockchain data synchronization, and database modules; specifically:
[0251] 2.6.1 Full-text search: A module that performs searches based on user keywords;
[0252] 2.6.2 Blockchain Data Synchronization: A module for synchronizing the latest consensus data from the blockchain;
[0253] 2.6.3 Database Module: This module stores all knowledge links (some original knowledge information may also be stored here).
[0254] 3. CDN network, a place to store all knowledge, provides the knowledge hash as a link for querying.
[0255] Through the aforementioned data processing system architecture, the various modules work together to supplement the blockchain knowledge base question-answering system with natural language processing models (such as the ChatGPT model), providing users with richer question-and-answer content. Simultaneously, user ratings evaluate the behavior of the natural language processing models (such as the ChatGPT model), selecting high-quality questions and answers to add to the knowledge base, thereby expanding its knowledge volume. Furthermore, user evaluations and external high-quality knowledge are used for incremental training of the natural language processing models (such as the ChatGPT model), achieving higher prediction accuracy. Next, the blockchain ensures that each piece of knowledge has been screened by experts / users, guaranteeing content quality. Finally, the blockchain knowledge base question-answering system categorizes information and provides subscription interfaces for each category, helping other users access high-quality knowledge in specific domains to train their own models.
[0256] Please see Figure 19 , Figure 19 This is a schematic diagram illustrating the construction of the data processing system provided in this application embodiment. This application embodiment provides a process for initially importing a pre-trained natural language processing model (such as the ChatGPT model) and knowledge base content into the knowledge base and deploying and training it, including: starting the knowledge base system; importing the pre-trained natural language processing model (such as the ChatGPT model); starting the machine learning module for new sample detection; starting the blockchain network; creating a knowledge base storage smart contract; preparing a high-quality content knowledge base; concurrently storing the high-quality content knowledge base in the CDN network; after each knowledge item is stored, uploading the URL to the blockchain; synchronizing the latest knowledge base URL information from the blockchain, establishing an index, and storing it; for each detected knowledge item, querying from the CDN and storing it in a Bloom filter; for each detected sample, optimizing and training the natural language processing model (such as the ChatGPT model); and completing the construction of the data processing system.
[0257] The key technical point of the method provided in this application is to offer a blockchain knowledge base question-answering system based on a natural language processing model (such as the ChatGPT model). Current blockchain-based knowledge base systems simply store content on the blockchain to ensure data trustworthiness, but no blockchain knowledge base system interfaces with a natural language processing model, making it difficult to supplement and optimize the knowledge base content. Natural language processing models, as the most influential chatbot programs currently available, have immense value in content generation.
[0258] The method provided in this application's embodiments can supplement a blockchain knowledge base question-answering system with a natural language processing (NLP) model, offering users richer question-answer content. Simultaneously, it evaluates the NLP model's prediction results through user ratings, selecting high-quality questions and answers to add to the knowledge base, thereby expanding its knowledge volume. Furthermore, user evaluations and external high-quality knowledge are used for incremental training of the NLP model, achieving higher prediction accuracy. Next, the blockchain mentioned in this patent ensures that each piece of knowledge is screened by experts / users, guaranteeing content quality. Finally, the blockchain knowledge base question-answering system categorizes information and provides subscription interfaces for each category, helping other users acquire high-quality knowledge in specific domains to train their own models.
[0259] The method provided in this application offers a blockchain-based knowledge base question-answering system based on a natural language processing (NLP) model. Existing blockchain-based knowledge base systems do not incorporate NLP models. While this ensures knowledge quality, it makes it difficult to achieve effective question-answering. Conversely, relying solely on NLP models makes it challenging to acquire high-quality knowledge as training data. The method provided in this application combines both approaches: ensuring high-quality knowledge through blockchain and achieving scalability of the knowledge base through NLP models, allowing for mutual complementarity and learning, thereby guaranteeing the system's high quality and potential for improvement. Finally, the entire system utilizes a public-private key mechanism to ensure the security of transaction execution.
[0260] The method provided in this application designs an execution flow for a blockchain knowledge base question-answering system based on a natural language processing (NLP) model. This includes a knowledge base system construction flow (the initial stage of importing the NLP model's pre-trained model and knowledge base content, and deploying and training it), a knowledge base search flow (the entire process of user knowledge base search and model prediction during knowledge base queries), and a high-quality generated content selection flow (the process of users scoring the answers generated by the NLP model, which affects model training and prediction). The design of these flows ensures the stable and efficient operation of the blockchain knowledge base question-answering system based on the NLP model throughout its entire lifecycle.
[0261] This application provides a method for continuous model optimization and knowledge sharing. The system continuously acquires high-quality question answers from the network to supplement the knowledge base and optimizes the training of the natural language processing model. At the same time, the blockchain knowledge base question answering system will classify according to categories and provide subscription interfaces according to each category, which helps other users to obtain high-quality knowledge in specific fields to train their own models.
[0262] The method provided in this application ensures high-quality and high-reliability data in the knowledge base question-answering system (blockchain + user filtering of high-quality answers from natural language processing models), and also guarantees continuous optimization of the natural language processing models (training with high-quality content). Furthermore, it categorizes data and provides subscription interfaces for each category, helping other users acquire high-quality knowledge in specific domains to train their own models. Finally, the entire system ensures the security and stability of transaction execution through a public-private key certificate mechanism, making it widely applicable in industry.
[0263] The data processing apparatus in this application is described in detail below. Please refer to [link / reference]. Figure 20 . Figure 20 This is a schematic diagram of one embodiment of the data processing device 10 in this application. The data processing device 10 includes: an inquiry statement receiving module 110, a predicted response result generation module 120, a keyword extraction module 130, a raw information acquisition module 140, a verification module 150, and a response information sending module 160. Specifically:
[0264] The query statement receiving module 110 is used to receive query statements sent by the target object.
[0265] The predictive response generation module 120 is used to take the query statement as input to the natural language processing model, process the query statement through the natural language processing model, and generate a predictive response result.
[0266] The natural language processing model retrieves original information from the knowledge base that is more relevant to the keywords than the relevance threshold based on the keywords in the query statement. Natural language processing is then performed on the original information that is more relevant to the keywords than the relevance threshold to generate a predicted response. The original information is information containing keywords stored in the knowledge base, which is stored on a blockchain node.
[0267] Keyword extraction module 130 is used to extract keywords from query statements.
[0268] The original information acquisition module 140 is used to acquire original information containing keywords from the knowledge base stored in the blockchain node based on the keywords.
[0269] The verification module 150 is used to verify the predicted response result based on the original information containing the keywords, and to encapsulate the verified predicted response result with the original information to generate response information.
[0270] The reply information sending module 160 is used to send reply information to the target object.
[0271] The apparatus provided in this application avoids the problem of malicious tampering with the content stored in the knowledge base by using the knowledge base stored in the blockchain as the retrieval database of the natural language processing model; it verifies the response results generated by the natural language processing model by using the original information related to the keywords of the query statement stored in the knowledge base in the blockchain, and encapsulates the verified content into data, thereby avoiding the situation where the response results generated by the natural language processing model are inconsistent with the original information, ensuring the authenticity and reliability of the response information, and improving the quality of the response information.
[0272] In this application Figure 20 In an optional embodiment of the data processing apparatus provided in the corresponding embodiment, the raw information acquisition module 140 is further configured to:
[0273] Based on the keywords, query the cached information containing the keywords from the blockchain nodes.
[0274] Among them, cached information is used to represent information temporarily stored in blockchain nodes.
[0275] If a blockchain node contains cached information for keywords, then the cached information containing keywords will be used as the original information.
[0276] If the blockchain node does not contain cached information of the keyword, then the stored information containing the keyword is obtained from the knowledge base stored in the blockchain node, and the stored information containing the keyword is used as the original information.
[0277] The apparatus provided in this application first checks whether the cached information contains the keyword when searching for keywords. If the cached information contains the keyword, the cached information containing the keyword is used as the original information. If the cached information does not contain the keyword, the keyword is searched in the knowledge base. Since the amount of data in the cached information is relatively small compared to the amount of data in the knowledge base, the search time can be shortened, the amount of computation reduced, and the data processing efficiency improved by searching for keywords in the cached information.
[0278] In this application Figure 20 In an optional embodiment of the data processing apparatus provided in the corresponding embodiment, the raw information acquisition module 140 is further configured to:
[0279] If the blockchain node does not contain cached information for the keyword, then the stored information containing the keyword will be retrieved from the knowledge base stored in the blockchain node.
[0280] If the knowledge base stored by a blockchain node contains stored information containing keywords, then the stored information containing keywords will be used as the original information.
[0281] If the knowledge base stored by the blockchain node does not contain the stored information of the keywords, a prompt message indicating that the original information does not exist will be generated.
[0282] The device provided in this application, when searching for keywords, first checks whether the cached information contains the keywords. If the cached information does not contain the keywords, it searches for the keywords in the knowledge base. If information containing the keywords is found in the knowledge base, it uses that information as the original information. If no information containing the keywords is found in the knowledge base, it informs the target object that there is no response information for the query it sent, thereby improving user interactivity.
[0283] In this application Figure 20 In an optional embodiment of the data processing apparatus provided in the corresponding embodiment, the predicted response result generation module 120 is further configured to:
[0284] The query statement is used as input to the natural language processing model, and keywords are extracted from the query statement by the natural language processing model.
[0285] Retrieve candidate information related to keywords from the knowledge base.
[0286] Based on the relevance of candidate information related to the keyword to the keyword, original information with a relevance higher than the relevance threshold is determined from the candidate information.
[0287] Natural language processing is performed on the raw information to generate predicted responses.
[0288] The apparatus provided in this application uses a knowledge base stored in the blockchain as the retrieval database for a natural language processing model. Based on the characteristics of blockchain, it can avoid the problem of malicious tampering of the content stored in the knowledge base in the blockchain, thus ensuring the authenticity and reliability of the response information and improving the quality of the response information.
[0289] In this application Figure 20 In an optional embodiment of the data processing apparatus provided in the corresponding embodiment, the predicted response result generation module 120 is further configured to:
[0290] If no candidate information related to the keyword is retrieved in the knowledge base, a prompt message indicating that the response result cannot be predicted is generated.
[0291] The device provided in this application embodiment, when searching for keywords using a natural language processing model, if no information containing the keywords is found in the knowledge base, informs the target object that there is no response information for the query it sent, thereby improving user interactivity.
[0292] In this application Figure 20In an optional embodiment of the data processing apparatus provided in the corresponding embodiment, the verification module 150 is further configured to:
[0293] The predicted response results are verified based on the original information containing the keywords, and the content in the predicted response results that is consistent with the original information is retained.
[0294] Data encapsulation is performed on the content in the predicted response that is consistent with the original information to generate response information.
[0295] The apparatus provided in this application verifies the response results generated by the natural language processing model by storing original information related to the keywords of the query statement in a knowledge base in the blockchain. It encapsulates the content in the predicted response results that is the same as the original information, thereby avoiding the situation where the response results generated by the natural language processing model are inconsistent with the original information, ensuring the authenticity and reliability of the response information, and improving the quality of the response information.
[0296] In this application Figure 20 In an optional embodiment of the data processing apparatus provided in the corresponding embodiment, the raw information acquisition module 140 is further configured to:
[0297] Based on the keywords, retrieve link information containing the keywords from blockchain nodes.
[0298] Access links containing keywords through a content delivery network to obtain the original information corresponding to the links.
[0299] The apparatus provided in this application embodiment stores the link information corresponding to each piece of knowledge in the knowledge base in the blockchain node. Compared with storing the knowledge base in the blockchain node, this can reduce the storage pressure on the blockchain node, free up the storage space of the blockchain node, and improve the computing speed of the blockchain node.
[0300] In this application Figure 20 In one alternative embodiment of the data processing apparatus provided in the corresponding embodiment, please refer to Figure 21 The data processing device 10 also includes a scoring acquisition module 170 and a sample storage module 180. Specifically:
[0301] The rating acquisition module 170 is used to acquire the rating of the target object for the response information.
[0302] The rating is used to characterize the target audience's satisfaction with the response information.
[0303] The sample storage module 180 is used to store the query statement and response information in the knowledge base if the score exceeds the score threshold. The query statement and response information are used to train the natural language processing model.
[0304] The apparatus provided in this application adds query statements and answer information that have been rated by users exceeding a rating threshold to the knowledge base, thereby expanding the knowledge volume of the knowledge base. Furthermore, the apparatus uses the method provided in this application to filter out high-quality questions and answers, which are then used as positive feedback or incentives to train the natural language processing model, thereby improving the accuracy of the model's predictions and achieving higher prediction accuracy.
[0305] In this application Figure 21 In one alternative embodiment of the data processing apparatus provided in the corresponding embodiment, please refer to Figure 22 The data processing device 10 also includes: an index information creation module 190 and an index information storage module 200. Specifically:
[0306] The index information creation module 190 is used to create index information based on the query statement and the response information.
[0307] The index information storage module 200 is used to cache index information in the blockchain node.
[0308] Compared to directly storing query statements and response information in the blockchain node, the device provided in this application embodiment reduces the caching pressure on the blockchain node by establishing index information for query statements and response information and caching the index information in the blockchain node. When a user sends the query statement again or another user sends the query statement, the query statement and response information are retrieved from the cached information in the blockchain node to establish index information, reducing the computational load of the blockchain node, reducing the computation time of the blockchain node, and improving the operating efficiency of the blockchain node.
[0309] In this application Figure 21 In an optional embodiment of the data processing apparatus provided in the corresponding embodiment, the scoring acquisition module 170 is further configured to:
[0310] Receive rating information from the target audience regarding the response information.
[0311] The scoring information is the signature information made by the target object based on its private key.
[0312] Obtain the public key information corresponding to the private key of the target object.
[0313] The scoring information is decrypted using the public key information to obtain the target object's score for the response.
[0314] The apparatus provided in this application embodiment allows users to sign scores with a private key to generate encrypted score information, and then transmit the encrypted score information to improve data security.
[0315] In this application Figure 20In one alternative embodiment of the data processing apparatus provided in the corresponding embodiment, please refer to Figure 23 The data processing device 10 also includes: a classification module 210, a category index building module 220, a training target category acquisition module 230, a target information index link determination module 240, a target information index link access module 250, and a natural language processing model training module 260. Specifically:
[0316] The classification module 210 is used to classify the original information stored in the knowledge base to obtain M categories.
[0317] Where M is an integer greater than or equal to 1.
[0318] The category index building module 220 is used to build index links for the original information in M categories respectively, so as to obtain M information index links.
[0319] Specifically, the original information corresponding to the category is obtained by accessing the information index link.
[0320] The training target category acquisition module 230 is used to acquire the training target category.
[0321] The target information index link determination module 240 is used to obtain the target information index link corresponding to the training target category from M information index links according to the training target category.
[0322] The target information index link access module 250 is used to access the target information index link and obtain the original information corresponding to the target information index link.
[0323] The Natural Language Processing Model Training Module 260 is used to train the natural language processing model based on the original information linked by the target information index.
[0324] Compared to existing natural language processing models that can only be trained using all training data, the device provided in this application classifies all content in the knowledge base, allowing the model to be trained on a specific category. This improves the targeting of model training, reduces training time, and increases training efficiency.
[0325] Figure 24This is a schematic diagram of a server structure provided in an embodiment of this application. The server 300 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 322 (e.g., one or more processors) and memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 342 or data 344. The memory 332 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the server. Furthermore, the CPU 322 may be configured to communicate with the storage media 330 and execute the series of instruction operations stored in the storage media 330 on the server 300.
[0326] Server 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.
[0327] The steps performed by the server in the above embodiments can be based on this Figure 24 The server structure shown.
[0328] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0329] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0330] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0331] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0332] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0333] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application 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. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A data processing method, characterized in that, include: Receive query statements sent by the target object; The query statement is used as input to a natural language processing (NLP) model. The NLP model processes the query statement to generate a predicted response. The NLP model retrieves original information from a knowledge base that is more relevant to the keywords than a relevance threshold based on the keywords in the query statement. The original information is information containing the keywords stored in the knowledge base, which is stored in a blockchain node. Extract keywords from the query statement; Based on the keywords, retrieve the original information containing the keywords from the knowledge base stored in the blockchain node; The predicted response result is verified based on the original information containing the keywords. The verified predicted response result and the original information are then encapsulated to generate response information. The response information is sent to the target object.
2. The data processing method as described in claim 1, characterized in that, The step of retrieving original information containing the keyword from the knowledge base stored by the blockchain node, based on the keyword, includes: Based on the keyword, query cached information containing the keyword from the blockchain node, wherein the cached information is used to represent information temporarily stored in the blockchain node; If the blockchain node contains cached information of the keyword, then the cached information containing the keyword will be used as the original information; If the blockchain node does not contain cached information for the keyword, then the storage information containing the keyword is obtained from the knowledge base stored in the blockchain node, and the storage information containing the keyword is used as the original information.
3. The data processing method as described in claim 2, characterized in that, If the blockchain node does not contain cached information for the keyword, then the stored information containing the keyword is obtained from the knowledge base stored in the blockchain node, and the stored information containing the keyword is used as the original information, including: If the blockchain node does not contain cached information for the keyword, then the storage information containing the keyword is queried from the knowledge base stored in the blockchain node. If the knowledge base stored by the blockchain node contains the storage information of the keyword, then the storage information containing the keyword will be used as the original information; If the knowledge base stored by the blockchain node does not contain the storage information of the keyword, a prompt message indicating that the original information does not exist is generated.
4. The data processing method as described in claim 1, characterized in that, The step of using the query statement as input to a natural language processing model, processing the query statement through the natural language processing model, and generating a predicted response includes: The query statement is used as input to a natural language processing model, and keywords are extracted from the query statement by the natural language processing model to obtain keywords; Retrieve candidate information related to the keywords from the knowledge base; Based on the relevance between candidate information related to the keyword and the keyword, original information with a relevance higher than a relevance threshold is determined from the candidate information; The original information is processed by natural language to generate a predicted response.
5. The data processing method as described in claim 4, characterized in that, After retrieving candidate information related to the keyword from the knowledge base, the process further includes: If no candidate information related to the keyword is retrieved in the knowledge base, a prompt message indicating that the response result cannot be predicted is generated.
6. The data processing method as described in claim 1, characterized in that, The step of verifying the predicted response result based on the original information containing the keywords, and then encapsulating the verified predicted response result with the original information to generate response information includes: The predicted response result is verified based on the original information containing the keywords, and the content in the predicted response result that is consistent with the original information is retained; The content in the predicted response result that is consistent with the original information is encapsulated to generate response information.
7. The data processing method as described in claim 1, characterized in that, The step of retrieving original information containing the keyword from the knowledge base stored by the blockchain node, based on the keyword, includes: Based on the keywords, retrieve link information containing the keywords from the blockchain nodes; Access the link information containing the keywords through the content delivery network to obtain the original information corresponding to the link information.
8. The data processing method as described in claim 1, characterized in that, After sending the response information to the target object, the process further includes: Obtain the target object's rating of the response information, wherein the rating is used to characterize the target object's satisfaction with the response information; If the score exceeds the scoring threshold, the query statement and the response information are stored in the knowledge base, wherein the query statement and the response information are used to train the natural language processing model.
9. The data processing method as described in claim 8, characterized in that, After storing the query and response information in the knowledge base if the score exceeds the scoring threshold, the method further includes: An index is created based on the query statement and the response information; The index information is cached in the blockchain node.
10. The data processing method as described in claim 8, characterized in that, The step of obtaining the target object's rating of the response information includes: Receive the target object's rating information for the response information, wherein the rating information is information signed by the target object based on the target object's private key; Obtain the public key information corresponding to the private key of the target object; The scoring information is decrypted using the public key information to obtain the target object's score for the response information.
11. The data processing method as described in claim 1, characterized in that, The method further includes: The original information stored in the knowledge base is classified into M categories, where M is an integer greater than or equal to 1; Establish index links for the original information in the M categories respectively to obtain M information index links, wherein the original information corresponding to the category is obtained by accessing the information index links; Obtain the training target category; Based on the training target category, obtain the target information index link corresponding to the training target category from the M information index links; Access the target information index link to obtain the original information corresponding to the target information index link; The natural language processing model is trained based on the original information corresponding to the target information index link.
12. A data processing apparatus, characterized in that, include: The query statement receiving module is used to receive query statements sent by the target object; The predictive response generation module is used to take the query statement as input to a natural language processing model, process the query statement through the natural language processing model, and generate a predictive response result. The natural language processing model retrieves original information from a knowledge base that is more relevant to the keywords than a relevance threshold based on the keywords in the query statement. Natural language processing is then performed on this original information to generate the predictive response result. The original information is information containing the keywords stored in the knowledge base, which is stored in a blockchain node. The keyword extraction module is used to extract keywords from the query statement; The original information acquisition module is used to acquire original information containing the keywords from the knowledge base stored by the blockchain node based on the keywords. The verification module is used to verify the predicted response result based on the original information containing the keywords, and to encapsulate the verified predicted response result with the original information to generate response information. The response information sending module is used to send the response information to the target object.
13. A computer device, characterized in that, include: Memory, transceiver, processor, and bus system; The memory is used to store programs; The processor is configured to execute a program in the memory, including executing the data processing method as described in any one of claims 1 to 11; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.
14. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the data processing method as claimed in any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, The computer program is executed by a processor using the data processing method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Open dialogue method and system based on man-machine interaction
CN109829052A
Knowledge graph-based question and answer implementation method and system
CN112328773A