Contract generation method and device for large model-based data space heterogeneous connector

By introducing a large language model for policy intent parsing and structured expression, compatible policy information is generated, solving the difficulty of policy negotiation for heterogeneous connectors across data spaces, realizing efficient generation of cross-data space data exchange contracts, and improving data circulation efficiency.

CN120832381BActive Publication Date: 2026-02-03CHINA ACADEMY OF INFORMATION & COMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511316019.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2026-02-03
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

Heterogeneous connectors across data spaces face difficulties in negotiating data exchange strategy contracts due to heterogeneous strategy instructions, inconsistent control granularity, unequal strategy function sets, and incompatible strategy contract templates, thus hindering data flow.

Method used

A large language model is introduced to parse and express the policy intent in a structured manner, generating compatible policy information. Through policy rewriting and contract template mapping, policy negotiation and contract generation across data spaces are realized.

Benefits of technology

It improves policy interoperability and contract generation efficiency across data spaces, solves the problem of incompatibility in policy expression capabilities between heterogeneous connectors, and enhances contract format compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832381B_ABST
    Figure CN120832381B_ABST
Patent Text Reader

Abstract

The method comprises the following steps: obtaining policy intention information for a data party using data, inputting the policy intention information into a pre-trained large language model, and outputting structured policy information from the large language model; based on the policy capability information of each connector included in the heterogeneous connector and the structured policy information, generating compatible policy information adapted to each connector by using the large language model; inputting the compatible policy information and the contract template corresponding to each connector into the large language model, and outputting the policy contract corresponding to each connector from the large language model, so that each connector executes data exchange based on the corresponding policy contract. The present embodiment can improve the policy interoperability across data spaces and the generation efficiency of policy contracts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to data space interoperability technology and data exchange technology, and in particular to a contract generation method and apparatus for a data space heterogeneous connector based on a large model. Background Technology

[0002] With the rapid development of the digital economy, data has become an increasingly important core production factor. To improve the efficiency of data resource sharing and utilization, data space is adopted for data management and storage. Within the data space, different data providers can deploy connectors for data exchange.

[0003] However, different data spaces may use connectors with different standards. Connectors with different standards often use their own specific access control policy languages ​​(such as Open Digital Rights Language (ODRL) and Extensible Access Control Markup Language (XACML)) and contract template structures. Connectors deployed in different data spaces have problems such as heterogeneous policy instructions, inconsistent control granularity, and incorrect policy functions. This makes it impossible for heterogeneous connectors across data spaces to negotiate policy contracts for data exchange between different data spaces, hindering data flow across data spaces and turning data spaces into new data silos.

[0004] In related technologies, interface converters are used between different data spaces to achieve data exchange across data spaces. However, interface converters rely on manually defined rules, which is complicated, inefficient, and unsuitable for dynamic collaboration scenarios such as frequent updates to data exchange strategies and diverse access connectors. Summary of the Invention

[0005] This disclosure provides a contract generation method and apparatus for a heterogeneous connector in a large model data space, which can solve the above-mentioned technical problems to a certain extent.

[0006] One aspect of this disclosure provides a contract generation method based on a large-model data space heterogeneous connector, wherein different connectors in the heterogeneous connector are used to realize data exchange between data parties across data spaces, and the method includes:

[0007] Obtain policy intent information for the data party's use of data, the policy intent information being used to indicate the data exchange policy requirements corresponding to the data party during the data exchange process;

[0008] The strategy intent information is input into a pre-trained large language model, and the large language model outputs structured strategy information.

[0009] Based on the policy capability information of each connector included in the heterogeneous connector and the structured policy information, the large language model is used to generate compatible policy information that is adapted to each connector. The policy capability information of the connector is used to indicate the switching policy that the connector supports.

[0010] The compatibility strategy information and the contract template corresponding to each connector are input into the large language model, and the large language model outputs the strategy contract corresponding to each connector, so that each connector can perform data exchange based on the corresponding strategy contract.

[0011] In an exemplary embodiment, the step of generating compatible policy information adapted to each of the connectors based on the policy capability information of each connector included in the heterogeneous connector and the structured policy information, using the large language model, includes:

[0012] Based on the policy capability information of each connector and the structured policy information, determine whether each connector supports the use of each policy item included in the structured policy information;

[0013] In response to the presence of a target strategy item that the target connector does not fully support, the target strategy item is rewritten using the large language model to obtain an alternative strategy item, which is adapted to the strategy capabilities of the target connector.

[0014] Based on the alternative strategy items and the original strategy items, compatible strategy information corresponding to the target connector is generated, wherein the original strategy items are strategy items in the structured strategy information that are adapted to the strategy capabilities of the target connector.

[0015] In an exemplary embodiment, the step of rewriting the target policy term using the large language model to obtain an alternative policy term includes:

[0016] The policy capability information of the target connector that does not fully support the target policy item, and the target policy item are input into the large language model, and the alternative policy item is generated by the large language model.

[0017] In an exemplary embodiment, the step of inputting the compatibility strategy information and the contract templates corresponding to each connector into the large language model, and outputting the strategy contracts corresponding to each connector through the large language model, includes:

[0018] For any connector, the compatibility strategy information and the contract template corresponding to the connector are input into the large language model, and the large language model is used to map each strategy item in the compatibility strategy information to a contract strategy field that conforms to the contract template;

[0019] The strategy contract is generated based on the contract strategy fields.

[0020] In an exemplary embodiment, after the large language model outputs the strategy contracts corresponding to each connector, the method further includes:

[0021] For any connector's strategy contract, perform a contract consistency check on the strategy contract to obtain the check result, and perform a contract conflict detection on the strategy contract to obtain the detection result;

[0022] In response to the verification result indicating that the contract strategy fields included in the strategy contract are semantically consistent with the strategy items included in the compatible strategy information, and the detection result indicating that there are no conflicting contract items, the strategy contract is sent to the connector.

[0023] In one exemplary embodiment, the method further includes:

[0024] Receive the policy capability description information and contract template uploaded by each of the connectors;

[0025] The description information of each strategy capability is parsed to generate strategy capability information corresponding to each connector. The information content of the strategy capability information conforms to a preset standard.

[0026] Store the strategy capability information and the contract template corresponding to each connector.

[0027] In one exemplary embodiment, the method further includes:

[0028] Obtain contract negotiation sample sets corresponding to different heterogeneous connectors. Each contract negotiation sample in the contract negotiation sample set includes the connector's strategy capability information, contract template, strategy intent sample, structured strategy sample, compatible strategy sample, and strategy contract sample.

[0029] For any contract negotiation sample, the strategy intent sample is input into the large language model, and the large language model generates structured strategy prediction information.

[0030] Based on the policy capability information of each connector and the structured policy prediction information, the large language model is used to generate compatible policy prediction information that is adapted to each connector.

[0031] The compatibility strategy prediction information and the contract templates corresponding to each connector are input into the large language model, and the prediction strategy contracts corresponding to each connector are output by the large language model.

[0032] Based on the differences between the structured policy prediction information and the structured policy samples, the differences between the compatible policy prediction information and the compatible policy samples, and the differences between the prediction policy contract and the policy contract samples, the large language model is trained to obtain the trained large language model.

[0033] Another aspect of this embodiment provides a contract generation device based on a large-model data space heterogeneous connector, wherein different connectors in the heterogeneous connector are used to realize data exchange between data parties across data spaces, and the device includes:

[0034] The intent information acquisition module is used to acquire the data party's strategy intent information for using data, and the strategy intent information is used to indicate the data exchange strategy requirements of the data party during the data exchange process.

[0035] The structured policy generation module is used to input the policy intent information into a pre-trained large language model and output structured policy information through the large language model.

[0036] A compatibility strategy generation module is used to generate compatibility strategy information adapted to each of the connectors based on the strategy capability information of each connector included in the heterogeneous connector and the structured strategy information, using the large language model. The strategy capability information of the connector is used to indicate the switching strategy supported by the connector.

[0037] The strategy contract generation module is used to input the compatibility strategy information and the contract templates corresponding to each connector into the large language model, and output the strategy contracts corresponding to each connector through the large language model, so that each connector can perform data exchange based on the corresponding strategy contracts.

[0038] In another aspect of this embodiment, an electronic device is provided, comprising:

[0039] Memory, used to store computer programs;

[0040] A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the contract generation method for a data space heterogeneous connector based on a big language model as described in any of the above embodiments.

[0041] In another aspect of this embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the contract generation method for a data space heterogeneous connector based on a large model as described in any of the above embodiments.

[0042] In another aspect of this embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the contract generation method for a data space heterogeneous connector based on a large model as described in any of the above embodiments.

[0043] In this embodiment, a large language model is introduced into the contract generation process of heterogeneous connectors across data spaces. The large language model processes the input policy intent information for the data party to use the data to obtain structured policy information, which enables intelligent parsing of policy intent and unified expression of multi-source policies. It effectively supports the extraction of policy information from intent information in various input forms. Then, combined with the policy capability information of each connector in the heterogeneous connector, the large language model is used to negotiate policies and generate compatible policy information adapted to each connector, so that the policy expression capabilities between connectors are equivalent. It can intelligently handle the problem of incompatibility between structured policy information and the policy capabilities of connectors, and maximize the compatibility of the capabilities of each connector while retaining the original policy intent, thereby improving the success rate of policy negotiation between heterogeneous connectors. Then, the compatible policy information and the contract templates of each connector are input into the large language model to generate the policy contracts corresponding to each connector. The large language model is used for contract generation, which can support the formatted generation of contracts under multiple contract template structures, which helps to enhance the compatibility of contract format and the ability to adapt to expression.

[0044] Introducing large language models into the contract generation process of heterogeneous connectors across data spaces can intelligently assist in policy negotiation between heterogeneous connectors across data spaces and intelligently convert contract formats through their ability to understand policy intentions and express structured language. This helps improve policy interoperability across data spaces and the efficiency of policy contract generation.

[0045] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0046] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0047] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:

[0048] Figure 1 A flowchart of a contract generation method for a data space heterogeneous connector based on a large model, provided as an exemplary embodiment of this disclosure;

[0049] Figure 2 A flowchart illustrating the process of generating compatibility strategy information provided as an exemplary embodiment of this disclosure;

[0050] Figure 3A flowchart of the process for generating a strategy contract provided as an exemplary embodiment of this disclosure;

[0051] Figure 4 A flowchart of a large language model training process provided as an exemplary embodiment of this disclosure;

[0052] Figure 5 A flowchart of a contract generation method for a data space heterogeneous connector based on a large model, provided as another exemplary embodiment of this disclosure;

[0053] Figure 6 A schematic diagram of the structure of an application system provided as an exemplary embodiment of this disclosure;

[0054] Figure 7 A schematic diagram of the structure of a contract generation apparatus based on a large model data space heterogeneous connector provided as an exemplary embodiment of this disclosure;

[0055] Figure 8 A schematic diagram of the structure of an electronic device provided for an exemplary embodiment of this disclosure. Detailed Implementation

[0056] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.

[0057] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of this disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.

[0058] It should also be understood that in the embodiments disclosed herein, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.

[0059] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.

[0060] Furthermore, the term "and / or" in this disclosure is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this disclosure generally indicates that the preceding and following related objects have an "or" relationship.

[0061] It should also be understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.

[0062] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0063] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0064] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0065] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0066] The embodiments disclosed herein can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.

[0067] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.

[0068] In this embodiment of the disclosure, a heterogeneous connector refers to a connector that spans multiple data spaces, with different connectors deployed in different data spaces. Because connectors in different data spaces employ different policy languages ​​and contract template structures, heterogeneous connectors face numerous challenges in policy negotiation and contract interoperability, including:

[0069] (1) Heterogeneous policy instructions: Different connectors in a heterogeneous connector use different expression instructions for the same policy semantics. For example, for the semantic "A allows B to use data D within time X", connector A uses the usePolicy instruction structure, while connector B may use the grantUseWithTimeLimit instruction structure, making it difficult to directly match or parse the policy content.

[0070] (2) Inconsistent control granularity: Different connectors support different policy control granularities, which limits semantic alignment capabilities. For example, connector A supports "minute-level" time limits (such as validFrom=10:00 to validUntil=10:30), while connector B only supports "day-level" time granularity and cannot express or understand finer-grained limits, which affects policy consistency.

[0071] (3) Asymmetric strategy function sets: Different connectors support different strategy function sets. For example, some connectors support "no derivative use" (i.e., prohibiting re-derivation and training based on the original data), while other connectors do not support this type of strategy expression, making it difficult to meet the data use constraints of the data party during contract negotiation.

[0072] (4) Incompatibility of strategy contract templates: There are incompatibility issues in the structure, fields and semantic interpretation of strategy contract instances, which cannot be directly interchanged.

[0073] Challenges such as heterogeneous policy instructions, inconsistent control granularity, unequal policy function sets, and incompatible policy contract templates prevent direct mapping and negotiation between policies of heterogeneous connectors.

[0074] The approach used in related technologies, which involves using interface converters in two different data spaces, relies on manual intervention and cannot adapt to dynamic collaboration scenarios such as frequent policy definition updates and diverse access connectors.

[0075] Large Language Models (LLMs) possess capabilities in natural language understanding, logical reasoning, and code generation. In this embodiment, a large language model is introduced into the contract generation process of heterogeneous connectors across data spaces. Through its ability to understand policy intent and express structured language, it provides intelligent assistance for policy negotiation between heterogeneous connectors and automatically converts contract formats. This allows the generated policy contracts to be used in cross-data space data exchange processes, improving cross-data space policy interoperability and contract generation efficiency.

[0076] like Figure 1 The diagram illustrates a flowchart of a contract generation method for a data space heterogeneous connector based on a large model, provided by an exemplary embodiment of this disclosure. This method can be used as a data space interconnection gateway, and includes the following steps 110-140:

[0077] Step 110: Obtain the policy intent information for the data party's use of data. The policy intent information is used to indicate the corresponding data exchange policy requirements of the data party during the data exchange process.

[0078] In this embodiment of the disclosure, the heterogeneous connector is a connector that spans data spaces. That is, a connector used in different data spaces is called a heterogeneous connector. For example, connector A used in data space A and connector B used in data space B are heterogeneous connectors. Different connectors in the heterogeneous connector are used to realize data exchange between data parties across data spaces.

[0079] Connectors are used in the data exchange process. Optionally, the functions of a connector for a data party (such as a data provider or data user) include data access management, exchange policy execution, data transmission, and data usage control. In one possible implementation, the connector can execute data exchange based on a policy contract. The policy contract is generated based on the policy intent information corresponding to the connector, whereby the policy intent information indicates the data exchange policy requirements of the data party during the data exchange process, i.e., the data exchange policy that the connector must execute. Optionally, a data party refers to a data endpoint; a data party can act as both a data provider and a data user. The data exchange policy requirements of a data party are the rules and conditions for providing data when the data party is acting as a data provider, i.e., the rules and conditions for other data parties to use the data from that data party. Based on the data exchange policy requirements corresponding to the data party, a policy contract is generated. The policy contract can clearly define the data usage rules and conditions of the data party. During the data exchange process, the connector can exchange data between different data parties based on these clearly defined data usage rules and conditions.

[0080] In one possible implementation, the policy intent information regarding the data provider's use of the data is the data exchange policy requirement input by the user (i.e., the data exchange policy requirement that the heterogeneous connector needs to execute). This user-input policy intent information can be obtained. Optionally, the policy intent information can be in various forms such as natural language, parameter tables, and structured forms; that is, it does not rely on a fixed syntax and supports multiple expression methods. For example, the user-input policy intent information could be: "For analysis purposes only, valid for 7 days, forwarding prohibited"; "Allowed for model training, forwarding prohibited, access limited to 10 hours, access record maintained," etc.

[0081] Step 120: Input the policy intent information into the pre-trained large language model, and the large language model outputs structured policy information.

[0082] Different connectors express the same policy objective in different ways, making direct comparison and conversion impossible. In this embodiment, a large language model is introduced to convert natural language policy intent information into a structured policy expression. In one possible implementation, a general large language model trained on a general database can be obtained. This model is then fine-tuned using real contract negotiation samples to obtain a large language model usable in the policy contract generation process—the aforementioned pre-trained large language model.

[0083] In one possible implementation, the strategy intent information is input into a large language model, which then transforms the strategy intent information into structured strategy information. Optionally, the structured strategy information can also be called neutral policy (NP) information, which has a unified expression structure. Generating structured strategy information through a large language model can provide a general intermediary semantic layer for contract generation of heterogeneous connectors, reducing the difficulty of heterogeneous connector collaboration. The method for generating structured strategy information is shown in equation (1) below:

[0084] (1)

[0085] UserIntent is the input policy intent information. This means that the input policy intent information is parsed and transformed using a large language model to obtain structured policy information NP.

[0086] In one example, inputting the policy intent information UserIntent: "Analysis only, valid for 7 days, forwarding prohibited" into the large language model yields the structured policy information NP={purpose:"analytics", duration:"7d", prohibition:["redistribute"]}, where purpose:"analytics" indicates the purpose is analysis, duration:"7d" indicates the validity period is 7 days, and prohibition:["redistribute"] indicates that forwarding is prohibited.

[0087] In one possible implementation, when calling a large language model to generate structured policy information, a transition prompt word for converting the expression can be input, so that the large language model can perform a conversion task based on the transition prompt word. Optionally, the transition prompt word includes policy intent information. For example, the input to a large language model can be "Please convert the following natural language data access control policy requirements into a structured policy representation to generate a semantic model for contract negotiation between connectors: {{Allowed for model training, not allowed to be forwarded, access limited to 10 hours, access recorded}}", and the output structured policy information NP can be obtained as: {"permission": "use", "purpose": "training", "duration": "10h", "prohibition": ["redistribute"], "obligation": ["log"]}, where "permission": "use" indicates that the permitted item is use, "purpose": "training" indicates that the purpose is training, "duration": "10h" indicates that the duration is 10 hours, "prohibition": ["redistribute"] indicates that the prohibited item is forwarding, and "obligation": ["log"] indicates that the obligation item is recording.

[0088] Step 130: Based on the policy capability information and structured policy information of each connector included in the heterogeneous connector, use a large language model to generate compatible policy information that is adapted to each connector.

[0089] Different connectors have different policy capabilities. The policy capability information of a connector indicates the switching policies it supports. The structured policy information may contain policy items that the connector cannot support. For example, connector B only supports time constraints in "days." If NP includes "duration:168h," the time constraint unit for this policy item is hours, and the connector cannot support it. This disclosure proposes a "negotiation-degradation-confirmation" mechanism. Based on the policy capabilities of each connector and the structured policy information, compatible policy information adapted to each connector is negotiated. Policies may include destination restrictions, access frequency, time restrictions, forwarding restrictions, etc., ensuring the compliance of policy negotiation.

[0090] In one possible implementation, during the negotiation process, a large language model can be invoked to perform policy downgrading (also known as policy rewriting) on ​​the structured policy information. Policy information that is not supported by the connector is semantically downgraded or its format adjusted to obtain compatible policy information that can be supported by heterogeneous connectors.

[0091] Step 140: Input the compatibility strategy information and the contract template corresponding to each connector into the large language model, and output the strategy contract corresponding to each connector through the large language model so that each connector can perform data exchange based on the corresponding strategy contract.

[0092] In one possible implementation, for any connector among the heterogeneous connectors, the compatibility strategy information and the contract template corresponding to the connector can be input into the large language model. The large language model is used to map the fields in the compatibility strategy information to the contract fields corresponding to the contract template of the connector. That is, the large language model is used to fill the formatted structure to obtain the strategy contract suitable for the connector.

[0093] In one possible implementation, a contract generation prompt can be input, which includes compatibility strategy information and a connector contract template, enabling the large language model to generate a strategy contract.

[0094] In this embodiment, a large language model is introduced into the contract generation process of heterogeneous connectors across data spaces. The large language model processes the input policy intent information for the data party to use the data to obtain structured policy information, which enables intelligent parsing of policy intent and unified expression of multi-source policies. It effectively supports the extraction of policy information from intent information in various input forms. Then, combined with the policy capability information of each connector in the heterogeneous connector, the large language model is used to negotiate policies and generate compatible policy information adapted to each connector, so that the policy expression capabilities between connectors are equivalent. It can intelligently handle the problem of incompatibility between structured policy information and the policy capabilities of connectors, and maximize the compatibility of the capabilities of each connector while retaining the original policy intent, thereby improving the success rate of policy negotiation between heterogeneous connectors. Then, the compatible policy information and the contract templates of each connector are input into the large language model to generate the policy contracts corresponding to each connector. The large language model is used for contract generation, which can support the formatted generation of contracts under multiple contract template structures, which helps to enhance the compatibility of contract format and the ability to adapt to expression.

[0095] Introducing large language models into the contract generation process of heterogeneous connectors across data spaces can intelligently assist in policy negotiation between heterogeneous connectors across data spaces and intelligently convert contract formats through their ability to understand policy intentions and express structured language. This helps improve policy interoperability across data spaces and the efficiency of policy contract generation.

[0096] In one possible implementation, the strategy capability information and contract template of the heterogeneous connector can be pre-registered and uploaded to the data space interconnection Internet gateway by the heterogeneous connector.

[0097] In one possible implementation, the system can receive policy capability description information and contract templates uploaded by each connector. Optionally, the policy capability description information includes operations supported by the connector, such as use, store, and share, granularity (e.g., duration in days), constraints, prohibitions, and obligation types.

[0098] Optionally, the contract template includes contract field structure, field types, syntax rules, expression style, etc.

[0099] In one possible implementation, the strategy capability description information can be parsed to generate strategy capability information corresponding to each connector. The information content of the strategy capability information conforms to a preset standard. After receiving the strategy capability description information uploaded by the connector, the strategy capability description information can be parsed to generate structured strategy capability information, that is, the strategy capability of the connector is expressed in a structured way, as shown in the following formula (2):

[0100] (2)

[0101] in, Indicates connector C i Corresponding strategic capability information Indicates supported policy actions, such as "use", "store", "share", etc. This indicates the allowed values ​​for the usage parameters, such as "analytics" or "training". Indicates constraints, such as time granularity "duration ≤ 30d" or geographic location granularity "region". Indicates supported obligations, such as logging, periodic deletion ("delete-after-use"), and notification. Indicates supported prohibited operations, such as forwarding "redistribute"; n is a positive integer greater than 1.

[0102] In one possible implementation, each connector may upload a contract template in addition to the policy capability description information. The contract template includes syntax specifications and parameter restrictions, as shown in equation (3) below:

[0103] (3)

[0104] in, Indicates connector C i The corresponding contract template contains contract items F1, F2, ..., F m Each contract item The corresponding template includes the template field name (e.g., purpose, duration, obligation, prohibition), the template field type (e.g., string, enum, datetime, set), and the template field constraint expression (e.g., regular expression, enumeration range, maximum length limit, whether it is required).

[0105] In one possible implementation, the policy capability information and contract templates corresponding to each connector can be stored. That is, the data space interconnection gateway stores the policy capability information and contract templates of multiple connectors to manage the policy capability information and contract templates of the connectors.

[0106] In this embodiment, the connector's policy capabilities, such as the supported action set, policy dimension, constraint granularity, and contract format, are uniformly converted into a structured expression, providing a structured foundation for subsequent semantic reasoning and policy reconstruction.

[0107] In one possible implementation, such as Figure 2 As shown, the process of generating compatible policy information adapted to each connector using a large language model based on the policy capability information and structured policy information of each connector in the heterogeneous connector can include the following steps:

[0108] Step 1301: Based on the policy capability information and structured policy information of each connector, determine whether each connector supports the use of each policy item included in the structured policy information.

[0109] In one possible implementation, the policy capability information of each connector can be adapted with the structured policy information to determine whether each connector supports the use of the policy items included in the structured policy information.

[0110] Optionally, the policy reachability function R can be used to determine the reachability of each policy item x in the connector C. i The expressibility of the connector C is determined to determine the connector C. i Whether the use of policy item x is supported. The policy reachability function R is shown in equation (4) below:

[0111] (4)

[0112] in, For connector C i Strategic capability information, This indicates that the strategy item x is matched with the strategy capability information, where x is a single strategy item in the structured strategy information NP.

[0113] Optional, Indicates connector C i Fully supports policy item x;

[0114] Indicates connector C i The approximate expression of the policy term x can be reduced or rewritten through semantic downgrading, where r is the approximate support between 0 and 1. For example, if connector B only supports time constraints expressed in "days", then for the policy term "duration:168h", R=0.8. Indicates connector C i The policy term x cannot be expressed; for example, the connector does not support the "non-derivative use" policy at all, R=0.

[0115] In one possible implementation, the support of the connector for each policy item can be determined using a policy reachability function. The support is used to characterize the degree of support of the connector for the policy item. The support is a first threshold. For example, if the first threshold is 1, it means that the connector fully supports policy item x. If the support is less than the first threshold but greater than the second threshold, for example, if the second threshold is 0, the support belongs to (0, 1), which means that the connector does not fully support the policy item. This can also be called the connector approximately supporting the policy item. The support is a second threshold. For example, if the support is 0, it means that the connector does not support the policy item at all.

[0116] In one possible implementation, the policy items and the policy capabilities of the connectors are matched based on the policy reachability function. When determining the support, a score can be given based on a preset evaluation rule to obtain the corresponding support.

[0117] In one possible implementation, each connector in the heterogeneous connector can be matched with each policy item. For example, if the heterogeneous connector includes connector A and connector B, then the policy capability information of connector A can be matched with each policy item to obtain the support level of connector A for each policy item, and the policy capability information of connector B can be matched with each policy item to obtain the support level of connector B for each policy item.

[0118] Step 1302: In response to the existence of target policy items that are not fully supported by the target connector, the target policy items are rewritten using the large language model to obtain alternative policy items, which are adapted to the policy capabilities of the target connector.

[0119] Among them, the target strategy terms that the connector does not fully support are the strategy terms whose support is less than the first threshold and greater than the second threshold, for example... The corresponding strategy item.

[0120] In one possible implementation, a large language model can be invoked to rewrite the target policy term, resulting in an alternative policy term. Optionally, policy rewriting may include semantic rewriting, approximate equivalent transformation, etc.

[0121] In one possible implementation, the policy capability information of the target connector that does not fully support the target policy item, and the target policy item can be input into the large language model, and the large language model can generate alternative policy items, as shown in equation (5) below:

[0122] (5)

[0123] in, As an alternative strategy item, This indicates policy rewriting using a large language model, where x is the target policy term. Information on the strategy capabilities of the target connector.

[0124] In one possible implementation, a rewrite prompt can be input into the large language model. This prompt includes the target connector's policy capability information and the policy item. For example, the rewrite prompt could be: "{{Connector B only supports expressing the duration field in days, not hours}}. Please convert the unit or semantically downgrade the duration field in the following policy expression to ensure it is acceptable to {{Connector B}}. Semantic accuracy should be preserved as much as possible. The processing logic includes semantic operations such as time granularity normalization, unit conversion, and field approximation completion. The output information replaces the policy item in JSON (JavaScript Object Notation) format: the policy item is {{ "duration": "10h"}}". Based on the prompt, the large language model can modify "duration":"10h" to "duration": "1d" (indicating a duration of 1 day).

[0125] In one possible implementation, after generating an alternative policy item, the user can be prompted visually (e.g., by displaying a prompt message) to confirm whether they accept the policy change, thus ensuring the policy's compliance.

[0126] In one possible implementation, for policy items that the connector does not support at all, the user can be prompted to intervene or refuse in a visual manner, and the reason for the policy generation failure can be indicated to the user.

[0127] Step 1303: Generate compatibility policy information corresponding to the target connector based on the alternative policy items and the original policy items.

[0128] The original policy item is the policy item in the structured policy information that is compatible with the policy capabilities of the target connector. After rewriting the policy for target policy items that the target connector does not fully support, compatible policy information for the target connector can be generated based on the alternative policy items and the original policy items. That is, the compatible policy information of the target connector includes the alternative policy items and the original policy items that are adapted to the original policy items.

[0129] In this embodiment, policy degradation reasoning is performed based on the policy reachability function and the large language model to achieve quantitative processing of scenarios with unequal policy expression capabilities, thereby improving the success rate of policy negotiation while retaining core data constraints.

[0130] In one possible implementation, such as Figure 3 As shown, the above process involves inputting compatibility strategy information and the contract templates corresponding to each connector into the large language model, and then outputting the strategy contracts corresponding to each connector through the large language model. This includes the following steps:

[0131] Step 1401: For any connector, input the compatibility strategy information and the contract template corresponding to the connector into the large language model, and use the large language model to map each strategy item in the compatibility strategy information to a contract strategy field that conforms to the contract template.

[0132] In one possible implementation, during the contract generation phase, for any connector, the compatibility strategy information and contract template corresponding to that connector can be input into the large language model, and the large language model can be used to fill in the formatted structure, as shown in the following equation (6):

[0133] (6)

[0134] in, This represents the generated strategy contract. Indicates connector C i Compatibility strategy information, For connector C i Contract template.

[0135] Optionally, the large language model can convert each strategy item in the compatible strategy information into a contract strategy field that conforms to the contract template through operations such as automatic field mapping, nested structure conversion, value domain type alignment, template field missing completion, and syntax adjustment. That is, it can convert it into contract terms in the contract template so that it can be filled into the contract template.

[0136] Step 1402: Generate a strategy contract based on the contract strategy field.

[0137] In one possible implementation, the contract template can be parsed into a programmable structure, such as an Abstract Syntax Tree (AST), and the contract strategy fields (also known as contract content filling parameters) generated by the large language model can be filled into the contract template to obtain a strategy contract. Optionally, the field filling process can also be performed by the large language model, that is, the large language model performs the strategy field mapping and template filling and synthesis process.

[0138] In this embodiment, a strategy contract is generated by using a large language model based on compatibility strategy information and the contract template corresponding to the connector. This supports the formatted generation of contracts under multiple contract template structures, enhances contract format compatibility and expression adaptation capabilities, and, based on contract template management and LLM-driven rendering mechanism, enables automatic format adaptation of the compatible strategy generated by the data space interconnection gateway under different connector templates. This helps to improve the compliance and generation efficiency of the generated contracts.

[0139] In one possible implementation, after the strategy contracts corresponding to each connector are output by the large language model, the strategy contract of any connector can be subjected to contract consistency verification to obtain the verification result, and the strategy contract can be subjected to contract conflict detection to obtain the detection result.

[0140] In one possible implementation, a policy consistency verification function can be used. Perform contract consistency verification and employ contract conflict detection algorithms. Perform contract conflict detection. Optionally, a strategy conflict detection method based on a Boolean Satisfiability Problem (SAT) solver or a Satisfiability Modulo Theories (SMT) solver can be used.

[0141] In one possible implementation, in response to the verification result indicating that the contract strategy fields included in the strategy contract are semantically consistent with the strategy items included in the compatible strategy information, and the detection result indicating that there are no conflicting contract items, the strategy contract is sent to the connector.

[0142] Optionally, during the contract consistency verification process, the consistency of each contract strategy field (also known as contract clause field) included in the strategy contract can be verified with each strategy item included in the compatible strategy information to ensure that the semantics of the strategy items are consistent and that the required fields in the contract template are filled. During the contract conflict detection process, it can detect whether there are conflicting contract items in the contract, such as prohibited items / obligations.

[0143] Once the contract consistency verification is passed... And the contract conflict detection passes. In such cases, the strategy contract can be issued as the final contract.

[0144] Optionally, passing contract consistency verification and contract conflict detection ensures that all required fields are filled, there are no conflicting prohibited or obligatory items, the contract can be parsed and executed by various connectors, and the final contract used is compliant and valid.

[0145] If the test fails, the strategy contract can be regenerated using a large language model. Optionally, the detected anomaly information can also be input into the large language model, allowing the large language model to regenerate the strategy contract based on the anomaly information.

[0146] In one possible implementation, after generating the strategy contracts for each connector, the strategy contracts for each connector can be stored on the blockchain for evidence preservation, enabling traceability of contract origin and tamper-proof contract content. Optionally, the contract text of the strategy contract can be stored on the blockchain.

[0147] In one possible implementation, relevant information from multiple intermediate steps generated during strategy contract negotiation can be stored on the blockchain for evidence preservation. Optionally, strategy intent information, structured strategy information, compatible strategy information, contract template identifiers, etc., can be stored to achieve full-link traceability of contract generation, allowing for the traceability of any modification or generation of strategy or contract fields.

[0148] Optionally, the final generated strategy contract can be hashed, and the calculation method is shown in equation (7) below:

[0149] (7)

[0150] in, This is the calculated digest hash value, where SHA256 is the hash function used.

[0151] Optionally, the digest hash value and contract metadata can be written into the blockchain to build a contract execution record chain. The contract metadata includes information such as signing time, subject identifier, and policy digest.

[0152] In one possible implementation, such as Figure 4 As shown, the process of training a large language model includes the following steps:

[0153] Step 210: Obtain the contract negotiation sample set corresponding to different heterogeneous connectors. Each contract negotiation sample in the contract negotiation sample set includes the connector's strategy capability information, contract template, strategy intent sample, structured strategy sample, compatible strategy sample, and strategy contract sample.

[0154] Step 220: For any contract negotiation sample, input the strategy intent sample into the large language model, and generate structured strategy prediction information through the large language model.

[0155] Step 230: Based on the policy capability information and structured policy prediction information of each connector, use a large language model to generate compatible policy prediction information that is adapted to each connector.

[0156] Step 240: Input the compatibility strategy prediction information and the contract templates corresponding to each connector into the large language model, and output the prediction strategy contracts corresponding to each connector through the large language model.

[0157] Step 250: Based on the differences between structured policy prediction information and structured policy samples, the differences between compatible policy prediction information and compatible policy samples, and the differences between prediction policy contracts and policy contract samples, the large language model is trained to obtain the trained large language model.

[0158] Optionally, the contract negotiation sample set can be a collection of samples consisting of real historical contract negotiation samples. Based on historical contract negotiation samples, a "intent-connector capability-strategy-template-contract" sample can be constructed, that is, any contract negotiation sample includes the connector's strategy capability information, contract template, strategy intent sample, structured strategy sample, compatible strategy sample, and strategy contract sample.

[0159] In one possible implementation, the training process of the large language model may include a pre-training and fine-tuning process. Optionally, a general-purpose large language model can be obtained by pre-training the large language model using a general database, and then fine-tuned using a contract negotiation sample set. Alternatively, a pre-trained general-purpose large language model can be directly obtained, and fine-tuned using a contract negotiation sample set to obtain the aforementioned pre-trained large language model for use in the contract generation process.

[0160] For any contract negotiation sample, the strategy intent sample included in the contract negotiation sample can be input into the general big language model to generate the structured strategy prediction information corresponding to the strategy intent sample. Then, the general big language model is used to combine the structured strategy prediction information with the strategy capability information of the connector to generate compatible strategy prediction information. Finally, the compatible strategy prediction information and the contract templates corresponding to each connector are input into the general big language model to obtain the predicted strategy contract.

[0161] In one possible implementation, the semantic loss of the natural language generation strategy can be determined based on the difference between the structured strategy prediction information and the structured strategy samples; the strategy rewriting loss can be determined based on the difference between the compatible strategy prediction information and the compatible strategy samples; and the contract generation loss can be determined based on the difference between the predicted strategy contract and the strategy contract samples. A loss function is constructed based on the semantic loss of the natural language generation strategy, the strategy rewriting loss, and the contract generation loss, and the general large language model is fine-tuned based on the constructed loss function. The loss function is shown in equation (8) below:

[0162] (8)

[0163] in, For the total loss, Semantic loss for natural language generation strategies Rewrite the loss for the strategy. To generate losses for the contract, , , These are the corresponding weight parameters, and the three losses can be used to train multi-task objectives such as intent parsing, policy rewriting, and contract generation, respectively, enhancing the specialized capabilities of the large language model in policy conversion, semantic understanding, and contract generation. The fine-tuned model will outperform the un-fine-tuned model in policy extraction accuracy and contract field matching rate, achieving deep adaptation to the context of the data space.

[0164] In one possible implementation, a multi-stage supervised fine-tuning approach can be adopted, which breaks down the training process of a large language model into three sub-tasks: a first sub-task, a second sub-task, and a third sub-task.

[0165] The first subtask is used to train the large language model's ability to convert policy intent information into structured policy information, corresponding to f1: UserIntent → NP. initial The second subtask is used to train the large language model's ability to rewrite policies, enabling it to reconstruct policies even when the linkers are incompatible, corresponding to f2: (NP initial PCD i PCD j →NP final This indicates that the structured strategy information NP is combined. initial And the policy capability information PCD of the two connectors. i PCD j Perform a policy rewriting task to obtain compatible policy information NP. final The third subtask is used to train the large language model to generate canonical policy contracts, corresponding to f3: (NP final T i → Contract i This indicates that the compatibility policy information NP is combined. final Contract Template T i Generate Strategy Contract i .

[0166] Optionally, an open-source large language model can be used as a general-purpose large language model, such as Qwen-7B, DeepSeek-7B, LLaMA 3-8B, etc. The large language model can be efficiently fine-tuned using methods such as Low-Rank Adaptation (LoRA), Parameter-Efficient Fine-Tuning (PEFT), and Instruction Tuning to obtain the large language model used for strategy contract generation.

[0167] Optionally, different evaluation metrics can be used to determine whether to end the fine-tuning process for different stages of the task. Optionally, the first subtask can use field accuracy as the evaluation metric, the second subtask can use the semantic consistency between connector capabilities and policies as the evaluation metric, and the third subtask can use field matching rate and grammatical validity rate as the evaluation metric. Optionally, the fine-tuning process of the large language model can be terminated if the evaluation metrics meet preset conditions.

[0168] In this embodiment, a multi-task fine-tuning training mechanism is introduced to enhance the scenario adaptability of the large language model in terms of strategy understanding and contract generation. By constructing multi-level labeled data of "intent-connector capability-policy-template-contract", multi-task joint fine-tuning is carried out to improve the three capabilities of parsing, rewriting, and contract generation, and to support the generalization and transfer of the model in actual business in the data space.

[0169] In one possible implementation, such as Figure 5 The diagram illustrates a flowchart of a contract generation method for a data space heterogeneous connector based on a large model, provided in an exemplary embodiment of this disclosure. This method, used for a data space interconnection gateway, includes the following steps:

[0170] Step 310: Obtain the strategy capability information and contract template corresponding to the connector.

[0171] Step 320: Obtain the policy intent information input by the user.

[0172] Step 330: Call the large language model to parse the policy intent information and generate structured policy information.

[0173] Step 340: Compare the structured policy information with the policy capability information of each connector, and use the policy reachability function to determine policy reachability.

[0174] Determining policy reachability means determining the connector's support for the policy.

[0175] Step 350: Determine whether all policy items in the structured policy information are fully reachable. If yes, proceed to step 380; otherwise, proceed to step 360.

[0176] "Fully reachable" means that each connector has a support level of 1 for the policy item.

[0177] Step 360: Call the large language model to rewrite the policy for policy items that are not fully reachable.

[0178] Among them, the strategy term that is not fully reachable is the aforementioned target strategy term.

[0179] Step 370: Display policy confirmation information.

[0180] Step 380: Call the large language model to process the compatibility strategy information and contract template to obtain the strategy contract corresponding to the connector.

[0181] Step 390: Perform contract consistency verification and contract conflict detection on the strategy contract.

[0182] Step 3100: Determine if the contract is qualified. If yes, proceed to step 3110; otherwise, proceed to step 380.

[0183] Step 3110: The strategy contract is issued and executed.

[0184] The implementation methods of steps 310-3110 correspond to the above embodiments and can be referred to the above embodiments, which will not be repeated here.

[0185] In one possible implementation, such as Figure 6 The diagram illustrates the structure of a system applicable to the contract generation method based on a large model and heterogeneous connectors in data space, as provided in an exemplary embodiment of this disclosure. The heterogeneous connectors include connection A in data space A and connector B in data space B. The data user in data space A and the data provider in data space B are different data parties within the data space, and can also function as a data provider and a data user, respectively.

[0186] The data space interconnection gateway includes a strategy capability parsing module, a strategy contract template management module, an intent information acquisition module, a structured strategy generation module, a compatible strategy generation module, a strategy contract generation module, a strategy contract optimization and verification module, a strategy contract distribution module, a blockchain notarization module, and a fine-tuning training and continuous learning module.

[0187] The policy capability parsing module receives and parses the Policy Capability Description (PCD) documents uploaded by connectors (including connector A and connector B). It extracts supported policy types, constraint granularity, obligation clauses, and expression syntax to generate a standardized capability profile for the connector, which is then stored in the policy capability knowledge base for subsequent semantic matching and negotiation. For example, connector A (the data user)... A Connector B of the data provider B Register PCD with this module using common formats such as JSON / extensible markup language (XML). A PCD BThis module supports extracting fields covering supported policy actions (e.g., "use"), supported uses (e.g., "analytics"), time unit granularity (e.g., "day" or "hour"), and supported obligations (e.g., "log"). This module standardizes connector capabilities into a structured policy capability graph for policy item matching and capability reachability assessment; PCD (e.g., PCD...) A PCD B The data is stored in the strategy capability index database for subsequent modules to access. A standardized structure can be shown in the following example: { "actions": ["use"], "purposes": ["analytics", "training"], "durationGranularity": "day", "obligations": ["log"], "prohibitions": ["redistribute"]}.

[0188] The strategy contract template management module is used to receive, parse, and maintain contract templates supported by different connectors (such as connector A and connector B). This module supports field structure extraction, parameter type constraint annotation, semantic tag mapping, and template classification of contract templates, facilitating strategy mapping and format generation by the subsequent contract rendering module. For example, this module will store template T submitted by data user connector A. A Contract template T submitted by data provider connector B B This module can perform semantic extraction and format annotation on each template field, establish field mapping relationships (such as "purpose" vs "useCase"), and build field compatibility tags (required, optional, value range, etc.).

[0189] The intent information acquisition module receives user input of natural language data usage requirements (i.e., the aforementioned policy intent information) and inputs this information into the structured policy generation module. The structured policy generation module uses a fine-tuned large language model to perform semantic parsing, intent recognition, and structured extraction of the policy intent information, outputting neutral structured policy information from the data space interconnection gateway as the basic policy expression for connector negotiation. The compatible policy generation module aligns the structured policy information generated by the data space interconnection gateway with the capability models of each connector, calculates the policy matching degree, identifies incompatible policy items, and uses the large language model to downgrade, rewrite, or approximate the policy expression, generating a set of policies acceptable to each connector (i.e., compatible policy information). The policy contract generation module combines the final neutral policy output by the policy negotiation module with the contract template of each connector, uses the large language model for field mapping and formatted rendering, and generates the final contract text that meets the syntactic structure requirements of each connector. The output supports structured contract formats such as JSON, XML, or a custom domain-specific language (DSL).

[0190] The strategy contract optimization and verification module performs strategy consistency verification, field validity verification, and conflict rule detection on the generated contract text. This ensures that the contract is semantically consistent with the negotiation results of the data space interconnection gateway, structurally conforms to template specifications, and logically avoids internal contradictions. The strategy contract distribution module distributes the generated and verified strategy contract files to each connector. It also supports contract signing, metadata binding (such as contract ID, signing time, and entity identifier), and contract status management, ensuring that each connector receives a unique and valid copy of the contract and enters the strategy execution process. For example, the generated strategy contract (Contract) for connector A... A The strategy contract for connector B will be sent to connector A. B The contract is sent to Connector B. The blockchain evidence storage module is used to perform hash digest calculations on the generated and sent contract files and their generation process, and to store the digest along with key metadata (connector identifier, timestamp, policy digest, etc.) on the blockchain for evidence storage, thereby achieving contract tamper-proofing, auditable generation process, and compliant traceability across data spaces.

[0191] The fine-tuning training and continuous learning module is used to maintain the training sample set and online incremental learning mechanism of the large language model of the data space interconnection gateway. By collecting historical negotiation data, contract generation samples, negotiation failure cases, etc., it performs fine-tuning or instruction reinforcement learning on the large language model periodically or in real time to optimize the three sub-tasks of policy intent parsing, semantic adjustment and contract generation.

[0192] like Figure 7 As shown, this embodiment illustrates a contract generation apparatus for a heterogeneous data space connector based on a large model, wherein different connectors in the heterogeneous connector are used to realize data exchange between data parties across data spaces. This apparatus can be used as the aforementioned data space interconnection gateway, and includes:

[0193] The intent information acquisition module 410 is used to acquire the policy intent information for the data party to use the data. The policy intent information is used to indicate the data exchange policy requirements of the data party during the data exchange process.

[0194] The structured policy generation module 420 is used to input policy intent information into a pre-trained large language model and output structured policy information through the large language model.

[0195] The compatibility strategy generation module 430 is used to generate compatibility strategy information that is adapted to each connector based on the strategy capability information and structured strategy information of each connector included in the heterogeneous connector, using a large language model. The strategy capability information of the connector is used to indicate the switching strategy supported by the connector.

[0196] The strategy contract generation module 440 is used to input the compatible strategy information and the contract templates corresponding to each connector into the large language model, and output the strategy contracts corresponding to each connector through the large language model, so that each connector can perform data exchange based on the corresponding strategy contracts.

[0197] In one possible implementation, the contract generation device based on a large-model data space heterogeneous connector includes modules other than... Figure 7 In addition to the modules shown, it may also include, for example: Figure 6 The other modules included in the data space interconnection gateway shown (such as the strategy contract optimization and verification module, the strategy contract issuance module, the blockchain notarization module, and the fine-tuning training and continuous learning module), i.e., the contract generation device based on the large model data space heterogeneous connector, can be found in the following references. Figure 6 Corresponding implementation examples.

[0198] In one exemplary embodiment, the compatibility policy generation module 430 is further configured to:

[0199] Based on the policy capability information and structured policy information of each connector, determine whether each connector supports the use of each policy item included in the structured policy information;

[0200] In response to the existence of target policy items that are not fully supported by the target connector, the target policy items are rewritten using a large language model to obtain alternative policy items, which are adapted to the policy capabilities of the target connector.

[0201] Based on the alternative policy items and the original policy items, the compatible policy information corresponding to the target connector is generated. The original policy items are the policy items in the structured policy information that are adapted to the policy capabilities of the target connector.

[0202] In one exemplary embodiment, the compatibility policy generation module 430 is further configured to:

[0203] The policy capability information of the target connector that does not fully support the target policy item, and the target policy item are input into the large language model, and the large language model generates alternative policy items.

[0204] In one exemplary embodiment, the strategy contract generation module 440 is further configured to:

[0205] For any connector, the compatibility strategy information and the corresponding contract template of the connector are input into the large language model. The large language model is used to map each strategy item in the compatibility strategy information to a contract strategy field that conforms to the contract template. Based on the contract strategy field, a strategy contract is generated.

[0206] In one exemplary embodiment, the apparatus further includes:

[0207] The strategy contract detection module is used to perform contract consistency verification on the strategy contract of any connector and obtain the verification result, and to perform contract conflict detection on the strategy contract and obtain the detection result; optionally, the strategy contract detection module belongs to the above-mentioned strategy contract optimization and verification module.

[0208] The strategy contract delivery module is used to deliver the strategy contract to the connector in response to the verification result indicating that the contract strategy fields included in the strategy contract are semantically consistent with the strategy items included in the compatible strategy information, and the detection result indicating that there are no conflicting contract items.

[0209] In one exemplary embodiment, the apparatus further includes:

[0210] The strategy capability parsing module is used to receive the strategy capability description information uploaded by each connector and parse the strategy capability description information to generate and store the strategy capability information corresponding to each connector. The information content of the strategy capability information conforms to the preset standard.

[0211] The strategy contract template management module is used to receive contract templates uploaded by each connector and to store contract templates.

[0212] In one exemplary embodiment, the apparatus further includes a fine-tuning training and continuous learning module for:

[0213] Obtain contract negotiation sample sets corresponding to different heterogeneous connectors. Each contract negotiation sample in the contract negotiation sample set includes the connector's strategy capability information, contract template, strategy intent sample, structured strategy sample, compatible strategy sample, and strategy contract sample.

[0214] For any contract negotiation sample, the strategy intent sample is input into the large language model, which then generates structured strategy prediction information.

[0215] Based on the policy capability information and structured policy prediction information of each connector, a large language model is used to generate compatible policy prediction information that is adapted to each connector.

[0216] Input the compatibility strategy prediction information and the contract templates corresponding to each connector into the large language model, and output the prediction strategy contracts corresponding to each connector through the large language model.

[0217] Based on the differences between structured policy prediction information and structured policy samples, the differences between compatible policy prediction information and compatible policy samples, and the differences between prediction policy contracts and policy contract samples, a large language model is trained to obtain the trained large language model.

[0218] The contract generation device based on a large-model data space heterogeneous connector in this disclosure corresponds to the contract generation method based on a large-model data space heterogeneous connector described above. Related content can be referenced interchangeably and will not be repeated here. The beneficial technical effects of the contract generation device based on a large-model data space heterogeneous connector in this disclosure can be found in the corresponding beneficial technical effects of the exemplary method section described above, and will not be repeated here.

[0219] In addition, this disclosure also provides an electronic device, including:

[0220] Memory, used to store computer programs;

[0221] A processor is configured to execute a computer program stored in the memory, wherein, when the computer program is executed, it implements the contract generation method for a data space heterogeneous connector based on a large model as described in any of the above embodiments of this disclosure.

[0222] Figure 8 This is a schematic diagram illustrating the structure of an application embodiment of the electronic device disclosed herein. Below, reference is made to… Figure 8 To describe an electronic device according to embodiments of this disclosure. For example... Figure 8 As shown, the electronic device includes one or more processors and memory.

[0223] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.

[0224] The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the contract generation method for a large-model data space heterogeneous connector based on the various embodiments of this disclosure described above, and / or other desired functions.

[0225] In one example, the electronic device may also include input devices and output devices, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0226] In addition, the input device may include, for example, a keyboard, a mouse, etc.

[0227] This output device can output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0228] Of course, for the sake of simplicity, Figure 8 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.

[0229] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the contract generation method for a large-model-based heterogeneous data space connector according to various embodiments of this disclosure as described in the foregoing portion of this specification.

[0230] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0231] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the contract generation method for a large-model-based heterogeneous data space connector according to various embodiments of this disclosure as described in the foregoing portion of this specification.

[0232] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0233] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.

[0234] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0235] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0236] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0237] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.

[0238] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions to this disclosure.

[0239] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0240] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A contract generation method based on a large-scale model's heterogeneous data space connector, characterized in that, In a heterogeneous connector, different connectors are used to enable data exchange between data parties across data spaces. These different connectors are deployed in different data spaces, and their policy instruction structures, policy control granularity, supported policy functions, and adopted policy contract templates differ. The method includes: Obtain policy intent information for the data party's use of data, the policy intent information being used to indicate the data exchange policy requirements corresponding to the data party during the data exchange process; The strategy intent information is input into a pre-trained large language model, and the large language model outputs structured strategy information. Based on the policy capability information of each connector included in the heterogeneous connector and the structured policy information, the large language model is used to generate compatible policy information that is adapted to each connector. The policy capability information of the connector is used to indicate the switching policy that the connector supports. The compatibility strategy information and the contract template corresponding to each connector are input into the large language model, and the large language model outputs the strategy contract corresponding to each connector, so that each connector can perform data exchange based on the corresponding strategy contract. The step of generating compatible policy information adapted to each connector using the large language model based on the policy capability information of each connector included in the heterogeneous connector and the structured policy information includes: Based on the policy capability information of each connector and the structured policy information, determine whether each connector supports the use of each policy item included in the structured policy information; In response to the presence of a target strategy item that the target connector does not fully support, the target strategy item is rewritten using the large language model to obtain an alternative strategy item, which is adapted to the strategy capabilities of the target connector. Based on the alternative strategy items and the original strategy items, compatible strategy information corresponding to the target connector is generated, wherein the original strategy items are strategy items in the structured strategy information that are adapted to the strategy capabilities of the target connector.

2. The method according to claim 1, characterized in that, The step of rewriting the target policy term using the large language model to obtain an alternative policy term includes: The policy capability information of the target connector that does not fully support the target policy item, and the target policy item are input into the large language model, and the alternative policy item is generated by the large language model.

3. The method according to claim 1 or 2, characterized in that, The step of inputting the compatibility strategy information and the contract templates corresponding to each connector into the large language model, and outputting the strategy contracts corresponding to each connector through the large language model, includes: For any connector, the compatibility strategy information and the contract template corresponding to the connector are input into the large language model, and the large language model is used to map each strategy item in the compatibility strategy information to a contract strategy field that conforms to the contract template; The strategy contract is generated based on the contract strategy fields.

4. The method according to claim 1 or 2, characterized in that, After the large language model outputs the strategy contracts corresponding to each connector, the method further includes: For any connector's strategy contract, perform a contract consistency check on the strategy contract to obtain the check result, and perform a contract conflict detection on the strategy contract to obtain the detection result; In response to the verification result indicating that the contract strategy fields included in the strategy contract are semantically consistent with the strategy items included in the compatible strategy information, and the detection result indicating that there are no conflicting contract items, the strategy contract is sent to the connector.

5. The method according to claim 1 or 2, characterized in that, The method further includes: Receive the policy capability description information and contract template uploaded by each of the connectors; The description information of each strategy capability is parsed to generate strategy capability information corresponding to each connector. The information content of the strategy capability information conforms to a preset standard. Store the strategy capability information and the contract template corresponding to each connector.

6. The method according to claim 1 or 2, characterized in that, The method further includes: Obtain contract negotiation sample sets corresponding to different heterogeneous connectors. Each contract negotiation sample in the contract negotiation sample set includes the connector's strategy capability information, contract template, strategy intent sample, structured strategy sample, compatible strategy sample, and strategy contract sample. For any contract negotiation sample, the strategy intent sample is input into the large language model, and the large language model generates structured strategy prediction information. Based on the policy capability information of each connector and the structured policy prediction information, the large language model is used to generate compatible policy prediction information that is adapted to each connector. The compatibility strategy prediction information and the contract templates corresponding to each connector are input into the large language model, and the prediction strategy contracts corresponding to each connector are output by the large language model. Based on the differences between the structured policy prediction information and the structured policy samples, the differences between the compatible policy prediction information and the compatible policy samples, and the differences between the prediction policy contract and the policy contract samples, the large language model is trained to obtain the trained large language model.

7. A contract generation device based on a large-model data space heterogeneous connector, characterized in that, In a heterogeneous connector, different connectors are used to enable data exchange between data parties in different data spaces. These different connectors are deployed in different data spaces and have different policy instruction structures, policy control granularity, supported policy functions, and adopted policy contract templates. The device includes: The intent information acquisition module is used to acquire the strategy intent information for the data party to use data, and the strategy intent information is used to indicate the data exchange strategy requirements of the data party during the data exchange process. The structured policy generation module is used to input the policy intent information into a pre-trained large language model and output structured policy information through the large language model. A compatibility strategy generation module is used to generate compatibility strategy information adapted to each of the connectors based on the strategy capability information of each connector included in the heterogeneous connector and the structured strategy information, using the large language model. The strategy capability information of the connector is used to indicate the switching strategy supported by the connector. The strategy contract generation module is used to input the compatibility strategy information and the contract templates corresponding to each connector into the large language model, and output the strategy contracts corresponding to each connector through the large language model, so that each connector can perform data exchange based on the corresponding strategy contracts. Specifically, the compatibility strategy generation module is used to determine whether each connector supports the use of each strategy item included in the structured strategy information based on the strategy capability information of each connector and the structured strategy information; in response to the existence of a target strategy item that the target connector does not fully support, the module rewrites the target strategy item using the large language model to obtain a replacement strategy item, which is adapted to the strategy capability of the target connector; and generates compatibility strategy information corresponding to the target connector based on the replacement strategy item and the original strategy item, wherein the original strategy item is the strategy item in the structured strategy information that is adapted to the strategy capability of the target connector.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the contract generation method for a data space heterogeneous connector based on a large model as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the contract generation method for a data space heterogeneous connector based on a large model as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Data connector and data space

    CN117688076A

  • Data space and data interaction method

    CN120371873A