On-chain data analysis method and device, computer equipment, readable storage medium and program product

By acquiring and processing preset task types and semantic vectors of data on chain, using the encryption technology of blockchain SIM cards and large language models, the problem of low efficiency of on-chain data analysis is solved, and efficient and secure data analysis is achieved.

CN119853915AActive Publication Date: 2025-04-18CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411995485.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-18
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The data analysis on the chain in the prior art is inefficient and it is difficult to cope with the exponential growth of data volume and complexity.

Method used

By obtaining a variety of preset task types, natural language problems input by users, its semantic vectors, constraint matrix and initial data fields, a blockchain SIM card is used to generate hash values and digital signatures, and the large language model is used for encryption and decryption, and the analysis results of on-chain data are output.

Benefits of technology

Improve the efficiency and accuracy of on-chain data analysis and ensure the security and privacy of data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119853915A_ABST
    Figure CN119853915A_ABST
Patent Text Reader

Abstract

The invention relates to an on-chain data analysis method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of obtaining a target data field based on multiple preset task types and semantic vectors, and obtaining a condition range corresponding to the semantic vectors based on a constraint condition matrix for each preset constraint condition; for combined data formed by the target data field, the condition range and the data on the target chain, encrypting the combined data based on a public key of a large language model to obtain encrypted data; generating a first hash value corresponding to the combined data based on the block chain SIM card, and generating a digital signature corresponding to the first hash value based on a private key of the block chain SIM card; and inputting the demand data, the public key of the block chain SIM card, the encrypted data, the first hash value and the digital signature into a large language model, and outputting an analysis result for the data on the target chain. According to the method provided by the invention, the analysis efficiency of the on-chain data can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to an on-chain data analysis method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the continuous development and popularization of blockchain technology, the on-chain data of blockchain networks are widely used in finance, logistics, supply chain and other fields. Therefore, the analysis of on-chain data is becoming more and more important.

[0003] In the existing technology, the on-chain data is mainly encrypted and verified by software calculations to achieve the analysis of on-chain data. However, as the amount of on-chain data grows exponentially, the scale and complexity of on-chain data far exceed traditional data, which makes this method less and less efficient in analyzing on-chain data. Summary of the invention

[0004] Based on this, it is necessary to provide an on-chain data analysis method, device, computer equipment, computer-readable storage medium and computer program product that can improve analysis efficiency in response to the above-mentioned technical problems.

[0005] In a first aspect, the present application provides an on-chain data analysis method, the method comprising:

[0006] Acquire multiple preset task types, a natural language question input by a user, at least one initial data field corresponding to the natural language question, a semantic vector corresponding to the natural language question, a constraint matrix, and multiple preset constraints;

[0007] Based on the multiple preset task types and the semantic vector, a target data field is obtained from the at least one initial data field, and for each preset constraint condition, a condition range corresponding to the semantic vector is obtained based on the constraint condition matrix;

[0008] Acquire at least one target on-chain data from the blockchain network, and encrypt the combined data formed by the target data field, the condition range, and the target on-chain data based on the public key of the large language model to obtain encrypted data;

[0009] Generate a first hash value corresponding to the combined data based on the blockchain SIM card, and generate a digital signature corresponding to the first hash value based on the private key of the blockchain SIM card;

[0010] The user's demand data is obtained from the natural language question, the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value and the digital signature are input into the large language model, and the analysis result for the data on the target chain is output.

[0011] In one embodiment, obtaining the semantic vector corresponding to the natural language question includes:

[0012] The natural language question is input into the embedding function of the large language model, and a semantic vector corresponding to the natural language question is output.

[0013] In one embodiment, the acquiring the target data field from the at least one initial data field based on the multiple preset task types and the semantic vector includes:

[0014] Inputting the semantic vector and the plurality of preset task types into a similarity function, and outputting a target task type corresponding to the natural language question;

[0015] Acquire a mapping matrix between task types and data fields, and acquire a weight value corresponding to the initial data field based on the target task type and the mapping matrix;

[0016] For each initial data field, when a weight value corresponding to the initial data field is greater than a weight threshold, the initial data field is determined as the target data field.

[0017] In one embodiment, obtaining at least one target on-chain data from the blockchain network includes:

[0018] Obtain at least one original on-chain data of the blockchain network;

[0019] For each type of original on-chain data, when the data field corresponding to the original on-chain data includes at least one target data field, determining the original on-chain data as intermediate on-chain data;

[0020] Cleaning the data on the intermediate chain to obtain cleaned data on the intermediate chain; wherein the data cleaning includes removing invalid data, duplicate data and noise data;

[0021] The target chain data is obtained based on the intermediate chain data after the data cleaning.

[0022] In one embodiment, the step of obtaining the target chain data based on the intermediate chain data after the data cleaning includes:

[0023] Obtaining context information of the data on the intermediate chain;

[0024] The context information is added to the intermediate chain data after the data cleaning to obtain the target chain data.

[0025] In one embodiment, the analysis result is output by the large language model based on the size relationship between the first hash value and the second hash value, and the size relationship between the first hash value and the third hash value; the second hash value is calculated by the large language model based on the combined data, and the combined data is obtained by the large language model decrypting the encrypted data based on the private key of the large language model; the third hash value is obtained by the large language model based on the decrypted digital signature, and the decrypted digital signature is obtained by the large language model decrypting the digital signature based on the public key of the blockchain SIM card.

[0026] In a second aspect, the present application further provides an on-chain data analysis device, the device comprising:

[0027] A first acquisition module is used to acquire multiple preset task types, a natural language question input by a user, at least one initial data field corresponding to the natural language question, a semantic vector corresponding to the natural language question, a constraint matrix and multiple preset constraints;

[0028] A second acquisition module is used to acquire a target data field from the at least one initial data field based on the multiple preset task types and the semantic vector, and acquire a condition range corresponding to the semantic vector based on the constraint condition matrix for each preset constraint condition;

[0029] A third acquisition module is used to acquire at least one target on-chain data from the blockchain network, and encrypt the combined data formed by the target data field, the condition range and the target on-chain data based on the public key of the large language model to obtain encrypted data;

[0030] A generation module, configured to generate a first hash value corresponding to the combined data based on a blockchain SIM card, and to generate a digital signature corresponding to the first hash value based on a private key of the blockchain SIM card;

[0031] The fourth acquisition module is used to obtain the user's demand data from the natural language question, input the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value and the digital signature into the large language model, and output the analysis result for the data on the target chain.

[0032] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.

[0033] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0034] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0035] The above-mentioned chain data analysis method, device, computer equipment, computer-readable storage medium and computer program product obtain multiple preset task types, natural language problems input by users, at least one initial data field corresponding to natural language problems, semantic vectors corresponding to natural language problems, constraint matrix and multiple preset constraints; based on multiple preset task types and semantic vectors, obtain the target data field from at least one initial data field, and for each preset constraint, obtain the condition range corresponding to the semantic vector based on the constraint matrix; obtain at least one target chain data from the blockchain network, for the target data field, condition range and target chain data formed by the combined data, encrypt the combined data based on the public key of the large language model to obtain encrypted data; generate the first hash value corresponding to the combined data based on the blockchain SIM card, and generate the digital signature corresponding to the first hash value based on the private key of the blockchain SIM card; obtain the user's demand data from the natural language problem, input the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value and the digital signature into the large language model, and output the analysis result for the target chain data. The method provided by the present application can effectively improve the efficiency and accuracy of analyzing the chain data. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A schematic diagram of a flow chart of an on-chain data analysis method in an embodiment;

[0038] Figure 2A schematic diagram of a blockchain SIM card in one embodiment;

[0039] Figure 3 It is a flowchart of a method for obtaining a target data field in one embodiment;

[0040] Figure 4 A system architecture diagram of an on-chain data analysis method in another embodiment;

[0041] Figure 5 It is a timing diagram of an on-chain data analysis method in another embodiment;

[0042] Figure 6 It is a structural block diagram of an on-chain data analysis device in one embodiment;

[0043] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] In one embodiment, Figure 1 As shown, a method for analyzing data on a chain is provided. This embodiment uses the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0046] S102, obtaining multiple preset task types, a natural language question input by a user, at least one initial data field corresponding to the natural language question, a semantic vector corresponding to the natural language question, a constraint matrix, and multiple preset constraints.

[0047] Among them, the task type is used to analyze and process the on-chain data of the blockchain to extract valuable information. The task type can be but is not limited to traceability analysis, anomaly analysis and behavior analysis; natural language problems refer to problems expressed in natural language (that is, the language used by humans for daily communication, such as Chinese, English, French, etc.); data fields refer to structured information extracted from natural language problems. These fields can help the system better understand and process user problems. Each field represents a specific part or attribute in the problem. For example, data fields can include shipping time, delivery time, transportation method, order amount and customer rating; semantic vector refers to the conversion of natural language text into a numerical vector, which can capture the semantic information of the text; constraints are used to constrain the analysis process of on-chain data.

[0048] S104: Based on a plurality of preset task types and semantic vectors, a target data field is obtained from at least one initial data field, and for each preset constraint condition, a condition range corresponding to the semantic vector is obtained based on a constraint condition matrix.

[0049] Optionally, the condition scope may include, but is not limited to, a time scope, a space scope, a data filtering condition, and an attribute scope.

[0050] The process of obtaining the conditional range is as follows:

[0051]

[0052] In the formula, r is the condition range vector, and a vector element in r is the condition range corresponding to a constraint condition. , is the constraint matrix, .

[0053] Optionally, the target data field and condition range may be represented by the following task description matrix T:

[0054]

[0055] In the formula, is the target data field, The conditional range.

[0056] The task description matrix T can be expressed as follows:

[0057]

[0058] S106. Obtain at least one target on-chain data from the blockchain network, and encrypt the combined data formed by the target data field, the condition range, and the target on-chain data based on the public key of the large language model to obtain encrypted data.

[0059] Among them, on-chain data of the blockchain refers to the data stored in the blockchain network. This data is tamper-proof, transparent, and can be verified through the distributed ledger technology of the blockchain.

[0060] Optionally, the encrypted data is as follows:

[0061]

[0062] In the formula, To encrypt data, The target chain data.

[0063] S108. Generate a first hash value corresponding to the combined data based on the blockchain SIM card, and generate a digital signature corresponding to the first hash value based on the private key of the blockchain SIM card.

[0064] Among them, the hash value is the unique identifier of the data and can verify whether the data has changed during the transmission process.

[0065] Optionally, the digital signature is as follows:

[0066]

[0067] In the formula, For digital signature, is the first hash value.

[0068] Optionally, based on the blockchain SIM card, the public key, encrypted data, first hash value and digital signature of the blockchain SIM card are encapsulated to obtain encapsulation information. The encapsulation information is shown in the following formula:

[0069]

[0070] In the formula, To encapsulate information, It is the public key of the blockchain SIM card.

[0071] Alternatively, if Figure 2 As shown, Figure 2This is a schematic diagram of the blockchain SIM (BSIM) card. The blockchain BSIM card mainly provides functions such as public and private key generation, encrypted storage, signature verification, and address generation for terminal users. The BSIM card is mainly composed of a traditional sim card module, a Bluetooth module, an MCU chip module, and an SE chip module. The traditional sim card module is the existing sim card function, including basic functions such as calls, 5G mobile Internet access, and text messages; the MCU is responsible for overall scheduling, responsible for communicating with the mobile phone, Bluetooth module, and SE, and is powered by the terminal SIM card interface; the SE chip is responsible for the relevant algorithm calculations of the blockchain, and has a financial security level Bluetooth module and terminal Bluetooth communication; the Bluetooth module uses Bluetooth 4.0 technology, which is responsible for the connection between the terminal and the card, making it convenient for the terminal app to access the card function through the middleware.

[0072] S110, obtaining the user's demand data from the natural language question, inputting the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value and the digital signature into the large language model, and outputting the analysis results for the data on the target chain.

[0073] Optionally, after obtaining the analysis results, in order to protect the privacy and security of user data, the analysis results are encrypted based on the public key of the blockchain SIM card, and the encrypted ciphertext is sent to the user terminal. The user terminal decrypts the analysis results through the built-in private key of the blockchain SIM card and then views the analysis report, thereby achieving security and privacy protection of the result transmission.

[0074] In the above-mentioned chain data analysis method, multiple preset task types, natural language questions input by users, at least one initial data field corresponding to the natural language question, semantic vectors corresponding to the natural language question, constraint matrix and multiple preset constraints are obtained; based on multiple preset task types and semantic vectors, the target data field is obtained from at least one initial data field, and for each preset constraint, the condition range corresponding to the semantic vector is obtained based on the constraint matrix; at least one target chain data is obtained from the blockchain network, and the combined data formed by the target data field, the condition range and the target chain data is encrypted based on the public key of the large language model to obtain encrypted data; based on the blockchain SIM card, a first hash value corresponding to the combined data is generated, and a digital signature corresponding to the first hash value is generated based on the private key of the blockchain SIM card; the user's demand data is obtained from the natural language question, and the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value and the digital signature are input into the large language model, and the analysis result for the target chain data is output. The method provided by the present application can effectively improve the efficiency and accuracy of analyzing the chain data.

[0075] In some embodiments, obtaining a semantic vector corresponding to a natural language question includes: inputting the natural language question into an embedding function of a large language model, and outputting a semantic vector corresponding to the natural language question.

[0076] Optionally, the process of obtaining the semantic vector is as follows:

[0077]

[0078] In the formula, q is the semantic vector, , is the embedding function of the large language model, and Q is the natural language question.

[0079] In this embodiment, a natural language question is input into the embedding function of the large language model, and a semantic vector corresponding to the natural language question is output, so that the semantic vector obtained is more accurate.

[0080] In some embodiments, Figure 3 As shown, based on a plurality of preset task types and semantic vectors, a target data field is obtained from at least one initial data field, including:

[0081] S302: Input the semantic vector and multiple preset task types into the similarity function, and output the target task type corresponding to the natural language question.

[0082] S304: Obtain a mapping matrix between task types and data fields, and obtain corresponding weight values ​​of the initial data fields based on the target task type and the mapping matrix.

[0083] S306 . For each initial data field, when a corresponding weight value of the initial data field is greater than a weight threshold, determine the initial data field as a target data field.

[0084] Optionally, by inputting the semantic vector and multiple preset task types into the similarity function, a preset task type that best matches the natural language question can be selected from the multiple preset task types as the target task type. The process of obtaining the target task type is shown in the following formula:

[0085]

[0086] In the formula, is the target task type, is the similarity function, t i The default task type.

[0087] Optionally, the process of obtaining the weight value corresponding to the initial data field is as follows:

[0088]

[0089] Where d is the weight vector corresponding to the initial data field, and a vector element in d is the weight value corresponding to an initial data field. , is the mapping matrix, .

[0090] In this embodiment, the target task type corresponding to the natural language question is first obtained based on the similarity function, then the weight value corresponding to the initial data field is obtained based on the target task type, and finally the target data field is obtained based on the weight value, so that the target data field obtained is more accurate.

[0091] In some embodiments, obtaining at least one target on-chain data from a blockchain network includes: obtaining at least one original on-chain data of the blockchain network; for each original on-chain data, when the corresponding data field of the original on-chain data includes at least one target data field, determining the original on-chain data as intermediate on-chain data; performing data cleaning on the intermediate on-chain data to obtain the cleaned intermediate on-chain data; wherein the data cleaning includes removing invalid data, duplicate data and noise data; and obtaining the target on-chain data based on the cleaned intermediate on-chain data.

[0092] Optionally, the original on-chain data set can be represented as , the data set on the intermediate chain can be expressed as , you can use the query function Filter out from S , where x is the data on the intermediate chain and r is the conditional range.

[0093] Optionally, the data set on the intermediate chain after data cleaning can be expressed as ,in, is a Boolean function used to determine whether the data is invalid data. Used to determine whether the data is duplicate data. For the intermediate chain data, It is the intermediate chain data after data cleaning.

[0094] In this embodiment, the original on-chain data is screened and cleaned to obtain the intermediate on-chain data after data cleaning, so that the target on-chain data obtained subsequently is more accurate.

[0095] In some embodiments, obtaining target chain data based on the intermediate chain data after data cleaning includes: obtaining context information of the intermediate chain data; supplementing the context information to the intermediate chain data after data cleaning to obtain the target chain data.

[0096] Among them, contextual information refers to the background information and metadata related to the on-chain data.

[0097] Optionally, first clean the intermediate chain data Convert to standardized structure data , and supplement the context information c of the on-chain data to obtain the target on-chain data, where the data structure of the standardized structure data can be but is not limited to JSON or csv. The target on-chain data can be shown as follows:

[0098]

[0099] In this embodiment, the context information of the intermediate chain data is obtained, and the context information is supplemented to the intermediate chain data after data cleaning to obtain the target chain data, which makes the subsequent analysis process of the chain data more accurate.

[0100] In some embodiments, the analysis result is output by the large language model based on the size relationship between the first hash value and the second hash value, and the size relationship between the first hash value and the third hash value; the second hash value is calculated by the large language model based on the combined data, and the combined data is obtained by the large language model decrypting the encrypted data based on the private key of the large language model; the third hash value is obtained by the large language model based on the decrypted digital signature, and the decrypted digital signature is obtained by the large language model decrypting the digital signature based on the public key of the blockchain SIM card.

[0101] Optionally, when the first hash value is equal to the second hash value, and the first hash value is equal to the third hash value, the large language model outputs an analysis result.

[0102] In this embodiment, the large language model outputs the analysis result based on the size relationship between the first hash value and the second hash value, and the size relationship between the first hash value and the third hash value, so that the output analysis result is more accurate.

[0103] In one embodiment, another on-chain data analysis method is provided. The system architecture diagram and timing diagram of the method are respectively as follows: Figure 4 and Figure 5 The method includes the following contents:

[0104] Data collection and preprocessing: Utilize the capabilities of big models to obtain on-chain data from the blockchain network, and preprocess, denoise and extract features of the collected on-chain data. Use the intelligent algorithms of big models to extract key features and rules in the data, and conduct preliminary data analysis and pattern recognition.

[0105] Data encryption: Data is encrypted and verified through BSIM’s hardware security, and blockchain’s secure encryption algorithm is used to accelerate data at the hardware level to solve traditional security issues such as data leakage.

[0106] BSIM hardware acceleration: Use the BSIM hardware accelerator to optimize the encryption calculation of on-chain data and improve data processing speed. BSIM supports the efficient execution of asymmetric encryption and other complex algorithms, and can maintain high computing performance when the amount of data increases.

[0107] Intelligent analysis and modeling: Use large language models (LLMs) to conduct in-depth analysis of on-chain data, explore potential patterns and trends in the data, output the analysis results (including but not limited to data prediction, risk assessment, behavioral analysis, etc.) in a visual way, generate prediction models and intelligent analysis reports to support intelligent decision-making.

[0108] Data feedback and optimization: Based on the analysis results, the BSIM device provides a feedback mechanism and stores it on the chain to improve the accuracy and efficiency of the analysis.

[0109] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0110] Based on the same inventive concept, the embodiment of the present application also provides an on-chain data analysis device for implementing the on-chain data analysis method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more on-chain data analysis device embodiments provided below can refer to the above limitations on the on-chain data analysis method, which will not be repeated here.

[0111] In an exemplary embodiment, Figure 6 As shown, a chain data analysis device 600 is provided, including: a first acquisition module 601, a second acquisition module 602, a third acquisition module 603, a generation module 604 and a fourth acquisition module 605, wherein:

[0112] The first acquisition module 601 is used to obtain multiple preset task types, a natural language question input by a user, at least one initial data field corresponding to the natural language question, a semantic vector corresponding to the natural language question, a constraint matrix and multiple preset constraints.

[0113] The second acquisition module 602 is used to acquire the target data field from the at least one initial data field based on the multiple preset task types and the semantic vector, and for each preset constraint condition, acquire the corresponding condition range of the semantic vector based on the constraint condition matrix.

[0114] The third acquisition module 603 is used to obtain at least one target on-chain data from the blockchain network, and encrypt the combined data formed by the target data field, the condition range and the target on-chain data based on the public key of the large language model to obtain encrypted data.

[0115] The generation module 604 is used to generate a first hash value corresponding to the combined data based on the blockchain SIM card, and generate a digital signature corresponding to the first hash value based on the private key of the blockchain SIM card.

[0116] The fourth acquisition module 605 is used to obtain the user's demand data from the natural language question, input the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value and the digital signature into the large language model, and output the analysis result for the data on the target chain.

[0117] In some embodiments, the first acquisition module 601 is further used to input the natural language question into the embedding function of the large language model, and output a semantic vector corresponding to the natural language question.

[0118] In some embodiments, the second acquisition module 602 is also used to input the semantic vector and the multiple preset task types into a similarity function, and output the target task type corresponding to the natural language question; obtain a mapping matrix between task types and data fields, and based on the target task type and the mapping matrix, obtain a weight value corresponding to the initial data field; for each initial data field, when the weight value corresponding to the initial data field is greater than a weight threshold, determine the initial data field as the target data field.

[0119] In some embodiments, the third acquisition module 603 includes:

[0120] The first acquisition unit is used to acquire at least one original on-chain data of the blockchain network.

[0121] A determination unit is used to determine, for each type of original on-chain data, the original on-chain data as intermediate on-chain data when the corresponding data field of the original on-chain data includes at least one target data field.

[0122] A data cleaning unit is used to clean the data on the intermediate chain to obtain the cleaned data on the intermediate chain; wherein the data cleaning includes removing invalid data, duplicate data and noise data.

[0123] The second acquisition unit is used to acquire the target chain data based on the intermediate chain data after the data is cleaned.

[0124] In some embodiments, the second acquisition unit is also used to obtain context information of the data on the intermediate chain; supplement the context information to the data on the intermediate chain after data cleaning to obtain the target chain data.

[0125] In some embodiments, the fourth acquisition module 605 is also used for the analysis result output by the large language model based on the size relationship between the first hash value and the second hash value, and the size relationship between the first hash value and the third hash value; the second hash value is calculated by the large language model based on the combined data, and the combined data is obtained by the large language model after decrypting the encrypted data based on the private key of the large language model; the third hash value is obtained by the large language model based on the decrypted digital signature, and the decrypted digital signature is obtained by the large language model after decrypting the digital signature based on the public key of the blockchain SIM card.

[0126] Each module in the above-mentioned on-chain data analysis device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0127] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless method can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a chain data analysis method is implemented.

[0128] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0129] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining multiple preset task types, natural language questions input by a user, at least one initial data field corresponding to the natural language question, a semantic vector corresponding to the natural language question, a constraint matrix, and multiple preset constraints; based on the multiple preset task types and the semantic vector, obtaining a target data field from the at least one initial data field, and for each preset constraint, obtaining a condition range corresponding to the semantic vector based on the constraint matrix; obtaining at least one target chain data from a blockchain network, and encrypting the combined data formed by the target data field, the condition range, and the target chain data based on a public key of a large language model to obtain encrypted data; generating a first hash value corresponding to the combined data based on a blockchain SIM card, and generating a digital signature corresponding to the first hash value based on a private key of the blockchain SIM card; obtaining user demand data from the natural language question, inputting the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value, and the digital signature into the large language model, and outputting an analysis result for the target chain data.

[0130] In one embodiment, obtaining the semantic vector corresponding to the natural language question implemented when the processor executes the computer program includes: inputting the natural language question into the embedding function of the large language model, and outputting the semantic vector corresponding to the natural language question.

[0131] In one embodiment, the processor executes a computer program to obtain a target data field from at least one initial data field based on the multiple preset task types and the semantic vector, including: inputting the semantic vector and the multiple preset task types into a similarity function, and outputting a target task type corresponding to the natural language question; obtaining a mapping matrix between task types and data fields, and obtaining a weight value corresponding to the initial data field based on the target task type and the mapping matrix; for each initial data field, when the weight value corresponding to the initial data field is greater than a weight threshold, determining the initial data field as the target data field.

[0132] In one embodiment, the acquisition of at least one target on-chain data from a blockchain network implemented by a processor executing a computer program includes: acquiring at least one original on-chain data of the blockchain network; for each type of original on-chain data, when the corresponding data field of the original on-chain data includes at least one target data field, determining the original on-chain data as intermediate on-chain data; performing data cleaning on the intermediate on-chain data to obtain the cleaned intermediate on-chain data; wherein the data cleaning includes removing invalid data, duplicate data and noise data; and acquiring the target on-chain data based on the cleaned intermediate on-chain data.

[0133] In one embodiment, the acquisition of the target chain data based on the intermediate chain data after data cleaning implemented by the processor when executing a computer program includes: acquiring context information of the intermediate chain data; supplementing the context information to the intermediate chain data after data cleaning to obtain the target chain data.

[0134] In one embodiment, the analysis result achieved when the processor executes the computer program is output by the large language model based on the size relationship between the first hash value and the second hash value, and the size relationship between the first hash value and the third hash value; the second hash value is calculated by the large language model based on the combined data, and the combined data is obtained by the large language model decrypting the encrypted data based on the private key of the large language model; the third hash value is obtained by the large language model based on the decrypted digital signature, and the decrypted digital signature is obtained by the large language model decrypting the digital signature based on the public key of the blockchain SIM card.

[0135] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining multiple preset task types, natural language questions input by a user, at least one initial data field corresponding to the natural language question, a semantic vector corresponding to the natural language question, a constraint matrix, and multiple preset constraints; based on the multiple preset task types and the semantic vector, obtaining a target data field from the at least one initial data field, and for each preset constraint, obtaining a condition range corresponding to the semantic vector based on the constraint matrix; obtaining at least one target chain data from a blockchain network, and encrypting the combined data formed by the target data field, the condition range, and the target chain data based on the public key of a large language model to obtain encrypted data; generating a first hash value corresponding to the combined data based on a blockchain SIM card, and generating a digital signature corresponding to the first hash value based on a private key of the blockchain SIM card; obtaining user demand data from the natural language question, inputting the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value, and the digital signature into the large language model, and outputting an analysis result for the target chain data.

[0136] In one embodiment, obtaining the semantic vector corresponding to the natural language question implemented by the computer program when executed by the processor includes: inputting the natural language question into the embedding function of the large language model, and outputting the semantic vector corresponding to the natural language question.

[0137] In one embodiment, the computer program implemented when executed by the processor obtains a target data field from the at least one initial data field based on the multiple preset task types and the semantic vector, including: inputting the semantic vector and the multiple preset task types into a similarity function, and outputting the target task type corresponding to the natural language question; obtaining a mapping matrix between task types and data fields, and obtaining weight values ​​corresponding to the initial data fields based on the target task type and the mapping matrix; for each initial data field, when the weight value corresponding to the initial data field is greater than a weight threshold, determining the initial data field as the target data field.

[0138] In one embodiment, the method of obtaining at least one target on-chain data from a blockchain network implemented by a computer program executed by a processor includes: obtaining at least one original on-chain data of the blockchain network; for each type of original on-chain data, when the corresponding data field of the original on-chain data includes at least one target data field, determining the original on-chain data as intermediate on-chain data; performing data cleaning on the intermediate on-chain data to obtain the cleaned intermediate on-chain data; wherein the data cleaning includes removing invalid data, duplicate data and noise data; and obtaining the target on-chain data based on the cleaned intermediate on-chain data.

[0139] In one embodiment, the computer program implemented by the processor when executed by the processor obtains the target chain data based on the intermediate chain data after the data cleaning, including: obtaining the context information of the intermediate chain data; supplementing the context information to the intermediate chain data after the data cleaning to obtain the target chain data.

[0140] In one embodiment, the analysis result achieved when the computer program is executed by the processor is output by the large language model based on the size relationship between the first hash value and the second hash value, and the size relationship between the first hash value and the third hash value; the second hash value is calculated by the large language model based on the combined data, and the combined data is obtained by the large language model decrypting the encrypted data based on the private key of the large language model; the third hash value is obtained by the large language model based on the decrypted digital signature, and the decrypted digital signature is obtained by the large language model decrypting the digital signature based on the public key of the blockchain SIM card.

[0141] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: obtaining multiple preset task types, a natural language question input by a user, at least one initial data field corresponding to the natural language question, a semantic vector corresponding to the natural language question, a constraint matrix and multiple preset constraints; based on the multiple preset task types and the semantic vector, obtaining a target data field from the at least one initial data field, and for each preset constraint, obtaining a condition range corresponding to the semantic vector based on the constraint matrix; obtaining at least one target chain data from a blockchain network, and encrypting the combined data formed by the target data field, the condition range and the target chain data based on the public key of a large language model to obtain encrypted data; generating a first hash value corresponding to the combined data based on a blockchain SIM card, and generating a digital signature corresponding to the first hash value based on a private key of the blockchain SIM card; obtaining user demand data from the natural language question, inputting the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value and the digital signature into the large language model, and outputting an analysis result for the target chain data.

[0142] In one embodiment, obtaining the semantic vector corresponding to the natural language question implemented by the computer program when executed by the processor includes: inputting the natural language question into the embedding function of the large language model, and outputting the semantic vector corresponding to the natural language question.

[0143] In one embodiment, the computer program implemented when executed by the processor obtains a target data field from the at least one initial data field based on the multiple preset task types and the semantic vector, including: inputting the semantic vector and the multiple preset task types into a similarity function, and outputting the target task type corresponding to the natural language question; obtaining a mapping matrix between task types and data fields, and obtaining weight values ​​corresponding to the initial data fields based on the target task type and the mapping matrix; for each initial data field, when the weight value corresponding to the initial data field is greater than a weight threshold, determining the initial data field as the target data field.

[0144] In one embodiment, the method of obtaining at least one target on-chain data from a blockchain network implemented by a computer program executed by a processor includes: obtaining at least one original on-chain data of the blockchain network; for each type of original on-chain data, when the corresponding data field of the original on-chain data includes at least one target data field, determining the original on-chain data as intermediate on-chain data; performing data cleaning on the intermediate on-chain data to obtain the cleaned intermediate on-chain data; wherein the data cleaning includes removing invalid data, duplicate data and noise data; and obtaining the target on-chain data based on the cleaned intermediate on-chain data.

[0145] In one embodiment, the computer program implemented by the processor when executed by the processor obtains the target chain data based on the intermediate chain data after the data cleaning, including: obtaining the context information of the intermediate chain data; supplementing the context information to the intermediate chain data after the data cleaning to obtain the target chain data.

[0146] In one embodiment, the analysis result achieved when the computer program is executed by the processor is output by the large language model based on the size relationship between the first hash value and the second hash value, and the size relationship between the first hash value and the third hash value; the second hash value is calculated by the large language model based on the combined data, and the combined data is obtained by the large language model decrypting the encrypted data based on the private key of the large language model; the third hash value is obtained by the large language model based on the decrypted digital signature, and the decrypted digital signature is obtained by the large language model decrypting the digital signature based on the public key of the blockchain SIM card.

[0147] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0148] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0149] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0150] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for analyzing on-chain data, characterized in that: The method comprises: Acquire multiple preset task types, a natural language question input by a user, at least one initial data field corresponding to the natural language question, a semantic vector corresponding to the natural language question, a constraint matrix, and multiple preset constraints; Based on the multiple preset task types and the semantic vector, a target data field is obtained from the at least one initial data field, and for each preset constraint condition, a condition range corresponding to the semantic vector is obtained based on the constraint condition matrix; Acquire at least one target on-chain data from the blockchain network, and encrypt the combined data formed by the target data field, the condition range, and the target on-chain data based on the public key of the large language model to obtain encrypted data; Generate a first hash value corresponding to the combined data based on the blockchain SIM card, and generate a digital signature corresponding to the first hash value based on the private key of the blockchain SIM card; The user's demand data is obtained from the natural language question, the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value and the digital signature are input into the large language model, and the analysis result for the data on the target chain is output.

2. The method according to claim 1, characterized in that The obtaining of the semantic vector corresponding to the natural language question includes: The natural language question is input into the embedding function of the large language model, and a semantic vector corresponding to the natural language question is output.

3. The method according to claim 1, characterized in that The acquiring a target data field from the at least one initial data field based on the multiple preset task types and the semantic vector includes: Inputting the semantic vector and the plurality of preset task types into a similarity function, and outputting a target task type corresponding to the natural language question; Acquire a mapping matrix between task types and data fields, and acquire a weight value corresponding to the initial data field based on the target task type and the mapping matrix; For each initial data field, when a weight value corresponding to the initial data field is greater than a weight threshold, the initial data field is determined as the target data field.

4. The method according to claim 1, characterized in that: The obtaining of at least one target on-chain data from the blockchain network includes: Obtain at least one original on-chain data of the blockchain network; For each type of original on-chain data, when the data field corresponding to the original on-chain data includes at least one target data field, determining the original on-chain data as intermediate on-chain data; Cleaning the data on the intermediate chain to obtain cleaned data on the intermediate chain; wherein the data cleaning includes removing invalid data, duplicate data and noise data; The target chain data is obtained based on the intermediate chain data after the data cleaning.

5. The method according to claim 4, characterized in that The acquiring the target chain data based on the intermediate chain data after the data cleaning includes: Obtaining context information of the data on the intermediate chain; The context information is added to the intermediate chain data after the data cleaning to obtain the target chain data.

6. The method according to claim 1, characterized in that The analysis result is output by the large language model based on the size relationship between the first Hash value and the second Hash value, and the size relationship between the first Hash value and the third Hash value; the second Hash value is calculated by the large language model based on the combined data, and the combined data is obtained by the large language model after decrypting the encrypted data based on the private key of the large language model; The third hash value is obtained by the large language model based on the decrypted digital signature, and the decrypted digital signature is obtained by the large language model after decrypting the digital signature based on the public key of the blockchain SIM card.

7. A chain data analysis device, characterized in that: The device comprises: A first acquisition module is used to acquire multiple preset task types, a natural language question input by a user, at least one initial data field corresponding to the natural language question, a semantic vector corresponding to the natural language question, a constraint matrix and multiple preset constraints; A second acquisition module is used to acquire a target data field from the at least one initial data field based on the multiple preset task types and the semantic vector, and acquire a condition range corresponding to the semantic vector based on the constraint matrix for each preset constraint condition; A third acquisition module is used to acquire at least one target on-chain data from the blockchain network, and encrypt the combined data formed by the target data field, the condition range and the target on-chain data based on the public key of the large language model to obtain encrypted data; A generation module, configured to generate a first hash value corresponding to the combined data based on a blockchain SIM card, and to generate a digital signature corresponding to the first hash value based on a private key of the blockchain SIM card; The fourth acquisition module is used to obtain the user's demand data from the natural language question, input the demand data, the public key of the blockchain SIM card, the encrypted data, the first hash value and the digital signature into the large language model, and output the analysis result for the data on the target chain.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

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

Citation Information

Patent Citations

  • Digital signature and blockchain transaction method and apparatus, and electronic device

    CN111371564A

  • Contract management method based on block chain and combined key and related equipment

    CN115085934A

  • Data uplink auditing method, auditing system, auditing device, equipment and medium

    CN115664681A

  • User psychological portraying system and method based on knowledge graph and large language model

    CN116821287A

  • Data processing method and device based on large language model and block chain

    CN117952212A