A Blockchain-Based Evidence Storage and Interaction Method and System Based on Large Language Models

CN122570513APending Publication Date: 2026-08-14LINGSHU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-10
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

但现有区块链存证技术缺乏对多轮对话中上下文语义依赖关系的建模能力,无法解析指代关系与历史状态信息,导致用户需要重复输入完整参数信息,降低操作效率并增加出错概率

Benefits of technology

[0018]上述技术方案具有如下有益效果:通过采用大语言模型将自然语言指令解析为结构化操作指令,从而消除了用户自然语言表达与链上结构化数据之间的语义鸿沟,降低了使用门槛;通过调用预设任务接口执行封装后的业务流程,从而屏蔽了底层复杂的多步骤存证操作,避免了用户因操作不当导致的执行失败;通过将执行结果返回至大语言模型生成自然语言反馈,从而实现了对话状态的闭环管理,支持多轮交互中的指代解析与上下文理解,提升了操作效率与用户体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122570513A_ABST
    Figure CN122570513A_ABST
Patent Text Reader

Abstract

This invention discloses a blockchain-based evidence storage interaction method and system based on a large language model. The method includes: acquiring natural language commands input by a user; performing semantic parsing on the natural language commands according to the large language model, identifying the operation intent and extracting key parameters, and generating structured operation commands based on the operation intent and key parameters; calling a preset task interface and executing the structured operation commands to obtain execution results; and returning the execution results to the large language model to generate and output feedback information. This lowers the barrier to evidence storage and improves its efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain, and in particular to a blockchain evidence storage and interaction method and system based on a large language model. Background Technology

[0002] Blockchain technology, due to its decentralized, immutable, and traceable characteristics, has been widely applied in the field of electronic evidence preservation, such as contract preservation, chat log recording, and intellectual property rights confirmation. Existing blockchain evidence preservation systems typically provide services to the outside world in the form of structured interfaces. Users need to construct transaction requests according to predefined parameter formats (such as data hashes, business identifiers, signature information, etc.) and complete operations such as data uploading to the blockchain, evidence verification, and record retrieval by calling smart contracts or REST APIs.

[0003] However, in practical applications, existing technical solutions have obvious shortcomings. In evidence storage scenarios, users typically describe their needs in natural language, such as "help me store this contract" or "record today's communication content," but existing technologies require the input of structured parameters, resulting in a semantic gap between natural language expression and on-chain structured data. Users find it difficult to accurately translate business semantics into on-chain operation instructions, creating a "can talk but can't do" usage obstacle.

[0004] Furthermore, a complete evidence storage process typically involves multiple technical steps, such as data processing, hash calculation, transaction construction, on-chain submission, transaction confirmation, and result query. However, users only focus on the business outcome of "whether evidence storage is successful." Existing technologies often directly expose these technical details to users, resulting in complex operation processes, high understanding costs, and users being prone to execution failures due to improper operation.

[0005] Meanwhile, in actual use, users often express their needs step by step through multiple rounds of dialogue. For example, they might first query the evidence storage record, and then perform verification or supplementary evidence storage operations. Subsequent instructions usually depend on the preceding context (such as "verify the previous one"). However, existing blockchain evidence storage technology lacks the ability to model the semantic dependencies of context in multi-turn dialogues and cannot parse referential relationships and historical state information. This causes users to repeatedly input complete parameter information, reducing operational efficiency and increasing the probability of errors.

[0006] There is currently no effective solution to the above problems in existing technologies. Summary of the Invention

[0007] To address the aforementioned issues, this invention provides a blockchain evidence storage interaction method and system based on a large language model. The large language model automatically parses user natural language commands into operational intentions and key parameters, generating structured operational instructions. Then, it calls a preset task interface to execute the encapsulated blockchain business process. Finally, the execution result is returned to the large language model to generate natural language feedback. This eliminates the semantic gap between natural language and structured data, shields the complex underlying evidence storage process, and supports multi-turn dialogue context understanding, achieving intelligent interaction of "dialogue as evidence storage."

[0008] To achieve the above objectives, the present invention provides a blockchain evidence storage interaction method based on a large language model, comprising: acquiring natural language instructions input by a user; performing semantic parsing on the natural language instructions according to the large language model, identifying the operation intent and extracting key parameters, generating structured operation instructions according to the operation intent and key parameters; calling a preset task interface and executing the structured operation instructions to obtain an execution result; and returning the execution result to the large language model to generate feedback information and output it.

[0009] Optionally, the step of semantically parsing the natural language instruction based on the large language model to identify the operation intent and extract key parameters includes: inputting the natural language instruction into the semantic classifier of the large language model and outputting the corresponding operation intent; calling a parameter extraction template associated with the operation intent and extracting key parameters from the natural language instruction according to the parameter extraction template; determining whether the key parameters meet a preset completeness condition; if not, completing the key parameters according to preset business rules; otherwise, encapsulating the operation intent and key parameters according to a preset data structure to generate the structured operation instruction.

[0010] Optionally, the step of calling the preset task interface and executing the structured operation instruction to obtain the execution result includes: parsing the structured operation instruction to obtain the operation intent and key parameters; matching the corresponding preset task interface according to the operation intent; using the key parameters as input to call the preset task interface and execute the business process corresponding to the preset task interface; collecting business feedback data generated after the execution of the business process, and using the business feedback data as the execution result.

[0011] Optionally, the business process corresponding to the execution of the preset task interface includes: when the business process is a data on-chain process, performing a legality verification on the evidence content in the key parameters; after the legality verification is passed, calculating the hash fingerprint of the evidence content; calling the evidence storage smart contract to put the hash fingerprint on the chain and obtaining a transaction receipt; wherein, the transaction receipt includes a transaction hash and a block height; querying the corresponding block information from the blockchain based on the block height in the transaction receipt; and saving the transaction hash, block height, evidence content, hash fingerprint, and block information as evidence storage results to the database.

[0012] Further optionally, the business process corresponding to the execution of the preset task interface includes: when the business process is an evidence verification process, extracting the evidence identifier and the content to be verified from the key parameters; querying the corresponding original evidence content in the database according to the evidence identifier; wherein, the original evidence content includes at least the original hash fingerprint; calculating the hash fingerprint to be verified of the content to be verified; comparing the hash fingerprint to be verified with the original hash fingerprint; if the comparison matches, generating business feedback data of verification success; if the comparison does not match, generating business feedback data of verification failure.

[0013] Further optionally, the business process corresponding to the execution of the preset task interface includes: when the business process is a record storage query process, extracting pagination parameters from the key parameters; wherein, the pagination parameters include page number and number of pages; performing a pagination query in the database according to the pagination parameters, and using the pagination query results as business feedback data.

[0014] On the other hand, the present invention also provides a blockchain evidence storage and interaction system based on a large language model, characterized in that it includes: an instruction acquisition module for acquiring natural language instructions input by the user; an operation instruction generation module for semantically parsing the natural language instructions according to the large language model, identifying the operation intent and extracting key parameters, and generating structured operation instructions according to the operation intent and key parameters; an execution result generation module for calling a preset task interface and executing the structured operation instructions to obtain an execution result; and an information output module for returning the execution result to the large language model, generating feedback information and outputting it.

[0015] Further optionally, the operation instruction generation module includes: an operation intent recognition submodule, used to input the natural language instruction into the semantic classifier of a large language model and output the corresponding operation intent; a key parameter extraction submodule, used to call a parameter extraction template associated with the operation intent and extract key parameters from the natural language instruction according to the parameter extraction template; and an instruction generation submodule, used to determine whether the key parameters meet a preset completeness condition. If not, the key parameters are completed according to preset business rules; otherwise, the operation intent and key parameters are encapsulated according to a preset data structure to generate the structured operation instruction.

[0016] Further optionally, the execution result generation module includes: a parsing submodule, used to parse the structured operation instructions to obtain the operation intent and key parameters; an interface matching submodule, used to match the corresponding preset task interface according to the operation intent; a business execution submodule, used to take the key parameters as input, call the preset task interface, and execute the business process corresponding to the preset task interface; and an execution result generation submodule, used to collect business feedback data generated after the execution of the business process, and use the business feedback data as the execution result.

[0017] Optionally, the business execution submodule includes: a verification unit, used to verify the legality of the evidence content in the key parameters when the business process is a data on-chain process; a first hash calculation unit, used to calculate the hash fingerprint of the evidence content after the legality verification is passed; a transaction receipt acquisition unit, used to call the evidence storage smart contract to put the hash fingerprint on the chain and obtain the transaction receipt; wherein the transaction receipt includes the transaction hash and block height; an information query unit, used to query the corresponding block information from the blockchain according to the block height in the transaction receipt; and an evidence storage unit, used to save the transaction hash, block height, evidence content, hash fingerprint, and block information as evidence storage results to the database.

[0018] The above technical solution has the following beneficial effects: by using a large language model to parse natural language instructions into structured operation instructions, the semantic gap between user natural language expression and on-chain structured data is eliminated, lowering the threshold for use; by calling preset task interfaces to execute encapsulated business processes, the complex multi-step evidence storage operations at the underlying level are shielded, avoiding execution failures caused by user misoperation; by returning the execution results to the large language model to generate natural language feedback, closed-loop management of the dialogue state is achieved, supporting reference parsing and contextual understanding in multi-turn interactions, improving operational efficiency and user experience. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of the blockchain evidence storage interaction method based on a large language model provided in an embodiment of the present invention; Figure 2 This is a flowchart of the semantic parsing method provided in the embodiments of the present invention; Figure 3 This is a flowchart of the task execution method provided in an embodiment of the present invention; Figure 4 This is a flowchart of the data uplink execution method provided in an embodiment of the present invention; Figure 5 This is a flowchart of the evidence verification execution method provided in the embodiments of the present invention; Figure 6 This is a flowchart of the evidence record query execution method provided in the embodiments of the present invention; Figure 7 This is a schematic diagram of the structure of the blockchain evidence storage and interaction system based on a large language model provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the operation instruction generation module provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the structure of the execution result generation module provided in an embodiment of the present invention; Figure 10 This is a schematic diagram of the business execution submodule for data uploading provided in an embodiment of the present invention; Figure 11 This is a schematic diagram of the business execution submodule for evidence verification provided in an embodiment of the present invention; Figure 12 This is a schematic diagram of the business execution submodule for querying evidence storage records provided in an embodiment of the present invention.

[0021] Figure reference numerals: 100 - Instruction acquisition module; 200 - Operation instruction generation module; 2001 - Operation intent recognition submodule; 2002 - Key parameter extraction submodule; 2003 - Instruction generation submodule; 300 - Execution result generation module; 3001 - Parsing submodule; 3002 - Interface matching submodule; 3003 - Business execution submodule; 30031 - Verification unit; 30032 - First hash calculation unit; 30033 - Transaction receipt acquisition unit; 30034 - Information query unit; 30035 - Evidence storage unit; 30036 - Evidence storage information extraction unit; 30037 - Evidence storage query unit; 30038 - Second hash calculation unit; 30039 - Comparison unit; 300310 - Pagination parameter extraction unit; 300311 - Pagination query unit; 3004 - Execution result generation submodule; 400 - Information output module. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] To address the problems of difficulty in users quickly storing evidence, discontinuous evidence storage processes, and lack of context in multi-turn dialogues in existing technologies, this invention provides a blockchain evidence storage interaction method and system based on a large language model. Figure 1 This is a flowchart of the blockchain evidence storage interaction method based on a large language model provided in an embodiment of the present invention, such as... Figure 1 As shown, the method includes: S1. Obtain natural language commands input by the user.

[0024] First, the system obtains the user's natural language input. Users can initiate requests through various interactive methods, such as entering text in the chat interface of instant messaging tools, web consoles, or mobile applications.

[0025] These natural language commands do not need to follow any preset format or grammatical rules; users can describe their evidence storage needs entirely using everyday language. For example, a user can enter "Help me store this contract as evidence" to initiate a data upload request, enter "Verify whether the contract with evidence storage ID 0xabc123 has been tampered with" to perform evidence storage verification, or enter "View my recent evidence storage records" to perform a record query.

[0026] S2. Perform semantic parsing of natural language instructions based on the large language model, identify the operation intention and extract key parameters, and generate structured operation instructions based on the operation intention and key parameters.

[0027] Large language models are deep learning models pre-trained on large-scale corpora, possessing powerful semantic understanding and information extraction capabilities.

[0028] Users can directly input natural language commands as prompts or queries into the large language model. The large language model recognizes the operational intent expressed by the command, such as data upload, evidence verification, or evidence record query. Simultaneously, it extracts the key parameters necessary to execute the operation from the command, such as evidence content, evidence identifier, or pagination information. After completing intent recognition and parameter extraction, the operational intent and key parameters are encapsulated according to a preset data structure to generate a structured operation command. This structured command is a computer-readable intermediate representation that can be directly parsed and executed by subsequent business processing modules.

[0029] S3. Call the preset task interface and execute the structured operation instructions to obtain the execution result.

[0030] The structured operation instructions clearly record the operation intent and key parameters. Based on this intent, the corresponding preset task interface is matched from a predefined set of task interfaces. The preset task interface is a standardized encapsulation of the core operations of blockchain evidence storage, such as data connection interface, evidence verification interface, and evidence record query interface. Each preset task interface encapsulates one or more technical steps required to complete the corresponding operation, including parameter verification, hash calculation, on-chain transaction construction, smart contract invocation, transaction receipt retrieval, and data persistence.

[0031] The key parameters in the structured operation instructions are used as input to call the matched preset task interface, which automatically executes the encapsulated business process. During execution, no user intervention or understanding of the underlying technical details is required. After the business process is completed, the execution results are directly collected.

[0032] S4. Return the execution result to the large language model, generate feedback information and output it.

[0033] The execution results typically include the operation status (success or failure) and various data generated during the execution, such as transaction hashes, block heights, verification comparison results, or lists of evidence records.

[0034] After receiving the execution result, the large language model transforms the technical execution result into feedback information that conforms to natural language expression habits, based on the current operation intent and the pre-set feedback generation strategy. For example, for the execution result of successful data uploading to the blockchain, the large language model will generate a statement like "Successful evidence storage! Your data has been uploaded to the blockchain, the transaction hash is 0xabc..., and the block height is 12345"; for evidence storage verification results, it will generate a prompt such as "Verification passed, content has not been tampered with" or "Verification failed, content has been tampered with" based on whether the comparison is consistent.

[0035] The large language model generates natural language feedback information and outputs it to the user through the user interface. The output can take the form of text messages in a chat dialog box, notification prompts in a web console, or push messages in a mobile application. Users can intuitively understand the operation results without having to analyze any technical parameters.

[0036] In one specific embodiment of the present invention, the entire system adopts a three-layer architecture, including a natural language understanding layer, a service proxy layer, and a blockchain adaptation layer.

[0037] The Natural Language Understanding layer, built upon a large language model, serves as the entry point for user interaction with the system, responsible for converting user natural language into structured operational commands. This layer includes an intent recognition module, a parameter extraction module, and a context management module.

[0038] The intent recognition module is used to identify the core operational intent of user input. It predefines blockchain-related functional categories, including data uploading, evidence verification, and evidence record query. It maps user input to corresponding business intents through a semantic classification model.

[0039] The parameter extraction module extracts key parameters required for operations from natural language and encapsulates them in a structured manner based on predefined parameter templates. For example, it extracts the evidence storage content field from the query "Help me put 'Contract Number 12345' on the blockchain". For missing parameters, it automatically completes them according to business rules, such as default pagination parameters.

[0040] The context management module is used to maintain context information in multi-turn dialogues. By constructing a dialogue state model, it stores key data from historical interactions (such as evidence identifiers and query results) in a structured manner. In subsequent requests, the context reference resolution mechanism maps referential information in user input (such as "this evidence") to specific object identifiers, thereby achieving cross-turn semantic understanding.

[0041] The service proxy layer is a cluster of business services that provides standardized interfaces in the form of RESTful APIs, responsible for handling core business logic and data persistence. This layer includes an API gateway controller and a business logic service layer.

[0042] The API gateway controller provides a series of standardized HTTP interfaces, such as sending transactions, querying evidence details, verifying evidence content, and querying evidence records, serving as a unified service entry point for the service proxy layer.

[0043] The business logic service layer includes core business modules such as evidence storage services and contract deployment services, responsible for parameter validation, business process orchestration, and data persistence. Parameter validation verifies the legality and integrity of request parameters; business process orchestration connects steps such as hash calculation, on-chain interaction, and result storage; and data persistence stores evidence records and transaction information in a database for quick retrieval. Through the process orchestration mechanism, the originally complex multi-step blockchain operation is abstracted into a single business call interface, thereby reducing system complexity.

[0044] The blockchain adaptation layer encapsulates the SDK of the underlying blockchain network, shielding the upper layers from the complexity of the blockchain network. This layer includes a client management module, a smart contract interaction module, and a block utility module.

[0045] The client management module is responsible for initializing and managing the connection to the blockchain network and loading the required encryption keys.

[0046] The smart contract interaction module encapsulates the interaction logic with the evidence storage smart contract. For example, it provides a "save evidence" method. When calling it, you only need to pass in the data hash, and the module will complete complex operations such as contract calling and transaction signing.

[0047] The Block Tools module provides convenient blockchain data query functions, such as obtaining block details based on block height and querying the latest height on the current chain.

[0048] As an optional implementation method, Figure 2 This is a flowchart of the semantic parsing method provided in the embodiments of the present invention, such as... Figure 2 As shown, semantic parsing of natural language instructions is performed based on a large language model to identify the operational intent and extract key parameters, including: S201. Input the natural language command into the semantic classifier of the large language model and output the corresponding operation intention.

[0049] Semantic classifiers are functional modules formed by targeted fine-tuning or hinting engineering of large language models. They are specifically designed to map natural language text to predefined blockchain notarization operation categories.

[0050] When a user inputs a natural language command such as "Help me register this contract" or "Record today's communication content", the semantic classifier will comprehensively judge the verbs, nouns and the overall context of the sentence and output the corresponding operation intention, such as "data on the blockchain".

[0051] Similarly, when a user enters "verify the previous evidence record" or "query my evidence record", the classifier will output the intents "evidence verification" or "evidence record query" respectively.

[0052] S202, invoke the parameter extraction template associated with the operation intent, and extract key parameters from the natural language instruction according to the parameter extraction template.

[0053] A corresponding parameter extraction template is pre-associated for each operation intent. This template defines the key parameter names, types, and extraction rules required to execute the intent. When an operation intent is output, the parameter extraction template matching the intent is invoked, and the user's original natural language command is parsed according to the rules defined in the template.

[0054] For example, if the operation intent is "data on the blockchain", the corresponding parameter extraction template is called. The template defines "evidence content" as a key parameter. Therefore, it is necessary to extract the evidence content specified by the user from the instruction. For example, if the natural language instruction entered by the user is "help me put 'contract number 12345' on the blockchain for evidence storage", then the key parameter is "contract number 12345".

[0055] If the operation intent is "evidence verification", the parameter extraction template defines two key parameters: "evidence identifier" and "content to be verified". For example, if the user's input natural language command is "verify whether the contract with evidence ID 0xabc123... and content 'contract number 12345' has been tampered with", then the evidence identifier "0xabc123" and the content to be verified "contract number 12345" are extracted from the command as key information.

[0056] For the intent of "evidence record query", the parameter extraction template may define pagination parameters such as "page number" and "number per page". For example, if the natural language command entered by the user is "view the second page, display 20 records per page", then the page number "2" and the number of records per page "20" will be extracted from the natural language command as key parameters.

[0057] The parameter extraction process can be achieved based on technologies such as the question-answering capabilities of large language models, regular expression matching, or named entity recognition.

[0058] S203. Determine whether the key parameters meet the preset completeness conditions. If not, complete the key parameters according to the preset business rules. Otherwise, encapsulate the operation intention and key parameters according to the preset data structure to generate a structured operation instruction.

[0059] For each operational intent, a minimum set of parameters required to execute the operation is predefined, i.e., preset complete conditions. For example, the data upload intent requires at least the evidence storage content, the evidence storage verification intent requires both the evidence storage identifier and the content to be verified, and the evidence storage record query intent allows for missing pagination parameters, which can be supplemented by default values. The currently extracted key parameters are compared with the complete conditions corresponding to the intent to determine whether the parameters are complete.

[0060] If the judgment result indicates that the incomplete condition is not met, for example, if the user only says "help me register the contract" without providing specific registration details, then the parameter completion mechanism is activated. The completion is based on preset business rules, which may include reading historical interaction information from the context management module to obtain missing parameters, using default values ​​(such as the default page number being 1 and the number of items per page being 10 in paginated queries), or requesting supplementary information by asking the user.

[0061] If the judgment result indicates that the key parameters already meet the complete condition, or have met the complete condition after completion, the operation intent and the completed key parameters are encapsulated according to a preset data structure. The preset data structure typically uses a computer-readable format, such as a JSON object or a collection of key-value pairs, explicitly marking the operation intent field and the corresponding key parameter field. After encapsulation, a structured operation instruction is generated, which can be directly parsed and executed by subsequent task interfaces, thus completing the conversion from natural language to internal instructions.

[0062] As an optional implementation method, Figure 3 This is a flowchart of the task execution method provided in the embodiments of the present invention, such as... Figure 3 As shown, the preset task interface is called and structured operation instructions are executed to obtain the execution results, including: S301. Parse the structured operation instructions to obtain the operation intent and key parameters.

[0063] Structured operation instructions are computer-readable intermediate representations. After parsing, they provide a clear business type (such as data on-chaining, evidence verification, or evidence record query) and the parameters required for execution (such as evidence content, evidence identifier, pagination parameters, etc.), preparing for subsequent matching of preset task interfaces.

[0064] S302. Match the corresponding preset task interface according to the operation intention.

[0065] Match the corresponding preset task interface from the task interface set according to the operation intention.

[0066] The task interface set is a pre-configured set of standardized interfaces, each corresponding to a specific blockchain evidence storage operation, such as a data uplink interface, an evidence storage verification interface, and an evidence storage record query interface. For example, if the operation intent is "data uplink," the data uplink interface is matched; if the operation intent is "evidence storage verification," the evidence storage verification interface is matched; and if the operation intent is "evidence storage record query," the evidence storage record query interface is matched. Upon successful matching, information such as the interface's call address, input parameter format, and return result structure is obtained.

[0067] S303. Take the key parameters as input, call the preset task interface, and execute the business process corresponding to the preset task interface.

[0068] The pre-defined task interface is a standardized encapsulation of a type of blockchain notarization operation process. It may contain multiple technical sub-steps, such as parameter verification, hash calculation, smart contract invocation, database read / write, and result assembly. Through interface call requests, key parameters are passed to the business process execution engine. The engine automatically executes each sub-step sequentially according to the interface definition, without user intervention or understanding of the underlying implementation details. Throughout the execution process, the business process's running status is monitored in real time to ensure that each step is executed correctly in the predetermined order and logic.

[0069] S304. Collect business feedback data generated after the execution of the business process, and use the business feedback data as the execution result.

[0070] After a business process is completed, corresponding business feedback data will be generated based on the execution status. For example, a successful data upload process will generate credential information such as transaction hash and block height; a notarization verification process will generate a conclusion of verification success or failure based on the comparison results; and a notarization record query process will generate paginated results such as a record list and the total number of records. This data directly reflects the results of the business operations that users care about.

[0071] Business feedback data is aggregated and organized to form a structured execution result. This execution result does not include underlying technical logs or intermediate states, but only retains core information directly related to user business needs.

[0072] As an optional implementation method, Figure 4 This is a flowchart of the data uplink execution method provided in an embodiment of the present invention, such as... Figure 4 As shown, the business process corresponding to the preset task interface includes: S3031. When the business process is a data upload process, the legality of the evidence content in the key parameters shall be verified.

[0073] In the data upload process, the first step is to verify the legality of the evidence content in the key parameters. The verification rules can be flexibly configured according to business needs, such as checking whether the evidence content is empty, whether the data type is correct, whether the content length exceeds the system limit, and whether it contains illegal characters or sensitive information.

[0074] Taking contract notarization as an example, it is necessary to verify whether the contract text entered by the user is an empty string, or whether the contract number conforms to the preset format specifications. If the verification passes, the process will continue to the subsequent hash calculation stage; if the verification fails, the reason for the failure will be recorded and the current process will be terminated to avoid passing invalid data to subsequent hash calculations or blockchain on-chain operations.

[0075] 3032. After the legality verification is passed, calculate the hash fingerprint of the evidence content.

[0076] After the legality verification is passed, the hash fingerprint of the evidence is further calculated. The hash fingerprint is a fixed-length string obtained by operating on the evidence using a specific hash algorithm (such as SHA-256), and it is unique and irreversible.

[0077] In the actual calculation process, the user-provided evidence (such as contract text or chat logs) is used as input parameters to call a preset hash function for calculation. The calculated hash fingerprint is a hexadecimal string, such as "0x7d9a5c3e...". This hash fingerprint will be used as the core data for subsequent on-chain operations and will be written into the blockchain evidence storage smart contract.

[0078] S3033, Call the evidence storage smart contract to upload the hash fingerprint to the blockchain and obtain the transaction receipt; wherein, the transaction receipt includes the transaction hash and block height.

[0079] The pre-deployed evidence storage smart contract is invoked to store the hash fingerprint calculated in the previous step on the blockchain. The evidence storage smart contract is an automated program that runs on the blockchain and defines the business logic for data storage, such as writing the incoming hash fingerprint into a specific storage area of ​​the blockchain ledger.

[0080] Using the client interface provided by the blockchain adaptation layer, a transaction is constructed to invoke the notarization smart contract, with the hash fingerprint passed as a transaction parameter. After the transaction is broadcast to the blockchain network, it is verified, packaged, and block-generated by consensus nodes. Once the transaction is successfully written to the blockchain, a transaction receipt is returned. The transaction receipt is an execution credential returned by the blockchain network, containing at least two key fields: transaction hash and block height. The transaction hash is a unique identifier for the transaction, which can be used for subsequent tracing and querying; the block height indicates the block position where the transaction was written, and combined with the block height, further detailed block information such as block time and verification nodes can be queried.

[0081] S3034. Based on the block height in the transaction receipt, query the corresponding block information from the blockchain.

[0082] The block height is a unique sequential number for each block in a blockchain. This number allows for precise location of the specific block storing transactions uploaded to the blockchain. The block query interface provided by the blockchain adaptation layer is called, passing the block height as a query parameter to the blockchain node.

[0083] When a blockchain node receives a query request, it returns detailed information about the corresponding block. This information typically includes the block's creation time, block hash, parent block hash, validator node signature, and a list of all transactions contained within the block.

[0084] S3035. Save the transaction hash, block height, evidence content, hash fingerprint, and block information as evidence storage results to the database.

[0085] The transaction hash, block height, original user evidence content, calculated hash fingerprint, and block information (such as block time and verification node) generated during the data uploading process are saved as a single evidence record in the database.

[0086] Furthermore, assign a unique evidence identifier (such as an auto-incrementing ID or UUID) to the record to facilitate quick querying and verification later.

[0087] The transaction hash, block height, and hash fingerprint information after successful notarization are returned to the large language model as business feedback data.

[0088] As an optional implementation method, Figure 5 This is a flowchart of the evidence verification execution method provided in the embodiments of the present invention, such as... Figure 5 As shown, the business process corresponding to the preset task interface includes: S3036. When the business process is a certificate verification process, extract the certificate identifier and the content to be verified from the key parameters.

[0089] In the evidence verification process, it is necessary to extract two core pieces of information required to perform the verification operation from the key parameters: evidence identifier and content to be verified.

[0090] The evidence storage identifier is a unique credential provided by the user when initiating a verification request. It is usually the transaction hash or sequentially assigned evidence storage number returned when the evidence was previously stored on the blockchain, and is used to locate the corresponding original evidence storage record in the database.

[0091] The content to be verified is the target data that the user wants to verify to be consistent with the original data on the chain, such as a contract text or a chat log.

[0092] Based on preset parameter extraction rules, these two fields are accurately obtained from the key parameters. If either of these fields is missing from the user input, the parameter completeness check will fail, triggering the parameter completion mechanism.

[0093] S3037. Query the corresponding original evidence content in the database according to the evidence storage identifier; wherein, the original evidence content includes at least the original hash fingerprint.

[0094] Using the evidence identifier as a query condition, the pre-configured database is accessed to perform an exact match query. The evidence records stored in the database are persistently saved during the data uploading process, and each record contains at least the original hash fingerprint corresponding to the original evidence content. The original hash fingerprint is a fixed-length string obtained by hashing the original evidence content before data uploading, used to uniquely identify the digital digest of the evidence content.

[0095] In addition to the original hash fingerprint, the evidence record usually also saves auxiliary information such as transaction hash, block height, on-chain timestamp, and optional original evidence content (or the storage path of the original content).

[0096] If the query is successful, a complete evidence record, including the original hash fingerprint, will be obtained for subsequent comparison. If the query fails, for example, due to a missing evidence identifier or a database connection error, the reason for the failure will be recorded, the current verification process will be interrupted, and the corresponding error message will be returned.

[0097] S3038. Calculate the hash fingerprint of the content to be verified.

[0098] The same hash algorithm (e.g., SHA-256) used in the data on-chain process is used to perform hash calculations on the content to be verified, so as to obtain the hash fingerprint to be verified, ensuring the direct comparability of the two calculation results.

[0099] S3039. Compare the hash fingerprint to be verified with the original hash fingerprint; if they match, generate business feedback data for successful verification; if they do not match, generate business feedback data for failed verification.

[0100] Determine whether the hash to be verified is consistent with the original hash fingerprint. If the hash fingerprint to be verified is exactly the same as the original hash fingerprint, it means that the content to be verified is consistent with the original evidence content and has not been modified or tampered with. If the two are different, it means that the content to be verified is different from the original evidence content, which may have been tampered with or the user provided incorrect content.

[0101] Based on the comparison results, corresponding business feedback data is generated. If the comparison matches, verified business feedback data is generated, such as structured data containing prompts like "Verification passed, content has not been tampered with." If the comparison does not match, verified business feedback data is generated, such as structured data containing prompts like "Verification failed, content has been tampered with or does not match the stored evidence."

[0102] As an optional implementation method, Figure 6 This is a flowchart of the evidence record query execution method provided in the embodiments of the present invention, such as... Figure 6 As shown, the business process corresponding to the preset task interface includes: S30310. When the business process is a record retrieval process, extract pagination parameters from the key parameters; the pagination parameters include the page number and the number of pages per page.

[0103] In the evidence record query process, pagination parameters are extracted from key parameters. Pagination parameters are used to control the range and number of query results returned, and mainly include two fields: page number and number of pages per page.

[0104] Page number indicates which page of data the user wants to retrieve, usually starting from 1. Number of records per page specifies the maximum number of records that can be stored per page, such as 10, 20, or 50. These two parameters together form the basic conditions for paginated queries.

[0105] S30311. Execute a pagination query in the database based on the pagination parameters, and use the pagination query results as business feedback data.

[0106] Based on the page number and the number of records per page, construct the database pagination query conditions, execute the query, and return a pagination result object containing a list of records, the total number of records, and the total number of pages. This pagination result object serves as business feedback data for subsequent generation of natural language feedback.

[0107] This invention also provides a blockchain-based evidence storage and interaction system based on a large language model. Figure 7 This is a schematic diagram of the structure of the blockchain-based evidence storage and interaction system based on a large language model provided in an embodiment of the present invention, as shown below. Figure 7 As shown, the system includes: The instruction acquisition module 100 is used to acquire natural language instructions input by the user.

[0108] First, the system obtains the user's natural language input. Users can initiate requests through various interactive methods, such as entering text in the chat interface of instant messaging tools, web consoles, or mobile applications.

[0109] These natural language commands do not need to follow any preset format or grammatical rules; users can describe their evidence storage needs entirely using everyday language. For example, a user can enter "Help me store this contract as evidence" to initiate a data upload request, enter "Verify whether the contract with evidence storage ID 0xabc123 has been tampered with" to perform evidence storage verification, or enter "View my recent evidence storage records" to perform a record query.

[0110] The operation instruction generation module 200 is used to perform semantic parsing of natural language instructions based on a large language model, identify the operation intent and extract key parameters, and generate structured operation instructions based on the operation intent and key parameters.

[0111] Large language models are deep learning models pre-trained on large-scale corpora, possessing powerful semantic understanding and information extraction capabilities.

[0112] Users can directly input natural language commands as prompts or queries into the large language model. The large language model recognizes the operational intent expressed by the command, such as data upload, evidence verification, or evidence record query. Simultaneously, it extracts the key parameters necessary to execute the operation from the command, such as evidence content, evidence identifier, or pagination information. After completing intent recognition and parameter extraction, the operational intent and key parameters are encapsulated according to a preset data structure to generate a structured operation command. This structured command is a computer-readable intermediate representation that can be directly parsed and executed by subsequent business processing modules.

[0113] The execution result generation module 300 is used to call the preset task interface and execute structured operation instructions to obtain the execution result.

[0114] The structured operation instructions clearly record the operation intent and key parameters. Based on this intent, the corresponding preset task interface is matched from a predefined set of task interfaces. The preset task interface is a standardized encapsulation of the core operations of blockchain evidence storage, such as data connection interface, evidence verification interface, and evidence record query interface. Each preset task interface encapsulates one or more technical steps required to complete the corresponding operation, including parameter verification, hash calculation, on-chain transaction construction, smart contract invocation, transaction receipt retrieval, and data persistence.

[0115] The key parameters in the structured operation instructions are used as input to call the matched preset task interface, which automatically executes the encapsulated business process. During execution, no user intervention or understanding of the underlying technical details is required. After the business process is completed, the execution results are directly collected.

[0116] The information output module 400 is used to return the execution results to the large language model, generate feedback information, and output it.

[0117] The execution results typically include the operation status (success or failure) and various data generated during the execution, such as transaction hashes, block heights, verification comparison results, or lists of evidence records.

[0118] After receiving the execution result, the large language model transforms the technical execution result into feedback information that conforms to natural language expression habits, based on the current operation intent and the pre-set feedback generation strategy. For example, for the execution result of successful data uploading to the blockchain, the large language model will generate a statement like "Successful evidence storage! Your data has been uploaded to the blockchain, the transaction hash is 0xabc..., and the block height is 12345"; for evidence storage verification results, it will generate a prompt such as "Verification passed, content has not been tampered with" or "Verification failed, content has been tampered with" based on whether the comparison is consistent.

[0119] The large language model generates natural language feedback information and outputs it to the user through the user interface. The output can take the form of text messages in a chat dialog box, notification prompts in a web console, or push messages in a mobile application. Users can intuitively understand the operation results without having to analyze any technical parameters.

[0120] In one specific embodiment of the present invention, the entire system adopts a three-layer architecture, including a natural language understanding layer, a service proxy layer, and a blockchain adaptation layer.

[0121] The Natural Language Understanding layer, built upon a large language model, serves as the entry point for user interaction with the system, responsible for converting user natural language into structured operational commands. This layer includes an intent recognition module, a parameter extraction module, and a context management module.

[0122] The intent recognition module is used to identify the core operational intent of user input. It predefines blockchain-related functional categories, including data uploading, evidence verification, and evidence record query. It maps user input to corresponding business intents through a semantic classification model.

[0123] The parameter extraction module extracts key parameters required for operations from natural language and encapsulates them in a structured manner based on predefined parameter templates. For example, it extracts the evidence storage content field from the query "Help me put 'Contract Number 12345' on the blockchain". For missing parameters, it automatically completes them according to business rules, such as default pagination parameters.

[0124] The context management module is used to maintain context information in multi-turn dialogues. By constructing a dialogue state model, it stores key data from historical interactions (such as evidence identifiers and query results) in a structured manner. In subsequent requests, the context reference resolution mechanism maps referential information in user input (such as "this evidence") to specific object identifiers, thereby achieving cross-turn semantic understanding.

[0125] The service proxy layer is a cluster of business services that provides standardized interfaces in the form of RESTful APIs, responsible for handling core business logic and data persistence. This layer includes an API gateway controller and a business logic service layer.

[0126] The API gateway controller provides a series of standardized HTTP interfaces, such as sending transactions, querying evidence details, verifying evidence content, and querying evidence records, serving as a unified service entry point for the service proxy layer.

[0127] The business logic service layer includes core business modules such as evidence storage services and contract deployment services, responsible for parameter validation, business process orchestration, and data persistence. Parameter validation verifies the legality and integrity of request parameters; business process orchestration connects steps such as hash calculation, on-chain interaction, and result storage; and data persistence stores evidence records and transaction information in a database for quick retrieval. Through the process orchestration mechanism, the originally complex multi-step blockchain operation is abstracted into a single business call interface, thereby reducing system complexity.

[0128] The blockchain adaptation layer encapsulates the SDK of the underlying blockchain network, shielding the upper layers from the complexity of the blockchain network. This layer includes a client management module, a smart contract interaction module, and a block utility module.

[0129] The client management module is responsible for initializing and managing the connection to the blockchain network and loading the required encryption keys.

[0130] The smart contract interaction module encapsulates the interaction logic with the evidence storage smart contract. For example, it provides a "save evidence" method. When calling it, you only need to pass in the data hash, and the module will complete complex operations such as contract calling and transaction signing.

[0131] The Block Tools module provides convenient blockchain data query functions, such as obtaining block details based on block height and querying the latest height on the current chain.

[0132] As an optional implementation method, Figure 8 This is a schematic diagram of the operation instruction generation module provided in an embodiment of the present invention, as shown below. Figure 8 As shown, the operation instruction generation module 200 includes: The operation intent recognition submodule 2001 is used to input natural language commands into the semantic classifier of the large language model and output the corresponding operation intent.

[0133] Semantic classifiers are functional modules formed by targeted fine-tuning or hinting engineering of large language models. They are specifically designed to map natural language text to predefined blockchain notarization operation categories.

[0134] When a user inputs a natural language command such as "Help me register this contract" or "Record today's communication content", the semantic classifier will comprehensively judge the verbs, nouns and the overall context of the sentence and output the corresponding operation intention, such as "data on the blockchain".

[0135] Similarly, when a user enters "verify the previous evidence record" or "query my evidence record", the classifier will output the intents "evidence verification" or "evidence record query" respectively.

[0136] The key parameter extraction submodule 2002 is used to call the parameter extraction template associated with the operation intent and extract key parameters from the natural language instructions according to the parameter extraction template.

[0137] A corresponding parameter extraction template is pre-associated for each operation intent. This template defines the key parameter names, types, and extraction rules required to execute the intent. When an operation intent is output, the parameter extraction template matching the intent is invoked, and the user's original natural language command is parsed according to the rules defined in the template.

[0138] For example, if the operation intent is "data on the blockchain", the corresponding parameter extraction template is called. The template defines "evidence content" as a key parameter. Therefore, it is necessary to extract the evidence content specified by the user from the instruction. For example, if the natural language instruction entered by the user is "help me put 'contract number 12345' on the blockchain for evidence storage", then the key parameter is "contract number 12345".

[0139] If the operation intent is "evidence verification", the parameter extraction template defines two key parameters: "evidence identifier" and "content to be verified". For example, if the user's input natural language command is "verify whether the contract with evidence ID 0xabc123... and content 'contract number 12345' has been tampered with", then the evidence identifier "0xabc123" and the content to be verified "contract number 12345" are extracted from the command as key information.

[0140] For the intent of "evidence record query", the parameter extraction template may define pagination parameters such as "page number" and "number per page". For example, if the natural language command entered by the user is "view the second page, display 20 records per page", then the page number "2" and the number of records per page "20" will be extracted from the natural language command as key parameters.

[0141] The parameter extraction process can be achieved based on technologies such as the question-answering capabilities of large language models, regular expression matching, or named entity recognition.

[0142] The instruction generation submodule 2003 is used to determine whether the key parameters meet the preset completeness conditions. If not, the key parameters are completed according to the preset business rules; otherwise, the operation intention and key parameters are encapsulated according to the preset data structure to generate a structured operation instruction.

[0143] For each operational intent, a minimum set of parameters required to execute the operation is predefined, i.e., preset complete conditions. For example, the data upload intent requires at least the evidence storage content, the evidence storage verification intent requires both the evidence storage identifier and the content to be verified, and the evidence storage record query intent allows for missing pagination parameters, which can be supplemented by default values. The currently extracted key parameters are compared with the complete conditions corresponding to the intent to determine whether the parameters are complete.

[0144] If the judgment result indicates that the incomplete condition is not met, for example, if the user only says "help me register the contract" without providing specific registration details, then the parameter completion mechanism is activated. The completion is based on preset business rules, which may include reading historical interaction information from the context management module to obtain missing parameters, using default values ​​(such as the default page number being 1 and the number of items per page being 10 in paginated queries), or requesting supplementary information by asking the user.

[0145] If the judgment result indicates that the key parameters already meet the complete condition, or have met the complete condition after completion, the operation intent and the completed key parameters are encapsulated according to a preset data structure. The preset data structure typically uses a computer-readable format, such as a JSON object or a collection of key-value pairs, explicitly marking the operation intent field and the corresponding key parameter field. After encapsulation, a structured operation instruction is generated, which can be directly parsed and executed by subsequent task interfaces, thus completing the conversion from natural language to internal instructions.

[0146] As an optional implementation method, Figure 9 This is a schematic diagram of the structure of the execution result generation module provided in an embodiment of the present invention, as shown below. Figure 9 As shown, the execution result generation module 300 includes: The parsing submodule 3001 is used to parse structured operation instructions and obtain the operation intent and key parameters.

[0147] Structured operation instructions are computer-readable intermediate representations. After parsing, they provide a clear business type (such as data on-chaining, evidence verification, or evidence record query) and the parameters required for execution (such as evidence content, evidence identifier, pagination parameters, etc.), preparing for subsequent matching of preset task interfaces.

[0148] The interface matching submodule 3002 is used to match the corresponding preset task interface according to the operation intention.

[0149] Match the corresponding preset task interface from the task interface set according to the operation intention.

[0150] The task interface set is a pre-configured set of standardized interfaces, each corresponding to a specific blockchain evidence storage operation, such as a data uplink interface, an evidence storage verification interface, and an evidence storage record query interface. For example, if the operation intent is "data uplink," the data uplink interface is matched; if the operation intent is "evidence storage verification," the evidence storage verification interface is matched; and if the operation intent is "evidence storage record query," the evidence storage record query interface is matched. Upon successful matching, information such as the interface's call address, input parameter format, and return result structure is obtained.

[0151] The business execution submodule 3003 is used to take key parameters as input, call the preset task interface, and execute the business process corresponding to the preset task interface.

[0152] The pre-defined task interface is a standardized encapsulation of a type of blockchain notarization operation. It may contain multiple technical sub-steps, such as parameter validation, hash calculation, smart contract invocation, database read / write, and result assembly. Through the interface call request, key parameters are passed to the business process execution engine. The engine automatically executes each sub-step sequentially according to the interface definition, without user intervention or understanding of the underlying implementation details. Throughout the execution process, the business process's running status is monitored in real time to ensure that each step is executed correctly in the predetermined order and logic.

[0153] The execution result generation submodule 3004 is used to collect business feedback data generated after the execution of the business process and use the business feedback data as the execution result.

[0154] After a business process is completed, corresponding business feedback data will be generated based on the execution status. For example, a successful data upload process will generate credential information such as transaction hash and block height; a notarization verification process will generate a conclusion of verification success or failure based on the comparison results; and a notarization record query process will generate paginated results such as a record list and the total number of records. This data directly reflects the results of the business operations that users care about.

[0155] Business feedback data is aggregated and organized to form a structured execution result. This execution result does not include underlying technical logs or intermediate states, but only retains core information directly related to user business needs.

[0156] As an optional implementation method, Figure 10 This is a structural diagram of the business execution submodule for data uploading provided in an embodiment of the present invention, as shown below. Figure 10 As shown, the business execution submodule 3003 includes: Verification unit 30031 is used to verify the legality of the evidence content in key parameters when the business process is a data uplink process.

[0157] In the data upload process, the first step is to verify the legality of the evidence content in the key parameters. The verification rules can be flexibly configured according to business needs, such as checking whether the evidence content is empty, whether the data type is correct, whether the content length exceeds the system limit, and whether it contains illegal characters or sensitive information.

[0158] Taking contract notarization as an example, it is necessary to verify whether the contract text entered by the user is an empty string, or whether the contract number conforms to the preset format specifications. If the verification passes, the process will continue to the subsequent hash calculation stage; if the verification fails, the reason for the failure will be recorded and the current process will be terminated to avoid passing invalid data to subsequent hash calculations or blockchain on-chain operations.

[0159] The first hash calculation unit 30032 is used to calculate the hash fingerprint of the evidence content after the legality verification is passed.

[0160] After the legality verification is passed, the hash fingerprint of the evidence is further calculated. The hash fingerprint is a fixed-length string obtained by operating on the evidence using a specific hash algorithm (such as SHA-256), and it is unique and irreversible.

[0161] In the actual calculation process, the user-provided evidence (such as contract text or chat logs) is used as input parameters to call a preset hash function for calculation. The calculated hash fingerprint is a hexadecimal string, such as "0x7d9a5c3e...". This hash fingerprint will be used as the core data for subsequent on-chain operations and will be written into the blockchain evidence storage smart contract.

[0162] The transaction receipt acquisition unit 30033 is used to call the evidence storage smart contract to put the hash fingerprint on the chain and obtain the transaction receipt; the transaction receipt includes the transaction hash and block height.

[0163] The pre-deployed evidence storage smart contract is invoked to store the hash fingerprint calculated in the previous step on the blockchain. The evidence storage smart contract is an automated program that runs on the blockchain and defines the business logic for data storage, such as writing the incoming hash fingerprint into a specific storage area of ​​the blockchain ledger.

[0164] Using the client interface provided by the blockchain adaptation layer, a transaction is constructed to invoke the notarization smart contract, with the hash fingerprint passed as a transaction parameter. After the transaction is broadcast to the blockchain network, it is verified, packaged, and block-generated by consensus nodes. Once the transaction is successfully written to the blockchain, a transaction receipt is returned. The transaction receipt is an execution credential returned by the blockchain network, containing at least two key fields: transaction hash and block height. The transaction hash is a unique identifier for the transaction, which can be used for subsequent tracing and querying; the block height indicates the block position where the transaction was written, and combined with the block height, further detailed block information such as block time and verification nodes can be queried.

[0165] The information query unit 30034 is used to query the corresponding block information from the blockchain based on the block height in the transaction receipt.

[0166] The block height is a unique sequential number for each block in a blockchain. This number allows for precise location of the specific block storing transactions uploaded to the blockchain. The block query interface provided by the blockchain adaptation layer is called, passing the block height as a query parameter to the blockchain node.

[0167] When a blockchain node receives a query request, it returns detailed information about the corresponding block. This information typically includes the block's creation time, block hash, parent block hash, validator node signature, and a list of all transactions contained within the block.

[0168] The transaction hash, block height, evidence content, hash fingerprint, and block information are saved to the database as evidence storage results. The evidence storage results, transaction hash, block height, and on-chain time are then returned to the large language model as business feedback data.

[0169] The evidence storage unit 30035 is used to save the transaction hash, block height, evidence content, hash fingerprint and block information as evidence storage results to the database.

[0170] The transaction hash, block height, original user evidence content, calculated hash fingerprint, and block information (such as block time and verification node) generated during the data uploading process are saved as a single evidence record in the database.

[0171] Furthermore, assign a unique evidence identifier (such as an auto-incrementing ID or UUID) to the record to facilitate quick querying and verification later.

[0172] The transaction hash, block height, and hash fingerprint information after successful notarization are returned to the large language model as business feedback data.

[0173] As an optional implementation method, Figure 11This is a structural diagram of the business execution submodule for evidence storage and verification provided in an embodiment of the present invention, as shown below. Figure 11 As shown, the business execution submodule 3003 includes: The evidence information extraction unit 30036 is used to extract the evidence identifier and the content to be verified from key parameters when the business process is an evidence verification process.

[0174] In the evidence verification process, it is necessary to extract two core pieces of information required to perform the verification operation from the key parameters: evidence identifier and content to be verified.

[0175] The evidence storage identifier is a unique credential provided by the user when initiating a verification request. It is usually the transaction hash or sequentially assigned evidence storage number returned when the evidence was previously stored on the blockchain, and is used to locate the corresponding original evidence storage record in the database.

[0176] The content to be verified is the target data that the user wants to verify to be consistent with the original data on the chain, such as a contract text or a chat log.

[0177] Based on preset parameter extraction rules, these two fields are accurately obtained from the key parameters. If either of these fields is missing from the user input, the parameter completeness check will fail, triggering the parameter completion mechanism.

[0178] The evidence storage query unit 30037 is used to query the corresponding original evidence storage content in the database based on the evidence storage identifier; wherein, the original evidence storage content includes at least the original hash fingerprint.

[0179] Using the evidence identifier as a query condition, the pre-configured database is accessed to perform an exact match query. The evidence records stored in the database are persistently saved during the data uploading process, and each record contains at least the original hash fingerprint corresponding to the original evidence content. The original hash fingerprint is a fixed-length string obtained by hashing the original evidence content before data uploading, used to uniquely identify the digital digest of the evidence content.

[0180] In addition to the original hash fingerprint, the evidence record usually also saves auxiliary information such as transaction hash, block height, on-chain timestamp, and optional original evidence content (or the storage path of the original content).

[0181] If the query is successful, a complete evidence record, including the original hash fingerprint, will be obtained for subsequent comparison. If the query fails, for example, due to a missing evidence identifier or a database connection error, the reason for the failure will be recorded, the current verification process will be interrupted, and the corresponding error message will be returned.

[0182] The second hash calculation unit 30038 is used to calculate the hash fingerprint of the content to be verified.

[0183] The same hash algorithm (e.g., SHA-256) used in the data on-chain process is used to perform hash calculations on the content to be verified, so as to obtain the hash fingerprint to be verified, ensuring the direct comparability of the two calculation results.

[0184] The comparison unit 30039 is used to compare the hash fingerprint to be verified with the original hash fingerprint; if the comparison matches, business feedback data of verification success is generated; if the comparison does not match, business feedback data of verification failure is generated.

[0185] Determine whether the hash to be verified is consistent with the original hash fingerprint. If the hash fingerprint to be verified is exactly the same as the original hash fingerprint, it means that the content to be verified is consistent with the original evidence content and has not been modified or tampered with. If the two are different, it means that the content to be verified is different from the original evidence content, which may have been tampered with or the user provided incorrect content.

[0186] Based on the comparison results, corresponding business feedback data is generated. If the comparison matches, verified business feedback data is generated, such as structured data containing prompts like "Verification passed, content has not been tampered with." If the comparison does not match, verified business feedback data is generated, such as structured data containing prompts like "Verification failed, content has been tampered with or does not match the stored evidence."

[0187] As an optional implementation method, Figure 12 This is a structural diagram of the business execution submodule for querying evidence storage records provided in an embodiment of the present invention, as shown below. Figure 12 As shown, the business process submodule 3003 includes: The pagination parameter extraction unit 300310 is used to extract pagination parameters from key parameters when the business process is a record storage query process; the pagination parameters include page number and number of pages per page.

[0188] In the evidence record query process, pagination parameters are extracted from key parameters. Pagination parameters are used to control the range and number of query results returned, and mainly include two fields: page number and number of pages per page.

[0189] Page number indicates which page of data the user wants to retrieve, usually starting from 1. Number of records per page specifies the maximum number of records that can be stored per page, such as 10, 20, or 50. These two parameters together form the basic conditions for paginated queries.

[0190] The pagination query unit 300311 is used to execute pagination queries in the database according to pagination parameters and use the pagination query results as business feedback data.

[0191] Based on the page number and the number of records per page, construct the database pagination query conditions, execute the query, and return a pagination result object containing a list of records, the total number of records, and the total number of pages. This pagination result object serves as business feedback data for subsequent generation of natural language feedback.

[0192] The above technical solution has the following beneficial effects: by using a large language model to parse natural language instructions into structured operation instructions, the semantic gap between user natural language expression and on-chain structured data is eliminated, lowering the threshold for use; by calling preset task interfaces to execute encapsulated business processes, the complex multi-step evidence storage operations at the underlying level are shielded, avoiding execution failures caused by user misoperation; by returning the execution results to the large language model to generate natural language feedback, closed-loop management of the dialogue state is achieved, supporting reference parsing and contextual understanding in multi-turn interactions, improving operational efficiency and user experience.

[0193] The above-described specific embodiments of the invention further illustrate the purpose, technical solution, and beneficial effects of the invention. It should be understood that the above content is only for specific embodiments of the invention and is not intended to limit the scope of protection of the invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of protection of the invention.

Claims

1. A blockchain-based evidence storage and interaction method based on a large language model, characterized in that, include: Obtain natural language commands input by the user; The natural language instructions are semantically parsed based on the large language model to identify the operation intention and extract key parameters. The structured operation instructions are then generated based on the operation intention and key parameters. The preset task interface is invoked and the structured operation instructions are executed to obtain the execution result; The execution result is returned to the large language model to generate feedback information and output it.

2. The blockchain evidence storage and interaction method based on a large language model according to claim 1, characterized in that, The step of semantically parsing the natural language instructions based on a large language model to identify the operation intent and extract key parameters includes: The natural language instructions are input into the semantic classifier of the large language model, and the corresponding operation intention is output. Invoke the parameter extraction template associated with the operation intent, and extract key parameters from the natural language instruction according to the parameter extraction template; Determine whether the key parameters meet the preset completeness conditions. If not, complete the key parameters according to the preset business rules. Otherwise, encapsulate the operation intention and key parameters according to the preset data structure to generate the structured operation instruction.

3. The blockchain evidence storage and interaction method based on a large language model according to claim 1, characterized in that, The process of calling the preset task interface and executing the structured operation instructions to obtain the execution result includes: Parse the structured operation instructions to obtain the operation intent and key parameters; Match the corresponding preset task interface according to the stated operation intention; The key parameters are used as input to call the preset task interface and execute the business process corresponding to the preset task interface. Collect the business feedback data generated after the execution of the business process, and use the business feedback data as the execution result.

4. The blockchain evidence storage and interaction method based on a large language model according to claim 3, characterized in that, The business process corresponding to the execution of the preset task interface includes: When the business process is a data upload process, the legality of the evidence content in the key parameters is verified. After the legality verification is passed, the hash fingerprint of the stored evidence is calculated; The notarization smart contract is invoked to upload the hash fingerprint to the blockchain and obtain a transaction receipt; wherein, the transaction receipt includes the transaction hash and block height; Based on the block height in the transaction receipt, query the corresponding block information from the blockchain; The transaction hash, block height, evidence content, hash fingerprint, and block information are saved to the database as evidence storage results.

5. The blockchain evidence storage and interaction method based on a large language model according to claim 3, characterized in that, The business process corresponding to the execution of the preset task interface includes: When the business process is a certificate verification process, the certificate identifier and the content to be verified are extracted from the key parameters. The database is queried according to the evidence storage identifier; wherein, the original evidence storage content includes at least the original hash fingerprint; Calculate the unverified hash fingerprint of the content to be verified; The hash fingerprint to be verified is compared with the original hash fingerprint; if they match, business feedback data of verification success is generated; if they do not match, business feedback data of verification failure is generated.

6. The blockchain evidence storage and interaction method based on a large language model according to claim 3, characterized in that, The business process corresponding to the execution of the preset task interface includes: When the business process is a record retrieval process, pagination parameters are extracted from the key parameters; wherein, the pagination parameters include page number and number of pages per page; The pagination query is executed in the database according to the pagination parameters, and the pagination query results are used as business feedback data.

7. A blockchain-based evidence storage and interaction system based on a large language model, characterized in that, include: The instruction acquisition module is used to acquire natural language instructions input by the user. The operation instruction generation module is used to perform semantic parsing of the natural language instructions based on the large language model, identify the operation intention and extract key parameters, and generate structured operation instructions based on the operation intention and key parameters. The execution result generation module is used to call the preset task interface and execute the structured operation instructions to obtain the execution result; The information output module is used to return the execution result to the large language model, generate feedback information, and output it.

8. The blockchain-based evidence storage and interaction system according to claim 7, characterized in that, The operation instruction generation module includes: The operation intent recognition submodule is used to input the natural language command into the semantic classifier of the large language model and output the corresponding operation intent; The key parameter extraction submodule is used to call the parameter extraction template associated with the operation intention and extract key parameters from the natural language instruction according to the parameter extraction template. The instruction generation submodule is used to determine whether the key parameters meet the preset completeness conditions. If not, the key parameters are completed according to the preset business rules; otherwise, the operation intention and key parameters are encapsulated according to the preset data structure to generate the structured operation instruction.

9. The blockchain-based evidence storage and interaction system according to claim 7, characterized in that, The execution result generation module includes: The parsing submodule is used to parse the structured operation instructions and obtain the operation intent and key parameters; The interface matching submodule is used to match the corresponding preset task interface according to the operation intention; The business execution submodule is used to take the key parameters as input, call the preset task interface, and execute the business process corresponding to the preset task interface. The execution result generation submodule is used to collect business feedback data generated after the execution of the business process and use the business feedback data as the execution result.

10. The blockchain-based evidence storage and interaction system according to claim 9, characterized in that, The business execution submodule includes: The verification unit is used to verify the legality of the evidence content in the key parameters when the business process is a data uplink process. The first hash calculation unit is used to calculate the hash fingerprint of the evidence content after the legality verification is passed; The transaction receipt acquisition unit is used to call the evidence storage smart contract to upload the hash fingerprint to the blockchain and obtain the transaction receipt; wherein, the transaction receipt includes the transaction hash and the block height; The information query unit is used to query the corresponding block information from the blockchain based on the block height in the transaction receipt; The evidence storage unit is used to save the transaction hash, block height, evidence storage content, hash fingerprint, and block information as evidence storage results to the database.