Rule credible distribution and automatic deployment method and device based on block chain smart contract

By embedding blockchain smart contracts and Docker containers in deep learning models, the trusted distribution and automated deployment of model watermarks are achieved, solving the challenges of deep learning models in security and automated deployment, ensuring data security sharing and knowledge Property rights protection.

CN119249381APending Publication Date: 2025-01-03ZHEJIANG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411316865.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In actual application of deep learning models, there are problems of insufficient security and excessive reliance on manual intervention, especially in terms of privacy protection and multi-party rule isolation. Traditional methods are difficult to achieve cross-subject rules security sharing, and the deployment and configuration of the model are complex and difficult to Implement automation.

Method used

Adopt the rules trusted distribution and automated deployment method based on blockchain smart contracts, and use the conditional trigger mechanism of blockchain smart contracts to achieve strict user access control, and combine Docker containers to realize customized distribution of models and Deployment, from rule requirements to one-click automation of application.

Benefits of technology

Achieve safe and trustworthy distribution and automated deployment of rules, reduce manual intervention, prevent illegal replication and abuse, ensure safe sharing of data, and take into account model complexity and watermark concealment and robustness through multi-level cosine model watermark embedding technology. sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249381A_ABST
    Figure CN119249381A_ABST
Patent Text Reader

Abstract

The invention discloses a credible rule distribution and automatic deployment method and device based on a block chain smart contract. The method comprises the following steps: 1, a multi-level cosine model watermark embedding technology; 2, credible distribution automatic deployment based on the smart contract; and 3, verifying the watermark of the model. The invention provides a credible rule distribution and automatic deployment method based on a block chain smart contract. The core idea of the method is to design a model watermark for a transmission rule, so that the security and reliability of the rule are ensured, illegal copying and abuse are prevented, strict user access control is implemented through a condition triggering mechanism of a block chain smart contract, a data security sharing environment is created, and the security and reliability of the transmission rule are improved. And distribution of customized models and container deployment are realized, and one-key automation from rule requirements to applications is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the intersection of deep learning and blockchain technology, and specifically relates to a method and device for trusted distribution and automatic deployment of a deep learning model in a blockchain environment. Background Art

[0002] Model watermark embedding technology is a cutting-edge innovation in the field of digital copyright management. It provides strong protection for the intellectual property rights of models by cleverly embedding unique identifiers that are difficult to detect and remove in deep learning models. Existing model watermarking technologies include neural network architecture watermarking, parameter watermarking, activation function watermarking, input / output watermarking, and gradient watermarking, each with its own advantages and limitations. Neural network architecture watermarking embeds watermarks by adjusting the network structure. Although it is difficult to remove, it requires retraining the model, which may affect performance and increase deployment complexity. Parameter watermarks are directly embedded in the model weights, which is simple and easy to implement and has little impact on performance, but may be lost during compression or quantization, and are also easy to be discovered and removed. Activation function watermarks are embedded by modifying the activation function, which is highly hidden, but may affect the model's learning ability and generalization performance. Input / output watermarks are embedded at the data level without changing the model structure, but may be destroyed during model propagation and are complex to detect. Gradient watermarks use gradient information embedded during training, which has strong stability, but is affected by training data and algorithms, and is relatively complex to implement.

[0003] The rapid development of artificial intelligence technology has promoted the widespread application of deep learning in many fields. However, in practical applications, most models involve issues such as privacy and difficulty in isolating rules between multiple parties. Traditional methods cannot achieve cross-subject rule security sharing, and the operating environment of many models still needs to rely on professional technicians for detailed deployment and configuration. In particular, when it comes to customized model architecture or the need to meet strict security and compliance standards, it is usually beyond the capabilities of current automated tools. Summary of the invention

[0004] The present invention aims to solve the problems of insufficient security and over-reliance on human intervention in the current distribution and deployment of deep learning models, and proposes a trusted distribution and automated deployment method and device for rules based on blockchain smart contracts. The core idea of ​​the present invention is to design a model watermark for the transmitted rules to ensure the security and reliability of the rules, prevent illegal copying and abuse, and implement strict user access control through the conditional trigger mechanism of blockchain smart contracts, create an environment for secure data sharing, and realize the distribution and container deployment of customized models, from rule requirements to application one-click automation.

[0005] The method of the present invention is achieved through the following techniques.

[0006] The first aspect of the present invention relates to a method for trusted distribution and automated deployment of rules based on blockchain smart contracts, comprising the following steps:

[0007] Step 1: The rule user transmits the original training data to the rule provider through the blockchain, and the rule provider builds a training knowledge rule model based on expert experience and knowledge;

[0008] Step 2: When the rule user uses step 1 to train the model, the rule user selects an injection layer to embed the watermark into the model through the designed combined watermark information function;

[0009] Step 3: Develop blockchain smart contracts that implement functions such as trusted rule distribution, automatic deployment and verification;

[0010] Step 4: Build a Docker environment for automatic rule execution;

[0011] Step 5: The rule provider builds a model library and links different models obtained through training in steps 1 and 2 and stores them in the blockchain. The rule user triggers the specific conditions of the smart contract in step 3 to achieve automatic distribution through strict identity control and authority management, and implements container deployment and rule application through step 4.

[0012] Step 6: The rule user implements a cumulative reward incentive mechanism based on the contributions of all parties;

[0013] Step 7: Extract and verify the watermark to verify whether the model provided by the model provider has been illegally copied or abused.

[0014] Preferably, in step 1, the rule provider normalizes the original data provided by the rule user through multimodal processing, performs feature mining and analysis, correctly attributes the key features behind the data, and trains a knowledge rule model that meets the user's requirements.

[0015] Preferably, in step 2, the combined watermark information embedding model process is as follows:

[0016] In the process of training model M, the combined watermark key K is designed as:

[0017] K=(C * ,w,v,d) (1)

[0018] Among them C * (C * ∈{c1,c2,…,c N}) represents a target class in the set of categories that model M may output randomly or based on a specific strategy, w (w∈R, R is a real number set) is the angular frequency that ensures the periodicity of the watermark signal, v (v∈R n , R nis an n-dimensional real space) represents a random unit projection vector, d(d∈{d1,d2,…,d N} represents the depth parameter of the model. The cosine sequence S(x) is constructed according to w and v in the key K. The construction formula is:

[0019]

[0020] where p(x) = v T x, represents the projection length of the input data x in the one-dimensional direction of the vector v, represents a random phase shift. For the selected embedding layer d i , the injection formula is:

[0021]

[0022] Where ε is a small constant that controls the watermark strength, q i Represents model d i The original output of the layer, i represents q i The number or index of Represents model d i The layer is watermarked and then output. The model M is obtained by further training.

[0023] Preferably, in step 5, the trusted distribution automatic deployment process based on smart contracts is:

[0024] The rule provider can obtain different models M through the original data, establish a model rule library and the corresponding link URL. Use a secure random number generator to create a strong key pair (public key and private key), establish a strict identity and authority management mechanism to distribute the public key to the rule user, and store the private key in a special secure location on the blockchain. Use the private key to encrypt the model and link, generate an encrypted fingerprint, trigger the specific conditions of the smart contract in step 3, and store the encrypted fingerprint in the blockchain. The rule user issues a rule request through the smart contract (the smart contract is responsible for verifying the legitimacy of the request, including but not limited to identity authentication, key verification, authorization confirmation, etc.). After verification, access the link to pull the encrypted rule library. Furthermore, the smart contract uses the blockchain to store the private key to decrypt the rule library, and automatically deploys the Docker container rule environment through the script, thereby realizing the rapid and reliable distribution, deployment, and application of the model. In this step, the private key is not disclosed or issued, and the specific content of the rule is kept confidential to all users.

[0025] Preferably, in step 7, the watermark extraction and verification process is:

[0026] From the model M obtained in step 1, iThe output features are extracted by the layer, and the short-time Fourier transform STFT is used to perform time-frequency analysis on the extracted features. The value of the i-th sample point obtained after the analysis is Calculate its matching degree with the expected cosine signal. The smaller the matching degree, the better the sample point. The closer it is to the expected cosine signal, the more obvious the characteristics of the watermark signal are. The calculation formula is:

[0027]

[0028] Where A is the amplitude of the expected cosine signal, t i is a time index, representing samples at different time points in time-frequency analysis. Specifically, the signal is i and frequency point f d The amplitude on the y-axis is , w represents the angular frequency, is the phase shift, σ is the sample standard deviation, indicating The dispersion of the values. Further set the threshold τ (the selection of τ is based on the experimental results). If Cos i If <τ holds true for enough samples (which can be set to 95%), the watermark can be considered to be detected or embedded successfully.

[0029] For the two suspected models M1 and M2, based on intellectual property protection to prevent illegal copying or abuse, i The output feature vectors Q1 and Q2 are extracted from the layer, and the time-frequency domain representation F1(t,f) and F2(t,f) are obtained from Q1 and Q2 using short-time Fourier transform STFT. The instantaneous power P1(t,f) and P2(t,f) are calculated as follows:

[0030] P1(t,f)=||F1(t,f)|| 2 (7)

[0031] P2(t,f)=||F2(t,f)|| 2 (8) where ||F1(t,f)|| 2 、||F2(t,f)|| 2 Represent the power of F1 and F2 at point (t,f) respectively. The power spectrum density PSD is obtained by time averaging each frequency f:

[0032]

[0033] Where t0 is the starting point of the time window, T is the time window, if T is a discrete time series {t n}, then

[0034] In formula 9, the integral needs to be changed to summation. Normalize the power spectral density PSD within the same frequency range:

[0035]

[0036] Calculate the similarity CoSimilarity:

[0037]

[0038] If PSD is calculated at discrete frequency points, then the integrals of formulas 11, 12, and 13 need to be changed to sums. Furthermore, a threshold ρ is set. If CoSimilarity>ρ, it can be considered that the two PSDs are similar to some extent, or the watermarks of the two models are consistent, that is, one of M1 and M2 is the intellectual property infringer.

[0039] The second aspect of the present invention relates to a trusted distribution and automated deployment device for rules based on blockchain smart contracts, comprising a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the trusted distribution and automated deployment method for rules based on blockchain smart contracts of the present invention.

[0040] The third aspect of the present invention relates to a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the method for trusted distribution and automated deployment of rules based on blockchain smart contracts of the present invention.

[0041] The multi-level cosine model watermark embedding technology proposed in the present invention takes into account the complexity and diversity of the model, the concealment and robustness of the watermark through a unique hierarchical embedding method, and is easy to integrate and detect.

[0042] The trusted distribution and deployment method proposed in the present invention effectively combines blockchain technology, smart contract condition trigger mechanism and model watermark, implements strict user access control, creates an environment for secure data sharing, and realizes the distribution and container deployment of customized models, with one-click automation from rule requirements to application.

[0043] The present invention has the following advantages: First, it solves the problems of privacy involved in rules, difficulty in isolating multi-party rules, and inability of traditional methods to achieve cross-subject rule security sharing. Through blockchain technology and sophisticated permission settings, it can effectively isolate the rule domains of different subjects and ensure the safe and reliable distribution of rules. In addition, through smart contracts, it can realize the automatic deployment of rules and reduce the dependence on manual intervention. Furthermore, by injecting model watermarks, it can prevent the rules from being illegally copied and abused, thereby protecting its intellectual property rights. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0045] The following is combined with Figure 1 , further illustrating the technical solution of the present invention.

[0046] Example 1

[0047] A social risk prevention and control rule distribution and deployment method using a rule trusted distribution and automated deployment method based on a blockchain smart contract of the present invention comprises the following steps:

[0048] In step 1, in the social risk prevention and control scenario, the rule user transmits a large amount of text, voice, image, video and other data to the rule provider through the blockchain. The rule provider performs unified standardization through multimodal data processing, conducts feature mining and analysis, correctly attributes the key features behind social threat behaviors, and constructs knowledge rules based on the experience and knowledge of experts. That is, based on traditional machine learning algorithms and deep neural networks, on large-scale, high-dimensional, and complex social risk data, the trained learner is used to learn feature rules and neural rules, and obtain a social risk prevention and control model based on case data.

[0049] In step 2, during the training of model M, the combined watermark key K is designed:

[0050] In the process of training model M, the combined watermark key K is designed as:

[0051] K=(C * ,w,v,d) (1)

[0052] Among them C * (C * ∈{c1,c2,…,c N}) represents a target class in the set of categories that model M may output randomly or based on a specific strategy, w (w∈R, R is a real number set) is the angular frequency that ensures the periodicity of the watermark signal, v (v∈R n , R n is an n-dimensional real space) represents a random unit projection vector, d(d∈{d1,d2,…,d N} represents the depth parameter of the model. The cosine sequence S(x) is constructed according to w and v in the key K. The construction formula is:

[0053]

[0054] where p(x) = v T x, represents the projection length of the input data x in the one-dimensional direction of the vector v, represents a random phase shift. For the selected embedding layer d i , the watermark injection formula is:

[0055]

[0056] Where ε is a small constant that controls the watermark strength, q i Represents model d i The original output of the layer, i represents q i The number or index of Represents model d i The layer is watermarked and then output. The model M is obtained by further training.

[0057] In step 3, the smart contract development includes but is not limited to the following key processes:

[0058] First, define the logic and rules of the contract; second, convert these rules into smart contract code and conduct rigorous testing to ensure the functionality and security of the contract; finally, deploy the smart contract to the blockchain network so that it can be automatically executed when specific trigger conditions are met. In addition, it may also include the maintenance and upgrade of smart contracts to adapt to the ever-changing contract requirements and environment. In the social risk prevention and control scenario, choose to use Solidity to write smart contracts, realize functions such as trusted distribution of rules, automatic deployment and verification, and deploy them on the Hyperchain blockchain platform.

[0059] In step 4, the Docker build automatically executed by the build includes the following processes:

[0060] First, design and implement a basic image that includes the core libraries and dependencies required for deep learning; second, dynamically configure the deep learning framework and install the corresponding software packages and tools; implement one-click construction and deployment of containers to ensure that deep learning models can be quickly started and run according to rule parameters. In the social risk prevention and control scenario, you can create a container deployment environment Docker that includes frameworks such as PyTorch and TensorFlow based on these steps.

[0061] In step 5, the trusted distribution automatic deployment process is:

[0062] The rule provider can obtain different models M (anti-fraud neural rules, anti-fraud graph rules, etc.) through steps 1 and 2 with different social risk prevention and control data (such as anti-fraud data), and establish a model rule library and corresponding link URL. Use a secure random number generator to create a strong key pair (public key and private key), establish a strict identity and authority control mechanism to distribute the public key to the user, and store the private key in a special secure location on the blockchain. Use the private key to encrypt the model and link, generate an encrypted fingerprint, trigger the specific conditions of the smart contract in step 3, and store the encrypted fingerprint in the blockchain. The rule user issues a rule request through the smart contract (the smart contract is responsible for verifying the legitimacy of the request, including but not limited to identity authentication, key verification, and authorization confirmation). After verification, access the link to pull the encrypted rule library. Furthermore, the smart contract uses the blockchain to store the private key to decrypt the rule library, and automatically deploys it using the Docker container rule environment through the step 4 script, thereby realizing the rapid and reliable distribution, deployment, and application of the model (the anti-fraud department uses the deployment of anti-fraud rules for monitoring and early warning). In this step, the private key is not disclosed or issued, and the specific content of the rule is kept confidential to all users.

[0063] In step 6, the cumulative reward incentive mechanism is specifically as follows:

[0064] After obtaining the model M, the social prevention and control rule user u (u∈{u1,u2,…}, where u1 represents the data provider and the rule user) needs to give a certain contribution incentive to the rule provider p. In addition to u1, other rule users u (u∈{u2,…,}) need to give a certain contribution incentive to u1. The reward formula is:

[0065]

[0066] Among them C f is the incentive obtained by u1, C p is the incentive received by p, and the two are cumulative. U1 is the contribution feedback given by u1 to p, and U k is the kth data user u k Give feedback to the contribution of p and u1. Sin(log(U k )) is a -log(U k ) to log(U k ), It's U k The exponential function of is the combined factor, and the basic allocation Combined to ensure a C f The value of

[0067] In step 7, the watermark extraction and verification process is:

[0068] The model M obtained from steps 1 and 2 is i The output features are extracted by the layer, and the short-time Fourier transform STFT is used to perform time-frequency analysis on the extracted features. The value of the i-th sample point obtained after the analysis is Calculate its matching degree with the expected cosine signal. The smaller the matching degree, the better the sample point. The closer it is to the expected cosine signal, the more obvious the characteristics of the watermark signal are. The calculation formula is:

[0069]

[0070] Where A is the amplitude of the expected cosine signal, t i is a time index, representing samples at different time points in time-frequency analysis. Specifically, the signal is i and frequency point f d The amplitude on the y-axis is , w represents the angular frequency, is the phase shift, σ is the sample standard deviation, indicating The dispersion of the values. Further set the threshold τ (the selection of τ is based on the experimental results). If Cos i If <τ holds true for enough samples (which can be set to 95%), the watermark can be considered to be detected or embedded successfully.

[0071] For the two suspected models M1 and M2, based on intellectual property protection to prevent illegal copying or abuse, i The output feature vectors Q1 and Q2 are extracted from the layer, and the time-frequency domain representation F1(t,f) and F2(t,f) are obtained from Q1 and Q2 using short-time Fourier transform STFT. The instantaneous power P1(t,f) and P2(t,f) are calculated as follows:

[0072] P1(t,f)=||F1(t,f)|| 2 (7)

[0073] P2(t,f)=||F2(t,f)|| 2 (8)

[0074] where ||F1(t,f)|| 2 、||F2(t,f)|| 2 Represent the power of F1 and F2 at point (t,f) respectively. The power spectrum density PSD is obtained by time averaging each frequency f:

[0075]

[0076] Where t0 is the starting point of the time window, T is the time window, if T is a discrete time series {tn}, then the integrals of formulas 9 and 10 need to be changed to summation. Normalize the power spectral density PSD within the same frequency range:

[0077]

[0078] Calculate the similarity CoSimilarity:

[0079]

[0080] If the PSD is calculated at discrete frequency points, then the integrals of formulas 11, 12, and 13 need to be changed to sums. Furthermore, a threshold ρ is set. If CoSimilarity>ρ, it can be considered that the two PSDs are similar to some extent, or the watermarks of the two models are consistent, that is, one of M1 and M2 is an intellectual property infringer. In the social risk prevention and control scenario, ρ=0.9 is set. If CoSimilarity>ρ, M1 is the rule provider model and M2 is the suspected party model, it can be determined that M2 is illegally copied or abused.

[0081] The core idea of ​​this invention is to design a model watermark for the transmitted rules to ensure the security and reliability of the rules, prevent illegal copying and abuse, and implement strict user access control through the conditional trigger mechanism of blockchain smart contracts, create an environment for secure data sharing, and realize the distribution and container deployment of customized models, with one-click automation from rule requirements to application.

[0082] Through the above steps, watermark injection, trusted distribution and automatic deployment of the model are realized on the blockchain through smart contracts and Docker containers.

[0083] Example 2

[0084] The present embodiment relates to a trusted distribution and automated deployment device for rules based on blockchain smart contracts, comprising a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the trusted distribution and automated deployment method for rules based on blockchain smart contracts of Example 1.

[0085] Example 3

[0086] This embodiment relates to a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the method for trusted distribution and automated deployment of rules based on blockchain smart contracts of Example 1 is implemented.

[0087] The contents described in the embodiments of this specification are merely an enumeration of implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms described in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.

Claims

1. A trusted distribution and automated deployment method of rules based on blockchain smart contracts, including the following steps: Step 1: The rule user transmits the original training data to the rule provider through the blockchain, and the rule provider builds a training knowledge rule model based on expert experience and knowledge; Step 2: When the rule user uses step 1 to train the model, the rule user selects an injection layer to embed the watermark into the model through the designed combined watermark information function; Step 3: Develop blockchain smart contracts that implement functions such as trusted rule distribution, automatic deployment and verification; Step 4: Build a Docker environment for automatic rule execution; Step 5: The rule provider builds a model library and links different models obtained through training in steps 1 and 2 and stores them in the blockchain. The rule user triggers the specific conditions of the smart contract in step 3 to achieve automatic distribution through strict identity control and authority management, and implements container deployment and rule application through step 4. Step 6: The rule user implements a cumulative reward incentive mechanism based on the contributions of all parties; Step 7: Extract and verify the watermark to verify whether the model provided by the model provider has been illegally copied or abused.

2. The rule-trusted distribution and automated deployment method based on blockchain smart contracts according to claim 1 is characterized in that: In step 1, the rule provider standardizes the original data of the user through multimodal processing, performs feature mining and analysis, correctly attributes the key features behind the data, and trains a knowledge rule model that meets the user's requirements.

3. The rule-trusted distribution and automated deployment method based on blockchain smart contracts according to claim 1 is characterized in that: In step 2, the combined watermark information embedding model process is as follows: K=(C * ,w,v,d) (1) Where K is the combined watermark key, C * (C * ∈{c1, c2, ..., c N }) represents a target class in the set of categories that model M may output randomly or based on a specific strategy, w (w∈R, R is a real number set) is the angular frequency that ensures the periodicity of the watermark signal, v (v∈R n , R n is an n-dimensional real space) represents a random unit projection vector, d(d∈{d1, d2, ..., d N } represents the depth parameter of the model; the cosine sequence S(x) is constructed according to w and v in the key K, and the construction formula is: where p(x) = v T x, represents the projection length of the input data x in the one-dimensional direction of the vector v, represents a random phase shift; for the selected embedding layer d i , the injection formula is: Where ε is a small constant that controls the watermark strength, q i Represents model d i The original output of the layer, i represents q i The number or index of Represents model d i The layer is output after watermarking.

4. The rule-trusted distribution and automated deployment method based on blockchain smart contracts according to claim 1 is characterized in that: In step 3, the smart contract function is used for automatic uploading and downloading of data and trusted distribution, automatic deployment and verification of rules.

5. The rule-trusted distribution and automated deployment method based on blockchain smart contracts according to claim 1 is characterized in that: In step 4, the Docker is a container deployment environment that implements rule-based automated deployment and application, such as frameworks including PyTorch and TensorFlow.

6. The rule-trusted distribution and automated deployment method based on blockchain smart contracts according to claim 1 is characterized in that: In step 5, the trusted distribution automatic deployment process is: The rule provider can obtain different models M (anti-fraud neural rules, anti-fraud graph rules, etc.) through steps 1 and 2 with different social risk prevention and control data (such as anti-fraud data), and establish a model rule library and corresponding link URL; use a secure random number generator to create a strong key pair (public key and private key), establish a strict identity and authority management mechanism to distribute the public key to the user, and store the private key in a special secure location on the blockchain; The model and link are encrypted using the private key to generate an encrypted fingerprint, triggering the specific conditions of the smart contract in step 3, and storing the encrypted fingerprint in the blockchain; the rule user issues a rule request through the smart contract (the smart contract is responsible for verifying the legitimacy of the request, including but not limited to identity authentication, key verification, and authorization confirmation), and after verification, accesses the link to pull the encrypted rule library; further, the smart contract uses the blockchain to store the private key to decrypt the rule library, and automatically deploys it using the Docker container rule environment through the step 4 script, thereby achieving rapid and reliable distribution, deployment, and application of the model (the anti-fraud department uses the deployment of anti-fraud rules for monitoring and early warning); in this step, the private key is not disclosed or issued, and the specific content of the rule is kept confidential to all users.

7. The rule-trusted distribution and automated deployment method based on blockchain smart contracts according to claim 1 is characterized in that: In step 6, the cumulative reward incentive mechanism is: Among them C f is the incentive obtained by rule user u1, C p is the incentive obtained by the rule provider p. The two are cumulative. U1 is the contribution feedback given by u1 to p. k is the kth data user u k Give p, u1 contribution feedback; Sin(log(U k )) is a -log(U k ) to log(U k ), It's U k The exponential function of is the combined factor, and the basic allocation Combined to ensure a C f The value of 8. The method for trusted distribution and automated deployment of rules based on blockchain smart contracts according to claim 1 is characterized in that: In step 7, the watermark extraction and verification process is: Where A is the amplitude of the expected cosine signal, t i is a time index, representing samples at different time points in time-frequency analysis. Specifically, the signal is i and frequency point f d The amplitude on the y-axis is , w represents the angular frequency, is the phase shift, σ is the sample standard deviation, indicating The dispersion of the value; further set the threshold τ, if Cos i <τ holds true for 95% of the samples, which means that the watermark is detected or embedded successfully; For the two suspected models M1 and M2, based on intellectual property protection to prevent illegal copying or abuse, i The output feature vectors Q1 and Q2 are extracted from the layer, and the time-frequency domain representation F1(t, f) and F2(t, f) are obtained from Q1 and Q2 using short-time Fourier transform STFT. The instantaneous power P1(t, f) and P2(t, f) are calculated as follows: P1(t,f)=||F1(t,f)|| 2 (7) P2(t,f)=||F2(t,f)|| 2 (8) where ||F1(t,f)|| 2 、||F2(t,f)|| 2 Respectively represent the power of F1 and F2 at point (t, f); the power spectrum density PSD is obtained by time averaging each frequency f: Where t0 is the starting point of the time window, T is the time window, and the power spectral density PSD is normalized to the same frequency range: CoSimilarity: If the PSD is calculated at discrete frequency points, then the integral is replaced by the sum; further, a threshold ρ is set. If CoSimilarity>ρ, it is considered that the two PSDs are similar to some extent, or the watermarks of the two models are consistent, that is, one of M1 and M2 is the intellectual property infringer.

9. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, the method for trusted distribution and automated deployment of rules based on blockchain smart contracts as described in any one of claims 1 to 8 is implemented.

10. A rule-trusted distribution and automated deployment device based on blockchain smart contracts, characterized in that: It includes a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, it is used to implement the rule trusted distribution and automatic deployment method based on blockchain smart contracts as described in any one of claims 1-2.

Citation Information

Cited By

  • Model fingerprint embedding and model copyright authentication method, device and medium

    CN119961890A