Smart contract scheduling method and device, equipment and medium

By using semantic parsing and metadata tagging of the smart contract main chain, combined with the intelligent routing engine and cross-chain execution engine, the problems of resource waste and data silos in blockchain technology under diverse needs are solved, and the flexibility and efficiency of smart contract scheduling are improved.

CN121979631APending Publication Date: 2026-05-05CHINA MERCHANTS FINANCE HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MERCHANTS FINANCE HLDG CO LTD
Filing Date
2025-12-30
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing blockchain technology cannot dynamically adapt to diverse needs, forcing enterprises to repeatedly deploy multiple chains for different businesses, increasing hardware and maintenance costs, creating technical barriers, and cross-chain technology lacks the ability to dynamically adapt to business logic, resulting in data silos and resource waste.

Method used

Semantic parsing and metadata tagging are performed through the smart contract main chain. The target sub-chain is determined by the intelligent routing engine. Smart contracts are created by combining pre-trained business domain models. Atomic collaboration of multi-sub-chain contract calls is achieved through a unified cross-chain execution engine.

Benefits of technology

It achieves greater flexibility and efficiency in smart contract scheduling, eliminating the need for enterprises to repeatedly build chains. The system can automatically adapt to sub-chain resources, enabling rapid deployment of complex businesses and efficient cross-chain execution, thus optimizing resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121979631A_ABST
    Figure CN121979631A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of block chains, and discloses an intelligent contract scheduling method and device, equipment and a medium, and the method comprises the steps: carrying out the semantic analysis of a contract code and business description which are submitted by a user in advance through a preset intelligent contract main chain, obtaining a structured business demand, converting the structured business demand into a structured metadata tag, and transmitting the structured metadata tag to a server; mapping the service description into executable parameters based on a pre-trained service domain model, determining a target sub-chain by using a preset intelligent routing engine, creating a smart contract by using the target sub-chain according to the structured metadata label and the executable parameters, judging whether the smart contract needs to be executed across multiple sub-chains, if yes, executing the smart contract, and if not, executing the smart contract. And otherwise, accessing the target sub-chain by using the smart contract main chain to complete the service function, and if so, realizing unified calling and data reading of multiple sub-chains by using a preset execution engine to obtain a cross-chain transaction sequence, and accessing the target sub-chain based on the cross-chain transaction sequence to realize the service function, thereby improving the efficiency of smart contract scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and in particular to a smart contract scheduling method, apparatus, device, and medium. Background Technology

[0002] With the widespread application of blockchain technology in finance, IoT, and supply chain, the core requirements of blockchain for different business scenarios vary significantly: the financial sector requires high privacy and compliance, the IoT sector requires high concurrency throughput and low latency, and the supply chain sector requires inter-chain data interoperability and collaborative execution. However, the current blockchain technology system has obvious limitations. On the one hand, single-chain structures (public chains, consortium chains, and private chains) are independent and cannot dynamically adapt to diverse needs—for example, while public chains are open, their performance is insufficient to support the high concurrency of IoT scenarios; while consortium chains are efficient, their nodes are limited, making it impossible to meet the multi-participant collaboration needs of financial scenarios. This leads to enterprises having to repeatedly deploy multiple chains for different businesses, which not only increases hardware and maintenance costs but also creates technical barriers due to differences in inter-chain architecture.

[0003] On the other hand, existing cross-chain technologies mostly focus on inter-chain asset transfers (such as cross-chain transfers), lacking the ability to dynamically adapt to business logic and unable to call external chain contracts or match optimal sub-chain resources according to business needs. At the same time, independently deployed chains form data silos, and data between chains is not interconnected (such as supply chain order data cannot be synchronized to the financial chain for credit assessment), resulting in low overall business execution efficiency.

[0004] Furthermore, the practice of enterprises building separate blockchains for different business operations leads to significant resource waste. The redundant construction and fragmented storage of multiple blockchain nodes within the same enterprise further increases operating costs. Against this backdrop, there is an urgent need for a blockchain architecture that can dynamically adapt to multiple scenario requirements, achieve cross-chain collaboration, and optimize resource utilization to address the current industry problems of "difficult adaptation, poor collaboration, and high costs." Therefore, in existing technologies, most solutions focus only on the technical development of the asset probes themselves, lacking a unified cluster management mechanism for multiple asset probes and the ability to automatically map and associate asset probes with the organizational structure and internal network structure of large enterprises. Summary of the Invention

[0005] This invention provides a smart contract scheduling method, apparatus, computer equipment, and medium to solve the problems of low efficiency and low security of existing smart contract scheduling methods on the market.

[0006] Firstly, a smart contract scheduling method is provided, including: The system uses a pre-defined smart contract main chain to perform semantic parsing on the contract code and business description submitted by the user in advance, thereby obtaining structured business requirements. The structured business requirements are transformed into structured metadata tags, and the business descriptions are mapped to executable parameters based on a pre-trained business domain model. The target subchain is determined using a preset intelligent routing engine, and a smart contract is created using the target subchain based on the structured metadata tags and the executable parameters. Determine whether the smart contract needs to be executed across multiple subchains; If not required, the target subchain can be accessed using the smart contract main chain to complete the business function; If necessary, the preset execution engine is used to realize unified invocation and data reading of multiple subchains, and obtain cross-chain transaction sequences; Business functions are implemented by accessing the target subchain based on the cross-chain transaction sequence.

[0007] Secondly, a smart contract scheduling device is provided, comprising: The semantic parsing module is used to perform semantic parsing on the contract code and business description submitted by the user in advance using the preset smart contract main chain, so as to obtain structured business requirements. The parameter mapping module is used to convert the structured business requirements into structured metadata tags and to map the business description into executable parameters based on a pre-trained business domain model. The contract creation module is used to determine the target sub-chain using a preset intelligent routing engine, and to create a smart contract using the target sub-chain based on the structured metadata tags and the executable parameters. The execution judgment module is used to determine whether the smart contract needs to be executed across multiple sub-chains. If not, the main chain of the smart contract is used to access the target sub-chain to complete the business function. If so, a preset execution engine is used to realize unified calling and data reading of multiple sub-chains to obtain a cross-chain transaction sequence. The business implementation module is used to access the target sub-chain based on the cross-chain transaction sequence to implement business functions.

[0008] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described smart contract scheduling method.

[0009] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the aforementioned smart contract scheduling method.

[0010] The core improvement of this solution, which utilizes the aforementioned smart contract scheduling methods, devices, computer equipment, and storage media, lies in the construction of a dynamic scheduling and collaboration system based on the smart contract factory main chain. By introducing semantic parsing and metadata tagging mechanisms, diverse business requirements are automatically transformed into standardized, schedulable descriptions. Furthermore, a layered architecture of "main chain scheduling + multi-type sub-chain execution" is adopted, using an intelligent routing engine to achieve dynamic optimal matching between business and underlying chain resources. A unified cross-chain execution engine is designed to achieve atomic collaboration and transaction management for multi-sub-chain contract calls. These improvements significantly enhance the flexibility and efficiency of smart contract scheduling. Enterprises do not need to concern themselves with the technical details of the underlying blockchain, nor do they need to repeatedly build chains for different businesses. The system can automatically adapt or generate suitable sub-chain resources according to requirements and complete complex businesses through an efficient cross-chain collaboration mechanism, thereby achieving overall resource optimization, rapid business deployment, and improved cross-chain execution efficiency. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention 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.

[0012] Figure 1 This is a schematic diagram of an application environment for a smart contract scheduling method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating a smart contract scheduling method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a smart contract scheduling device in one embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation

[0013] 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, not all, of the embodiments of the present invention. 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.

[0014] The smart contract scheduling method provided in this invention can be applied to, for example... Figure 1In this application environment, the client communicates with the server via a network. The server can automatically perform semantic parsing and metadata processing of business requirements through the client, intelligently match or generate suitable target subchains and automatically deploy contracts. Simultaneously, it achieves multi-subchain collaboration through a unified cross-chain execution engine, ultimately completing business functions in an automated and adaptable manner, significantly improving the scheduling efficiency and cross-chain collaboration capabilities of smart contracts. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.

[0015] Please see Figure 2 As shown, Figure 2 A flowchart illustrating the smart contract scheduling method provided in this embodiment of the invention includes the following steps: S1. Using the pre-set smart contract main chain, perform semantic parsing on the contract code and business description submitted by the user in advance to obtain structured business requirements.

[0016] In this embodiment of the invention, the step of using a preset smart contract main chain to perform semantic parsing on the contract code and business description pre-submitted by the user to obtain structured business requirements includes: Lexical and syntactic analysis are performed on the contract code and business description to obtain an abstract syntax tree; Based on semantic rules and a predefined dictionary, the intent of parsing the abstract syntax tree is used to obtain a semantic representation; By combining the pre-trained business domain model with domain knowledge fusion of the semantic representation, structured business requirements are obtained.

[0017] In detail, the lexical and syntactic parsing of the contract code and business description to obtain an abstract syntax tree involves decomposing the input text into basic tokens, such as keywords, identifiers, and operators. Then, according to predefined grammatical rules (such as programming language syntax or natural language syntax), these tokens are organized into a hierarchical abstract syntax tree. The abstract syntax tree represents the logical relationships of the input in a tree structure; for example, for contract code, it shows function calls and variable dependencies; for business descriptions, it captures subject-verb-object structures. The output is the abstract syntax tree, which provides a structured foundation for subsequent semantic analysis and ensures that the input is correctly parsed into a machine-readable format.

[0018] In detail, the intention to parse the abstract syntax tree based on semantic rules and a predefined dictionary to obtain a semantic representation is achieved by applying semantic rules (such as logical reasoning rules) and a predefined dictionary (containing industry terms and concepts, such as "transfer" corresponding to a financial transaction) to parse and annotate the nodes of the abstract syntax tree. For example, through semantic role annotation technology, the agent, patient, time, and conditions of an action are identified, mapping grammatical elements to business operations.

[0019] In detail, the intent of the abstract syntax tree refers to the core business objectives, functional purposes, and constraints hidden beneath the code form, inferred by analyzing the abstract syntax tree structure of the code.

[0020] In detail, the semantic representation is fused with domain knowledge using a pre-trained business domain model to obtain structured business requirements. This includes querying the domain model to supplement industry-specific parameters (such as compliance standards like GDPR or device protocols like MQTT), validating and enriching semantic content, such as automatically setting default privacy levels or performance constraints. Domain knowledge fusion also involves adjusting business logic to fit real-world scenarios, ensuring the feasibility and optimization of requirements.

[0021] S2. The structured business requirements are converted into structured metadata tags, and the business description is mapped to executable parameters based on a pre-trained business domain model.

[0022] In this embodiment of the invention, converting the structured business requirements into structured metadata tags includes: Based on a predefined metadata tag classification system, each field in the structured business requirements is mapped to its corresponding tag category to obtain the metadata tag framework; The metadata tag framework is numerically standardized to obtain a standardized metadata tag framework; The standardized metadata tag framework is versioned and initialized with a signature to obtain an initialized metadata tag framework. The initial metadata tag framework is serialized to obtain structured metadata tags.

[0023] In detail, the process of mapping each field in the structured business requirements to its corresponding tag category based on a predefined metadata tag classification system to obtain the metadata tag framework involves automatically mapping each field of the business requirements to the most suitable tag category and specific field according to a predefined, comprehensive metadata tag classification system (such as the categories "Basic Information," "Data and Privacy," and "Resources and Performance" mentioned in the disclosure document). For example, the "Latency Threshold" field in the business requirements is mapped to the "Response Latency" tag under the "Resources and Performance" category.

[0024] In detail, the numerical standardization of the metadata tag framework to obtain a standardized metadata tag framework mainly includes: converting text descriptions (such as "high latency") into quantitative indicators (such as ">500ms"); matching free text to predefined enumerated values ​​(such as mapping "requires encryption" to "privacy level: HIGH"); and filling unspecified optional fields with system default values.

[0025] In detail, the versioning and signature initialization process for the standardized metadata tag framework yields an initialized metadata tag framework. First, a unique version number is generated for the standardized metadata tag framework (e.g., following semantic versioning rules), and an associated, immutable change history is initialized. Next, the framework content is digitally signed using an encrypted private key. This signing operation ensures the integrity and authenticity of the metadata tags, and any subsequent tampering will be detected.

[0026] In detail, the serialization of the initial metadata tag framework to obtain structured metadata tags involves serializing the initial metadata tag framework from the system's internal data structure into a standardized, cross-platform exchangeable text format. Depending on system configuration or interaction requirements, this framework is converted into common data formats such as JSON, XML, or YAML. This serialization ensures the portability and interoperability of the metadata.

[0027] In this embodiment of the invention, the pre-trained business domain model maps the business description to executable parameters, including: Identify the technical parameter keywords in the business description, extract the parameter names and original values ​​from the technical parameter keywords, and obtain the original parameter list; The original parameter list is conceptually analyzed, numerically quantized, and hidden parameters are supplemented using the business domain model to obtain a preprocessed quantized parameter set. Based on parameter binding, the preprocessed quantization parameter set is transformed into an executable configuration instruction set; The executable configuration instruction set is output in a structured manner to obtain executable parameters.

[0028] In detail, the process involves identifying technical parameter keywords in the business description, extracting parameter names and original values ​​from these keywords to obtain a raw parameter list, and using natural language processing technology to scan and identify keywords related to technical implementation in the description, such as "high concurrency," "real-time response," and "data encryption." The processing includes: performing part-of-speech tagging and entity recognition on these keywords to distinguish parameter names (such as "concurrency," "latency," and "privacy technology") and their corresponding original values ​​(such as "high," "real-time," and "encryption"), ultimately outputting the raw parameter list.

[0029] In detail, the step of using the business domain model to perform concept parsing, numerical quantization, and hidden parameter supplementation on the original parameter list to obtain a pre-processed quantized parameter set involves calling a pre-trained business domain model. This model embeds a knowledge base and rule base specific to the industry (such as finance or the Internet of Things). The model first performs concept parsing, mapping common terms to precise technical terms (e.g., parsing "encryption" as "homomorphic encryption"). Next, it performs numerical quantization, converting qualitative descriptions into industry-standard quantified values ​​(e.g., quantizing "high concurrency" as ">10000 TPS"). Furthermore, the model supplements hidden parameters based on domain best practices, automatically adding technical parameters that are not explicitly stated in the business but are necessary for functionality (e.g., automatically adding "audit log" requirements for financial transactions).

[0030] In detail, the parameter binding process transforms the preprocessed quantized parameter set into an executable set of configuration instructions, aiming to convert these parameters into commands that the system can directly understand and execute. The parameter binding operation associates abstract technical parameters with specific implementation modules, resource types, and configuration options within the system. For example, quantized "throughput" and "latency" parameters are bound to specific "consensus algorithms" (such as RBFT) and "subchain types" (such as high-performance consortium blockchains). This process also includes conflict resolution to ensure there are no contradictions between the parameter requirements and generates a coordinated set of configuration commands oriented towards the underlying infrastructure.

[0031] S3. Use a preset intelligent routing engine to determine the target sub-chain, and use the target sub-chain to create a smart contract based on the structured metadata tags and the executable parameters.

[0032] In this embodiment of the invention, the determination of the target subchain using a preset intelligent routing engine involves the intelligent routing engine receiving and analyzing "structured metadata tags" and "executable parameters" as core inputs. First, it performs multi-dimensional matching with the real-time resource profiles (including performance indicators, geographical location, compliance status, and cost models) of all registered subchains in the system. Then, the engine performs weighted evaluation and scoring of candidate subchains based on preset scheduling strategies (such as lowest cost, best performance, or load balancing). If an existing subchain that meets the requirements exists, it is directly identified as the target. If not, the subchain deployment mechanism is triggered to dynamically generate a new subchain that meets the specifications. Finally, a clear target subchain identifier or creation instruction is output, thereby completing intelligent and adaptive chain resource allocation.

[0033] In this embodiment of the invention, the step of creating a smart contract using the target subchain based on the structured metadata tag and the executable parameters includes: Contract code is generated based on the structured metadata tags and the executable parameters; The contract code is compiled to obtain the compiled code; Identify the deployment account in the structured metadata tag, verify whether the deployment account has the permission to deploy the contract in the target subchain, and obtain the permission verification result; Based on the permission verification result and the compiled code, a signed deployment transaction is obtained. The signed deployment transaction is submitted to the target subchain to realize the creation of the smart contract.

[0034] In detail, the step of generating contract code based on the structured metadata tags and executable parameters involves calling a built-in AI code generation model. This model uses the structured requirements and parameters as instructions and context to automatically write smart contract source code that conforms to business functions and technical specifications. For example, based on the "asset trading" business and the "zero-knowledge proof" parameter, Solidity or Rust code containing privacy verification logic can be generated.

[0035] In detail, the process of compiling the contract code to obtain the compiled code involves calling the official compiler (such as solc or rustc) corresponding to the target subchain to compile the source code written in a high-level language into low-level bytecode that can be executed by the virtual machine of that subchain.

[0036] Specifically, identifying the deployment account in the structured metadata tag, verifying whether the deployment account has the authority to deploy contracts on the target subchain, and obtaining the authority verification result involves extracting the deployer's identity information (such as public key or account address) from the "owner" or "deployment account" field of the metadata tag. Subsequently, the target subchain is queried to verify whether the account exists, whether its status is normal, and to confirm whether it has sufficient authority and resources to deploy smart contracts (such as holding enough native tokens to pay gas fees).

[0037] In detail, the step of signing and deploying the transaction based on the permission verification result and the compiled code to obtain a signed deployment transaction involves using the private key of the deployment account to digitally sign the deployment transaction containing the contract bytecode. This process ensures the authenticity and non-repudiation of the transaction. After signing, the system constructs a complete signed deployment transaction data packet that conforms to the target subchain transaction format. This transaction data packet contains all the necessary deployment information and is ready to be broadcast to the on-chain network.

[0038] In detail, submitting the signed deployment transaction to the target subchain to create a smart contract involves broadcasting the transaction to the target subchain's network via a node interface and waiting for consensus nodes in the network to package and confirm it. Once the transaction is successfully included in a block, it means that the smart contract has been officially created and initialized on the target subchain and has obtained a globally unique contract address on the chain.

[0039] S4. Determine whether the smart contract needs to be executed across multiple subchains.

[0040] If not required, execute S5 to access the target sub-chain using the smart contract main chain to complete the business function.

[0041] In this embodiment of the invention, the process of using the smart contract main chain to access the target sub-chain to complete business functions involves a smart contract deployed on the main chain acting as a trusted intermediary and scheduling center. This smart contract initiates a cross-chain access request to a specific target sub-chain according to preset business logic. The smart contract verifies the legitimacy of the request and triggers a cross-chain communication protocol, securely transmitting necessary instructions or data to the target sub-chain. After receiving and verifying this information, the target sub-chain executes corresponding business operations (such as data query, asset transfer, or state update), and finally returns the operation results via the main chain smart contract. This achieves collaborative processing and functional completion of cross-chain business while ensuring the security and consistency of the blockchain network.

[0042] If necessary, execute S6 to use the preset execution engine to achieve unified invocation and data reading of multiple subchains, and obtain the cross-chain transaction sequence.

[0043] In this embodiment of the invention, the step of using a preset execution engine to achieve unified invocation and data reading across multiple subchains to obtain a cross-chain transaction sequence includes: The execution engine is used to parse and orchestrate cross-chain transactions based on the business description and structured metadata tags to obtain a cross-chain transaction logic execution plan. Based on the executable parameters and the cross-chain transaction logic execution plan, the call request is serialized to obtain a serialized call request queue; Inject atomicity and consistency guarantee mechanisms into the serialized call request queue to obtain the cross-chain transaction protocol packet; The cross-chain transaction protocol package is solidified into a transaction sequence to obtain a cross-chain transaction sequence.

[0044] In detail, the process of using the execution engine to parse and orchestrate cross-chain transactions based on the business description and structured metadata tags to obtain a cross-chain transaction logic execution plan involves using the execution engine to parse these input data, identify the various sub-chain contracts that need to be called, their execution order, and data flow dependencies, and then orchestrate these scattered call points into a complete workflow with a clear logical order (such as serial, parallel, or conditional branching).

[0045] In detail, the step of serializing the call request based on the executable parameters and the cross-chain transaction logic execution plan to obtain a serialized call request queue involves the execution engine traversing each call node in the logic execution plan, combining the specific parameter values ​​provided by the executable parameters, and, for different target subchains' technical specifications (such as their respective ABI interfaces), transforming the abstract call request into concrete binary data that can be recognized by on-chain nodes. This process includes encoding function selectors, parameter values, etc., and marking all associated requests with the same global transaction ID for easy tracking.

[0046] In detail, the process of injecting atomicity and consistency guarantees into the serialized call request queue to obtain a cross-chain transaction protocol package employs a two-phase commit protocol similar to distributed transactions, organizing the request into two phases: "pre-execution" and "confirmation and commit." Alternatively, a corresponding compensation transaction (i.e., rollback logic) is pre-designed and registered for each forward call operation. The output cross-chain transaction protocol package not only adds a coordination and control flow to the original call queue but also includes the necessary rollback or compensation logic, thereby providing a strong consistency guarantee for the entire cross-chain transaction.

[0047] In detail, the process of solidifying the cross-chain transaction protocol package into a transaction sequence involves using an execution engine to drive the execution of the protocol package. During and after execution, verifiable evidence such as transaction receipts and state change proofs returned by all participating subchains is collected. Subsequently, the engine packages the complete lifecycle record of this cross-chain call—including but not limited to the detailed content of all call requests, the exact execution order, timestamps, final results, and collected verifiable proofs—into an immutable and auditable log unit. The output is the cross-chain transaction sequence, which is a complete and reliable record of this cross-chain transaction. This sequence is typically anchored and stored on the main chain or a dedicated audit chain to achieve permanent evidence preservation and post-event traceability.

[0048] S7. Access the target subchain based on the cross-chain transaction sequence to implement business functions.

[0049] In this embodiment of the invention, the step of accessing the target subchain based on the cross-chain transaction sequence to implement business functions includes: Initiate contract call requests to multiple target subchains involved in the cross-chain transaction sequence, obtain the execution results of each target subchain in response to the contract call requests, and obtain an execution result set; The atomicity of the execution result set is verified to obtain the atomicity verification result; Based on the atomicity confirmation result and the execution result set, cross-chain result aggregation and business output generation are performed to obtain the final aggregated business result.

[0050] In detail, the process of initiating contract call requests to multiple target sub-chains involved in the cross-chain transaction sequence, obtaining the execution results of each target sub-chain in response to the contract call requests, and obtaining an execution result set is achieved by initiating signed and encoded contract call requests concurrently or sequentially to all involved sub-chains through a unified cross-chain communication interface. The system then monitors and waits for on-chain confirmation from each sub-chain, collecting the original output, triggering events, and key state change proofs for each call from the transaction receipts.

[0051] In detail, the atomic confirmation of the execution result set, to obtain the atomic confirmation result, utilizes the execution engine to make a final ruling on the global consistency of the entire cross-chain transaction. The engine first verifies the validity of the state proofs (such as Merkle proofs) returned by all sub-chains to ensure the authenticity and finality of the data. Subsequently, according to the predefined atomicity rules in the cross-chain transaction sequence (typically the "all-success" principle), the operation results of all sub-chains are verified: only when the call to every sub-chain in the result set is confirmed as successful is the cross-chain transaction considered successful; otherwise, if any sub-chain operation fails or times out, the entire transaction is considered a failure.

[0052] In detail, the process of aggregating cross-chain results and generating business outputs based on the atomicity confirmation result and the execution result set to obtain the final aggregated business result takes the atomicity confirmation result and the execution result set as inputs. Its processing logic is driven by the atomicity confirmation result: if the confirmation is successful, the execution engine will ignore intermediate processes and directly extract the valid data returned by each sub-chain from the successful execution result set. Subsequently, these scattered data are concatenated, transformed, or calculated according to the initial business logic, ultimately merging into a unified final business result that meets the business party's expectations (e.g., aggregating the payment success status of chain A and the delivery success status of chain B into "order completed"); if the confirmation is unsuccessful, no business aggregation will be performed, but a predefined compensation mechanism (such as rollback or business compensation) in the transaction sequence will be directly triggered, and its execution result will serve as another output of this step.

[0053] In this embodiment of the invention, the SLA threshold specifically defines the quantitative requirements of enterprise users for system performance and service quality, typically including the following key indicators: Performance indicators: such as expected throughput (how many transactions are processed per second), response latency (how many milliseconds an operation must complete); Availability indicators: such as system or subchain uptime (e.g., 99.99% availability); Reliability indicators: such as transaction success rate (e.g., 99.9% of transactions must be successfully executed); Other business constraints: such as data privacy level, compliance standards (e.g., must meet GDPR regulations), etc.

[0054] In this embodiment of the invention, when accessing the target subchain to implement business functions based on the cross-chain transaction sequence, the system collects key indicators such as throughput, response latency, and failure rate in real time through monitoring agents deployed on the mainline and each subchain, and automatically compares them with preset SLA thresholds. When the system detects that any indicator continuously deviates from the agreed range, the adaptive engine will immediately start the decision-making process—intelligently selecting rerouting to the backup subchain, elastically expanding existing nodes, or replacing the entire substandard subchain according to the performance gap. At the same time, the performance deviation data, triggering reasons, executed operations, and repair results are formed into a verifiable evidence chain and fully recorded in the audit log to achieve full-link performance self-healing and compliance traceability.

[0055] In this embodiment of the invention, when accessing the target subchain to implement business functions based on the cross-chain transaction sequence, when the system identifies any subchain operation failure or triggering abnormal conditions through cross-chain transaction monitoring, the compensation engine immediately initiates a reverse operation instruction to the relevant subchain that has been successfully executed, according to the compensation strategy (such as reverse transaction, data recovery script or business compensation contract) pre-registered in the metadata tag, to complete asset rollback, state reset or alternative business compensation, and records the audit trail of all compensation operations to ensure the eventual consistency of distributed transactions and maintain the integrity of business logic.

[0056] As can be seen, in the above scheme, the pre-submitted contract code and business description are semantically parsed using a preset smart contract main chain to obtain structured business requirements. These structured business requirements are then transformed into structured metadata tags. Based on a pre-trained business domain model, the business description is mapped to executable parameters. A preset intelligent routing engine is used to determine the target sub-chain. A smart contract is created using the target sub-chain based on the structured metadata tags and executable parameters. It is determined whether the smart contract needs to be executed across multiple sub-chains. If not, the target sub-chain is accessed using the smart contract main chain to complete the business function. If so, a preset execution engine is used to achieve unified calling and data reading across multiple sub-chains, resulting in a cross-chain transaction sequence. The target sub-chain is then accessed based on this cross-chain transaction sequence to implement the business function, thus improving the efficiency of smart contract scheduling.

[0057] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0058] In one embodiment, a smart contract scheduling device is provided, which corresponds one-to-one with the smart contract scheduling method described in the above embodiments. For example... Figure 3 As shown, the smart contract scheduling device includes a semantic parsing module 101, a parameter mapping module 102, a contract creation module 103, an execution judgment module 104, and a business implementation module 105. Detailed descriptions of each functional module are as follows: The semantic parsing module 101 is used to perform semantic parsing on the contract code and business description submitted by the user in advance using the preset smart contract main chain to obtain structured business requirements. The parameter mapping module 102 is used to convert the structured business requirements into structured metadata tags and to map the business description into executable parameters based on a pre-trained business domain model. The contract creation module 103 is used to determine the target sub-chain using a preset intelligent routing engine, and to create a smart contract using the target sub-chain based on the structured metadata tags and the executable parameters. The execution judgment module 104 is used to determine whether the smart contract needs to be executed across multiple sub-chains. If not, the main chain of the smart contract is used to access the target sub-chain to complete the business function. If so, a preset execution engine is used to realize the unified call and data reading of multiple sub-chains to obtain the cross-chain transaction sequence. The business implementation module 105 is used to access the target sub-chain based on the cross-chain transaction sequence to implement business functions.

[0059] In one embodiment, the semantic parsing module 101, when performing semantic parsing of the user-submitted contract code and business description using a preset smart contract main chain to obtain structured business requirements, is specifically used for: Lexical and syntactic analysis are performed on the contract code and business description to obtain an abstract syntax tree; Based on semantic rules and a predefined dictionary, the intent of parsing the abstract syntax tree is used to obtain a semantic representation; By combining the pre-trained business domain model with domain knowledge fusion of the semantic representation, structured business requirements are obtained.

[0060] In one embodiment, the parameter mapping module 102, when performing the conversion of the structured business requirements into structured metadata tags, is specifically used for: Based on a predefined metadata tag classification system, each field in the structured business requirements is mapped to its corresponding tag category to obtain the metadata tag framework; The metadata tag framework is numerically standardized to obtain a standardized metadata tag framework; The standardized metadata tag framework is versioned and initialized with a signature to obtain an initialized metadata tag framework. The initial metadata tag framework is serialized to obtain structured metadata tags.

[0061] In one embodiment, the parameter mapping module 102, when executing the pre-trained business domain model to map the business description into executable parameters, is specifically used for: Identify the technical parameter keywords in the business description, extract the parameter names and original values ​​from the technical parameter keywords, and obtain the original parameter list; The original parameter list is conceptually analyzed, numerically quantized, and hidden parameters are supplemented using the business domain model to obtain a preprocessed quantized parameter set. Based on parameter binding, the preprocessed quantization parameter set is transformed into an executable configuration instruction set; The executable configuration instruction set is output in a structured manner to obtain executable parameters.

[0062] In one embodiment, the contract creation module 103, when executing the creation of a smart contract using the target subchain based on the structured metadata tag and the executable parameters, is specifically used for: Contract code is generated based on the structured metadata tags and the executable parameters; The contract code is compiled to obtain the compiled code; Identify the deployment account in the structured metadata tag, verify whether the deployment account has the permission to deploy the contract in the target subchain, and obtain the permission verification result; Based on the permission verification result and the compiled code, a signed deployment transaction is obtained. The signed deployment transaction is submitted to the target subchain to realize the creation of the smart contract.

[0063] In one embodiment, the execution judgment module 104, when executing the process of using a preset execution engine to achieve unified invocation and data reading of multiple sub-chains to obtain a cross-chain transaction sequence, is specifically used for: The execution engine is used to parse and orchestrate cross-chain transactions based on the business description and structured metadata tags to obtain a cross-chain transaction logic execution plan. Based on the executable parameters and the cross-chain transaction logic execution plan, the call request is serialized to obtain a serialized call request queue; Inject atomicity and consistency guarantee mechanisms into the serialized call request queue to obtain the cross-chain transaction protocol packet; The cross-chain transaction protocol package is solidified into a transaction sequence to obtain a cross-chain transaction sequence.

[0064] In one embodiment, the business implementation module 105, when executing the business function of accessing the target sub-chain based on the cross-chain transaction sequence, is specifically used for: Initiate contract call requests to multiple target subchains involved in the cross-chain transaction sequence, obtain the execution results of each target subchain in response to the contract call requests, and obtain an execution result set; The atomicity of the execution result set is verified to obtain the atomicity verification result; Based on the atomicity confirmation result and the execution result set, cross-chain result aggregation and business output generation are performed to obtain the final aggregated business result.

[0065] This invention provides a smart contract scheduling device. It utilizes a pre-set smart contract main chain to perform semantic parsing on user-submitted contract code and business descriptions to obtain structured business requirements. These requirements are then converted into structured metadata tags. Based on a pre-trained business domain model, the business descriptions are mapped to executable parameters. A pre-set intelligent routing engine determines the target sub-chain. A smart contract is created on the target sub-chain based on the structured metadata tags and executable parameters. The device determines whether the smart contract needs to be executed across multiple sub-chains. If not, the smart contract main chain accesses the target sub-chain to complete the business function. If so, a pre-set execution engine is used to achieve unified invocation and data reading across multiple sub-chains, obtaining a cross-chain transaction sequence. The target sub-chain is then accessed based on this cross-chain transaction sequence to implement the business function, thus improving the efficiency of smart contract scheduling.

[0066] Specific limitations regarding the smart contract scheduling device can be found in the limitations of the smart contract scheduling method described above, and will not be repeated here. Each module in the aforementioned smart contract scheduling device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0067] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a smart contract scheduling method on the server side.

[0068] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the client-side functions or steps of a smart contract scheduling method.

[0069] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: The system uses a pre-defined smart contract main chain to perform semantic parsing on the contract code and business description submitted by the user in advance, thereby obtaining structured business requirements. The structured business requirements are transformed into structured metadata tags, and the business descriptions are mapped to executable parameters based on a pre-trained business domain model. The target subchain is determined using a preset intelligent routing engine, and a smart contract is created using the target subchain based on the structured metadata tags and the executable parameters. Determine whether the smart contract needs to be executed across multiple subchains; If not required, the target subchain can be accessed using the smart contract main chain to complete the business function; If necessary, the preset execution engine is used to realize unified invocation and data reading of multiple subchains, and obtain cross-chain transaction sequences; Business functions are implemented by accessing the target subchain based on the cross-chain transaction sequence.

[0070] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: The system uses a pre-defined smart contract main chain to perform semantic parsing on the contract code and business description submitted by the user in advance, thereby obtaining structured business requirements. The structured business requirements are transformed into structured metadata tags, and the business descriptions are mapped to executable parameters based on a pre-trained business domain model. The target subchain is determined using a preset intelligent routing engine, and a smart contract is created using the target subchain based on the structured metadata tags and the executable parameters. Determine whether the smart contract needs to be executed across multiple subchains; If not required, the target subchain can be accessed using the smart contract main chain to complete the business function; If necessary, the preset execution engine is used to realize unified invocation and data reading of multiple subchains, and obtain cross-chain transaction sequences; Business functions are implemented by accessing the target subchain based on the cross-chain transaction sequence.

[0071] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0072] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0073] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0074] Finally, it should be noted that if any software tools or components not belonging to this company appear in the embodiments of the application, they are merely illustrative examples and do not represent actual use. The embodiments described above are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A smart contract scheduling method, characterized in that, include: The system uses a pre-defined smart contract main chain to perform semantic parsing on the contract code and business description submitted by the user in advance, thereby obtaining structured business requirements. The structured business requirements are transformed into structured metadata tags, and the business descriptions are mapped to executable parameters based on a pre-trained business domain model. The target subchain is determined using a preset intelligent routing engine, and a smart contract is created using the target subchain based on the structured metadata tags and the executable parameters. Determine whether the smart contract needs to be executed across multiple subchains; If not required, the target subchain can be accessed using the smart contract main chain to complete the business function; If necessary, the preset execution engine is used to realize unified invocation and data reading of multiple subchains, and obtain cross-chain transaction sequences; Business functions are implemented by accessing the target subchain based on the cross-chain transaction sequence.

2. The smart contract scheduling method as described in claim 1, characterized in that, The process involves using a pre-defined smart contract main chain to perform semantic parsing on the contract code and business description submitted by the user, resulting in structured business requirements, including: Lexical and syntactic analysis are performed on the contract code and business description to obtain an abstract syntax tree; Based on semantic rules and a predefined dictionary, the intent of parsing the abstract syntax tree is used to obtain a semantic representation; By combining the pre-trained business domain model with domain knowledge fusion of the semantic representation, structured business requirements are obtained.

3. The smart contract scheduling method as described in claim 1, characterized in that, The process of converting the structured business requirements into structured metadata tags includes: Based on a predefined metadata tag classification system, each field in the structured business requirements is mapped to its corresponding tag category to obtain the metadata tag framework; The metadata tag framework is numerically standardized to obtain a standardized metadata tag framework; The standardized metadata tag framework is versioned and initialized with a signature to obtain an initialized metadata tag framework. The initial metadata tag framework is serialized to obtain structured metadata tags.

4. The smart contract scheduling method as described in claim 1, characterized in that, The pre-trained business domain model maps the business description to executable parameters, including: Identify the technical parameter keywords in the business description, extract the parameter names and original values ​​from the technical parameter keywords, and obtain the original parameter list; The original parameter list is conceptually analyzed, numerically quantized, and hidden parameters are supplemented using the business domain model to obtain a preprocessed quantized parameter set. Based on parameter binding, the preprocessed quantization parameter set is transformed into an executable configuration instruction set; The executable configuration instruction set is output in a structured manner to obtain executable parameters.

5. The smart contract scheduling method as described in claim 1, characterized in that, The process of creating a smart contract using the target subchain based on the structured metadata tags and the executable parameters includes: Contract code is generated based on the structured metadata tags and the executable parameters; The contract code is compiled to obtain the compiled code; Identify the deployment account in the structured metadata tag, verify whether the deployment account has the permission to deploy the contract in the target subchain, and obtain the permission verification result; Based on the permission verification result and the compiled code, a signed deployment transaction is obtained. The signed deployment transaction is submitted to the target subchain to realize the creation of the smart contract.

6. The smart contract scheduling method as described in claim 1, characterized in that, The method of using a preset execution engine to achieve unified invocation and data reading across multiple subchains to obtain a cross-chain transaction sequence includes: The execution engine is used to parse and orchestrate cross-chain transactions based on the business description and structured metadata tags to obtain a cross-chain transaction logic execution plan. Based on the executable parameters and the cross-chain transaction logic execution plan, the call request is serialized to obtain a serialized call request queue; Inject atomicity and consistency guarantee mechanisms into the serialized call request queue to obtain the cross-chain transaction protocol packet; The cross-chain transaction protocol package is solidified into a transaction sequence to obtain a cross-chain transaction sequence.

7. The smart contract scheduling method as described in claim 1, characterized in that, The method of accessing the target subchain based on the cross-chain transaction sequence to implement business functions includes: Initiate contract call requests to multiple target subchains involved in the cross-chain transaction sequence, obtain the execution results of each target subchain in response to the contract call requests, and obtain an execution result set; The atomicity of the execution result set is verified to obtain the atomicity verification result; Based on the atomicity confirmation result and the execution result set, cross-chain result aggregation and business output generation are performed to obtain the final aggregated business result.

8. A smart contract scheduling device, characterized in that, include: The semantic parsing module is used to perform semantic parsing on the contract code and business description submitted by the user in advance using the preset smart contract main chain, so as to obtain structured business requirements. The parameter mapping module is used to convert the structured business requirements into structured metadata tags and to map the business description into executable parameters based on a pre-trained business domain model. The contract creation module is used to determine the target sub-chain using a preset intelligent routing engine, and to create a smart contract using the target sub-chain based on the structured metadata tags and the executable parameters. The execution judgment module is used to determine whether the smart contract needs to be executed across multiple sub-chains. If not, the main chain of the smart contract is used to access the target sub-chain to complete the business function. If so, a preset execution engine is used to realize unified calling and data reading of multiple sub-chains to obtain a cross-chain transaction sequence. The business implementation module is used to access the target sub-chain based on the cross-chain transaction sequence to implement business functions.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the smart contract scheduling method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the smart contract scheduling method as described in any one of claims 1 to 7.