Blockchain-based manufacturing value chain large model training optimization method and device

By using blockchain structure in distributed networks to train the manufacturing value chain model, the credibility and reliability problems caused by central server dependence in centralized networks are solved, and higher model training credibility is achieved Sex and reliability.

CN118690394BActive Publication Date: 2024-12-13SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411162189.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-13
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

In the prior art, centralized network structures have high dependence on central servers in the large-scale model training of manufacturing value chains, resulting in the entire network being paralyzed once the network has problems, model training fails, and lacks credibility and reliability.

Method used

Using blockchain structure to train the manufacturing value chain model in a distributed network, model training is carried out through local databases, new blocks are built and models are recorded, and target update information is generated to broadcast it to the distributed network, so that other nodes are allowed to be made Update its local blockchain to avoid dependence on central servers.

Benefits of technology

It improves the credibility and reliability of large-scale model training in the manufacturing industry value chain, avoids network paralysis caused by central server failure, and ensures the normal operation of distributed networks and data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690394B_ABST
    Figure CN118690394B_ABST
Patent Text Reader

Abstract

The present application relates to a method and device for training and optimizing a large model of manufacturing value chain based on blockchain. The method is applied to a target node in a distributed network, and the method includes: when a training instruction is received, a large model of manufacturing value chain is trained using a local database to obtain a trained large model of manufacturing value chain; a new block is constructed in the local blockchain, and the trained large model of manufacturing value chain is recorded in the new block; target update information is generated according to the new block, and the target update information is broadcast to the distributed network, so that other nodes in the distributed network update their own local blockchain according to the target update information. The solution provided by the present application can avoid dependence on a central server and greatly improve the credibility and reliability of the training process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a method and device for training and optimizing a large model of a manufacturing value chain based on blockchain. Background Art

[0002] The manufacturing value chain is a conceptual framework used to describe and analyze how the various steps in the production and delivery of products or services are interconnected and work together to create value.

[0003] The manufacturing value chain big model is a big model trained for a variety of manufacturing value chain related issues. The data sources and fields involved in this big model are relatively wide, and the workload of model training is huge, so it requires cooperation among multiple companies to improve training efficiency.

[0004] In related technologies, a centralized network structure is used to train models among multiple partner companies. This places high credibility and reliability requirements on the central server. However, once a problem occurs in the central server, the entire network will be paralyzed, resulting in model training failure. Summary of the invention

[0005] In order to solve or partially solve the problems existing in the related technologies, the present application provides a blockchain-based manufacturing value chain large model training optimization method and device, which can avoid dependence on the central server and greatly improve the credibility and reliability of the training process.

[0006] The first aspect of the present application provides a manufacturing value chain large model training optimization method based on blockchain, which is applied to a target node in a distributed network, and the method includes:

[0007] When a training instruction is received, the manufacturing value chain model is trained using a local database to obtain a trained manufacturing value chain model;

[0008] Constructing a new block in the local blockchain, and recording the trained manufacturing value chain model into the new block;

[0009] Generate target update information according to the new block, and broadcast the target update information to the distributed network, so that other nodes in the distributed network update their own local blockchains according to the target update information.

[0010] The second aspect of the present application provides a manufacturing value chain large model training optimization device based on blockchain, which is applied to a target node in a distributed network, and the device includes:

[0011] The model training module is used to train the manufacturing value chain model using the local database when receiving the training instruction, so as to obtain the trained manufacturing value chain model;

[0012] A block construction module, used to construct a new block in the local blockchain and record the trained manufacturing value chain model into the new block;

[0013] A target update information broadcast module is used to generate target update information according to the new block, and broadcast the target update information to the distributed network, so that other nodes in the distributed network update their own local blockchains according to the target update information.

[0014] The technical solution provided by this application may have the following beneficial effects:

[0015] The solution provided by the present application is applied to the target node in the distributed network. When receiving the training instruction, the local database is used to train the large model of the manufacturing value chain to obtain the trained large model of the manufacturing value chain; a new block is constructed in the local blockchain, and the trained large model of the manufacturing value chain is recorded in the new block; target update information is generated according to the new block, and the target update information is broadcast to the distributed network, so that other nodes in the distributed network update their own local blockchain according to the target update information. The present application adopts a blockchain structure and uses a distributed network to complete the training optimization of the large model of the manufacturing value chain, thereby avoiding dependence on the central server and greatly improving the credibility and reliability of the training process.

[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail the exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.

[0018] Figure 1 It is a flowchart of a large-scale model training optimization method for manufacturing value chain based on blockchain shown in an embodiment of the present application;

[0019] Figure 2 It is another flowchart of the blockchain-based manufacturing value chain large model training optimization method shown in the embodiment of the present application;

[0020] Figure 3 It is a schematic diagram of the blockchain structure of the manufacturing value chain large model training shown in the embodiment of the present application;

[0021] Figure 4 is a schematic diagram of a distributed network structure shown in an embodiment of the present application;

[0022] Figure 5 It is a schematic diagram of the modeling process shown in the embodiment of the present application;

[0023] Figure 6 It is a schematic diagram of the training optimization process of the large model of the manufacturing value chain shown in the embodiment of the present application;

[0024] Figure 7 It is a structural schematic diagram of a large-scale model training and optimization device for manufacturing value chain based on blockchain shown in an embodiment of the present application;

[0025] Figure 8 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0027] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0028] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0029] In related technologies, a centralized network structure is used to train models among multiple partner companies. This places high credibility and reliability requirements on the central server. However, once a problem occurs in the central server, the entire network will be paralyzed, resulting in model training failure.

[0030] In response to the above problems, an embodiment of the present application provides a blockchain-based manufacturing value chain large model training optimization method. By adopting a blockchain structure and utilizing a distributed network to complete the training optimization of the manufacturing value chain large model, it can avoid dependence on a central server and greatly improve the credibility and reliability of the training process.

[0031] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0032] Figure 1 It is a flow chart of the blockchain-based manufacturing value chain large model training optimization method shown in the embodiment of the present application.

[0033] See also Figure 1 The blockchain-based manufacturing value chain large model training optimization method of the present application can be applied to target nodes in a distributed network. The method may include:

[0034] S110, when a training instruction is received, the manufacturing value chain big model is trained using a local database to obtain a trained manufacturing value chain big model.

[0035] Blockchain is a decentralized database that uses cryptography to divide data into multiple blocks and connect them in the form of a chain. Blockchain can be used to record, track, and trace activities on the blockchain, which is very suitable for the version iteration process of model training. At the same time, the decentralized network also ensures the reliability of model training.

[0036] The network structure of the blockchain is a distributed network, which may include multiple nodes, each of which may correspond to a computing device of a business party, and the computing device may include a client and a server, etc. The business party may refer to a cooperative company that participates in the training and optimization process of the large model of the manufacturing value chain. For example, assuming that Company A, Company B, Company C, Company D, and Company E all participate in the training and optimization process of the large model of the manufacturing value chain, each company may represent a node.

[0037] In an embodiment of the present application, it can be applied to a target node in a distributed network, wherein the target node can refer to any node in the distributed network. When a node in the distributed network serves as a target node, the remaining nodes in the distributed network serve as other nodes relative to the target node. For example, if Company A represents the target node, then Company B, Company C, Company D and Company E represent other nodes respectively.

[0038] When receiving a training instruction from a business party, the target node can respond to the training instruction and train the manufacturing value chain model locally. Specifically, each business party's computing device is configured with its own local database, so the target node can use its own local database to train the manufacturing value chain model, thereby obtaining a trained manufacturing value chain model.

[0039] S120 builds a new block in the local blockchain and records the trained manufacturing value chain model into the new block.

[0040] Each business party's computing device is also configured with its own local blockchain. Each local blockchain is a structure formed by multiple blocks in a chain. Each block can be used to record the large manufacturing value chain model after each training. Therefore, the target node can build a new block in its own local blockchain so that the large manufacturing value chain model after this training can be recorded in the new block.

[0041] S130, generating target update information according to the new block, and broadcasting the target update information to the distributed network, so that other nodes in the distributed network update their own local blockchains according to the target update information.

[0042] The blockchain training process uses a distributed network structure, which will not cause the entire network to be paralyzed due to problems with the central server, and has good reliability. Therefore, after the target node updates its own local blockchain, it can broadcast the update information to the entire distributed network. Specifically, the new block has recorded the large model of the manufacturing value chain after this training, so the target node can generate target update information based on the new block, and then broadcast the target update information to the entire distributed network. After receiving the target update information, other nodes in the distributed network can update their own local blockchains based on the target update information, so that the structure of the local blockchain of each node in the distributed network and the information recorded are the same, thereby ensuring the reliability of the training of the large model of the manufacturing value chain.

[0043] The embodiment of the present application can set a preset stop iteration condition for the manufacturing value chain big model in advance, wherein the preset stop iteration condition can be a preset number of iterations. The target node can determine whether the training of the manufacturing value chain big model has reached the preset number of iterations after each update of its own local blockchain. When the preset number of iterations is reached, it can be determined that the iterative training of the manufacturing value chain big model is completed.

[0044] It can be seen that compared with the related art that uses a centralized network structure to train the large model of the manufacturing value chain, it is very dependent on the central server. However, once a problem occurs in the central server, the entire network will be paralyzed. The embodiment of the present application constructs a blockchain model training structure and uses a distributed network to train the large model of the manufacturing value chain. It can avoid dependence on the central server and will not cause the entire network to be paralyzed due to problems with the central server. For example, even if a node in the distributed network fails, the embodiment of the present application can still rely on the structure of the local blockchain of other nodes and the information recorded therein to determine the structure of the local blockchain of the failed node and the information recorded therein, thereby ensuring the normal operation of the distributed network, greatly improving the credibility and reliability of the training process, and being able to well complete the training optimization of the large model of the manufacturing value chain.

[0045] As can be seen from this example, the solution provided by this application is applied to the target node in the distributed network. When receiving the training instruction, the local database is used to train the large model of the manufacturing value chain to obtain the trained large model of the manufacturing value chain; a new block is constructed in the local blockchain, and the trained large model of the manufacturing value chain is recorded in the new block; target update information is generated according to the new block, and the target update information is broadcast to the distributed network, so that other nodes in the distributed network update their own local blockchain according to the target update information. This application adopts a blockchain structure and uses a distributed network to complete the training optimization of the large model of the manufacturing value chain, thereby avoiding dependence on the central server and greatly improving the credibility and reliability of the training process.

[0046] Figure 2 It is another flow chart of the blockchain-based manufacturing value chain large model training optimization method shown in the embodiment of the present application.

[0047] See also Figure 2 The blockchain-based manufacturing value chain large model training optimization method of the present application can be applied to target nodes in a distributed network. The method may include:

[0048] S210, when a training instruction is received, the manufacturing value chain large model is trained using a local database to obtain second model parameters; wherein the second model parameters are model parameters of the manufacturing value chain large model after this training.

[0049] The network structure of the blockchain is a distributed network, which may include multiple nodes, each of which may correspond to a computing device of a business party, and the computing device may include a client and a server, etc. The business party may refer to a cooperative company that participates in the training and optimization process of the large model of the manufacturing value chain. For example, assuming that Company A, Company B, Company C, Company D, and Company E all participate in the training and optimization process of the large model of the manufacturing value chain, each company may represent a node.

[0050] In an embodiment of the present application, it can be applied to a target node in a distributed network, wherein the target node can refer to any node in the distributed network. When a node in the distributed network serves as a target node, the remaining nodes in the distributed network serve as other nodes relative to the target node. For example, if Company B represents the target node, then Company A, Company C, Company D and Company E represent other nodes respectively.

[0051] When receiving a training instruction from the business party, the target node can respond to the training instruction and train the manufacturing value chain model locally. Specifically, each business party's computing device is configured with its own local database, so the target node can use its own local database to train the manufacturing value chain model, thereby obtaining the model parameters of the manufacturing value chain model after this training. For the sake of distinction, the model parameters of the manufacturing value chain model after this training can be defined as the second model parameter B.

[0052] S220, encrypt the second model parameter using a homomorphic encryption function to obtain a second encrypted model parameter.

[0053] In a distributed network, data on the blockchain is visible and needs to be encrypted to protect data privacy. However, model training is inseparable from parameter calculation. Therefore, the embodiment of the present application can use homomorphic encryption technology to achieve computability and credibility of encrypted model parameters while encrypting.

[0054] It should be noted that homomorphic encryption is an encryption algorithm that satisfies the homomorphic operation property of ciphertext. The encrypted data can still be used for specific calculations, and the decrypted result is consistent with the calculation result of the unencrypted data.

[0055] In a specific implementation, each node in the distributed network is configured with a homomorphic encryption function f. Therefore, after the target node obtains the second model parameter B through training, it can use the homomorphic encryption function f to encrypt the second model parameter B to obtain the second encrypted model parameter B', that is, f(B) = B'. Among them, the second encrypted model parameter B' has the characteristic of being calculably invisible, that is, the second encrypted model parameter B' is a ciphertext, which can ensure data privacy and security, and the second encrypted model parameter B' can participate in the parameter calculation and update process of model training, and has high credibility and security.

[0056] In one embodiment, the local blockchain includes multiple blocks, which are connected in sequence in the form of a chain, and the block includes a block header and a block body, wherein the block header is used to record basic block information, and the basic block information includes at least one of a version number and a timestamp.

[0057] The structure of the local blockchain during the training of the large model of the manufacturing value chain is as follows: Figure 3 As shown, the local blockchain is a structure formed by multiple blocks in a chain. Specifically, the local blockchain may include multiple blocks, and the multiple blocks may be connected in sequence in the form of a chain, and each block may be pointed to by at most one block, for example Figure 3 Block 1 in the block 2 points to block 3, and block 2 points to block 3. The main structure of a block can be divided into two parts: the block header and the block body. The information recorded in the block header can be customized. For example, the block header can record basic block information such as version number and timestamp (in Figure 3 (not shown in the figure), the basic block information can be used to control the model version update and facilitate the merging of update information.

[0058] S230, in the local blockchain, determine the n-1th block at the end according to the version number and / or timestamp; wherein n≥1 and is an integer.

[0059] The encryption model parameters are updated after calculation of each block in turn. For the sake of distinction, the embodiment of the present application can define this training as the nth training, where n≥1 and n is a positive integer, so the target node can determine the n-1th block at the end of the current local blockchain. Specifically, in the local blockchain, the target node can determine the block with the latest version number according to the version number in the block header of each block, and the block is the n-1th block at the end. Alternatively, in the local blockchain, the target node can determine the block with the latest timestamp according to the timestamp in the block header of each block, and the block is the n-1th block at the end. Alternatively, in the local blockchain, the target node can determine the block with the latest timestamp according to the version number and timestamp in the block header of each block, and the block is the n-1th block at the end.

[0060] S240, construct a new block after the n-1th block as the n-1th block, and extract the first encrypted model parameter from the n-1th block; wherein the first encrypted model parameter is obtained by encrypting the model parameters of the manufacturing value chain large model after the first n-1 trainings using a homomorphic encryption function.

[0061] The target node can build a new block after the n-1th block, and the new block can be used as the nth block. Among them, the block body of each block can be used to record the encrypted model parameters of the manufacturing value chain large model after each training and encryption, so the target node can extract the first encrypted model parameter from the n-1th block. The first encrypted model parameter can be obtained by encrypting the model parameters of the manufacturing value chain large model after the first n-1 trainings using the homomorphic encryption function f. Specifically, the model parameters of the manufacturing value chain large model are trained for the first n-1 times to obtain the model parameters after the first n-1 trainings. For the convenience of distinction, the model parameters of the manufacturing value chain large model after the first n-1 trainings can be defined as the first model parameter A, and then the first model parameter A can be encrypted using the homomorphic encryption function f to obtain the first encrypted model parameter A', that is, f(A) = A'. Similarly, the first encrypted model parameter A' has the advantage of being invisible, that is, the first encrypted model parameter A' is ciphertext, which can ensure data privacy and data security, and the first encrypted model parameter A' can participate in the parameter calculation and update process of model training, and has high credibility and security.

[0062] S250, adding the first encryption model parameter and the second encryption model parameter to obtain a target encryption model parameter, and recording the target encryption model parameter into the block body of the nth block.

[0063] Since homomorphic encryption is an encryption algorithm that satisfies the homomorphic operation property of ciphertext, the encrypted data can still be used for specific calculations, and the decrypted result is consistent with the calculation result of the unencrypted data. Therefore, the target node can add the first encrypted model parameter A' and the second encrypted model parameter B' to obtain the target encrypted model parameter C', that is, C' = A'+B', thereby achieving the computable invisibility of the model parameters. It is possible to directly use the local database to train the large model of the manufacturing value chain without decrypting the model parameters, and prevent malicious users from inferring the original data through the model parameters, thereby effectively ensuring the security of the training process.

[0064] It should be noted that for the ciphertext A' and ciphertext B' encrypted by a general encryption function, if the ciphertext A' and the ciphertext B' are added to obtain C', and then the corresponding decryption function is used to decrypt C', the result obtained is generally meaningless garbled code. The homomorphic encryption function f used in the embodiment of the present application is an encryption function that can perform homomorphic encryption, so the decrypted result is consistent with the operation result of the unencrypted data. For example, the corresponding homomorphic decryption function f' is used to decrypt the target encryption model parameter C' to obtain the target model parameter C. The target model parameter C satisfies: C=A+B, which is consistent with the operation result of the unencrypted data.

[0065] After calculating the target encryption model parameter C', the target node can record the target encryption model parameter C' into the block body of the nth block.

[0066] In one example, the partner companies jointly determine the manufacturing value chain model structure and blockchain structure, such as Figure 3 As shown, Figure 3The local blockchain in includes 3 blocks, that is, n=3. In the first iterative training process, the embodiment of the present application can train the large model of the manufacturing value chain to obtain the second model parameter X1 after the first training, and then use the homomorphic encryption function f to encrypt the second model parameter X1 to obtain the second encrypted model parameter X1'. Since block 1 is the starting block, the second encrypted model parameter X1' is directly used as the target encryption model parameter of block 1, and then the target encryption model parameter X1' of block 1 is recorded in the block body of block 1; in the second iterative training process, the embodiment of the present application can train the large model of the manufacturing value chain to obtain the second model parameter X2 after the second training, and then use the homomorphic encryption function f to encrypt the second model parameter X2 to obtain the second encrypted model parameter X2'. Since the previous block of block 2 is block 1, relative to block 2, the target encryption model parameter X1' of block 1 is used as the first encryption model parameter, and then the first encryption model parameter X1' can be compared with the second encryption model parameter X2'. The target encryption model parameter X2' is added to obtain the target encryption model parameter (X1'+X2') of block 2, and then the target encryption model parameter (X1'+X2') of block 2 is recorded in the block body of block 2; in the third iterative training process, the embodiment of the present application can train the manufacturing value chain large model to obtain the second model parameter X3 after the third training, and then use the homomorphic encryption function f to encrypt the second model parameter X3 to obtain the second encrypted model parameter X3'. Since the previous block of block 3 is block 2, relative to block 3, the target encryption model parameter (X1'+X2') of block 2 is used as the first encryption model parameter, and then the first encryption model parameter (X1'+X2') can be added to the second encryption model parameter X3' to obtain the target encryption model parameter (X1'+X2'+X3') of block 3, and then the target encryption model parameter (X1'+X2'+X3') of block 3 is recorded in the block body of block 3.

[0067] In one embodiment, the block header is also used to record hash value information, where the hash value information includes a parent block hash value and a child block hash value.

[0068] The block header may also store hash value information, which may include the parent block hash value and the child block hash value. The child block hash value of each block may be generated using a hash algorithm, and the child block hash value is used to represent the address information of the current block. For example, the child block hash value of block 1 may represent the address information of block 1, the child block hash value of block 2 may represent the address information of block 2, and the child block hash value of block 3 may represent the address information of block 3. Among them, the parent block hash value of each block can be generated using the child block hash value of its previous block, so the parent block hash value of the current block points to the previous block of the current block. For example, the parent block hash value of block 2 points to block 1, and the parent block hash value of block 3 points to block 2. Therefore, the parent block hash value of each block can be used to detect whether the information recorded in it has been tampered with. For example, block 1 can be found through the parent block hash value of block 2, and whether the information recorded in block 2 has been tampered with can be detected based on block 1 and block 2. For another example, block 2 can be found through the parent block hash value of block 3, and whether the information recorded in block 3 has been tampered with can be detected based on block 2 and block 3.

[0069] S260, using the sub-block hash value of the n-1th block as the parent block hash value of the nth block, and generating the sub-block hash value, version number and timestamp of this training for the nth block.

[0070] The previous block of the nth block is the n-1th block, so the target node can use the child block hash value of the n-1th block as the parent block hash value of the nth block. At the same time, the target node can use the hash algorithm to generate the child block hash value of this training for the nth block. In addition, the target node can obtain the version number of the manufacturing value chain model after this training, so as to use the version number as the version number of the nth block, and the target node can determine the timestamp of the completion of this training, so as to use the timestamp of the completion of this training as the timestamp of the nth block.

[0071] S270, recording the parent block hash value, child block hash value, version number and timestamp of the nth block into the block header of the nth block.

[0072] The target node can output the parent block hash value and the child block hash value of the nth block as the hash value information of the nth block, and can output the version number and timestamp of the nth block as the basic block information of the nth block, and then record the hash value information and the basic block information of the nth block into the block header of the nth block.

[0073] S280, generating target update information according to the block header and block body of the nth block, and broadcasting the target update information to the distributed network, so that other nodes in the distributed network update their own local blockchains according to the target update information.

[0074] The block header of the nth block records the basic block information and hash value information of the nth block, and the block body of the nth block records the target encryption model parameters of the nth block, so the target update information can be generated according to the block header and block body of the nth block, and then the target update information can be broadcast to the entire distributed network. Among them, the target update information includes at least the target encryption model parameters and the parent block hash value, and can also include at least one of the child block hash value, version number and timestamp.

[0075] After receiving the target update information, other nodes in the distributed network can update their own local blockchain according to the target update information, so that the structure of the local blockchain of each node in the distributed network and the information recorded are the same, thereby ensuring the reliability of the training of the large model of the manufacturing value chain.

[0076] In one embodiment, the other nodes include a first node and a second node, and the target node is communicatively connected to the second node via the first node; the method may further include:

[0077] Receive the third update information broadcast by the first node; wherein the third update information is any one of the first update information, the second update information and the target update information, the first update information is the update information generated by the first node, the second update information is the update information generated by the second node and forwarded by the first node, and the target update information is the update information generated by the target node and continued to be broadcast by the first node; determine whether the basic block information of the third update information is consistent with the basic block information of the n+mth block; wherein the n+mth block is the latest block in the local blockchain, m≥-1 and is an integer; if the basic block information of the third update information is inconsistent with the basic block information of the n+mth block, determine whether the block indicated by the third update information belongs to a subblock of the n+mth block; if the block indicated by the third update information belongs to a subblock of the n+mth block, construct a new block after the n+mth block as the n+m+1th block, and record the third update information in the n+m+1th block.

[0078] Other nodes may include a first node and a second node, and each of the first node and the second node may include multiple nodes, wherein the target node has direct business dealings with the first node, so the target node is communicatively connected to the first node, and the target node has no direct business dealings with the second node, but the first node has direct business dealings with the second node, that is, the first node is communicatively connected to the second node, so the target node can achieve indirect communication with the second node through the broadcast of the first node.

[0079] In one example, if Figure 4As shown, if Company A represents the target node, Company B and Company E represent the first node respectively, and Company C and Company D represent the second node respectively; if Company B represents the target node, Company A, Company C and Company D represent the first node respectively, and Company E represents the second node respectively; if Company C represents the target node, Company B and Company D represent the first node respectively, and Company A and Company E represent the second node respectively; if Company D represents the target node, Company B, Company C and Company E represent the first node respectively, and Company A represents the second node; if Company E represents the target node, Company A and Company D represent the first node respectively, and Company B and Company C represent the second node respectively.

[0080] When the target node is not in the training phase, the target node can keep monitoring the network and receive update information from the network at any time, and then compare the received update information with the local blockchain to complete the update or merge operation. Specifically, the target node can receive the third update information broadcast by the first node, where the third update information may be the first update information generated by the first node, or the second update information generated by the second node, or the target update information generated by the target node.

[0081] An example is given for the third update information being the first update information: assuming that Company E represents the target node, Company A can represent the first node. If the target node is not in the training stage, but the first node is in the training stage, that is, Company E is not in the training stage, but Company A is in the training stage, then Company A can use its own local database to train the manufacturing value chain model. Since Company A's local blockchain has no blocks, Company A can build block 1 in its own local blockchain to record the trained manufacturing value chain model in block 1. Then Company A generates the first update information based on block 1 to broadcast the first update information to the entire distributed network, so that the adjacent Company E can receive the first update information, that is, the target node can receive the first update information generated by the first node.

[0082] An example is given for the third update information being the second update information: assuming that Company E represents the target node, Company A can represent the first node, and Company B can represent the second node. Assuming that both the target node and the first node are not in the training stage, while the second node is in the training stage, that is, Company E and Company A are not in the training stage, while Company B is in the training stage, then Company B can use its own local database to train the manufacturing value chain large model. Since Company B's local blockchain already has block 1, Company B can build block 2 in its own local blockchain to record the trained manufacturing value chain large model in block 2, and then Company B generates the second update information based on block 2 to broadcast the second update information to the entire distributed network, so that the adjacent Company A can receive the second update information. Since Company A's local blockchain does not have block 2, Company A can build block 2 in its own local blockchain to record the second update information in block 2, and then Company A continues to broadcast the second update information to the entire distributed network, so that the adjacent Company E can receive the second update information, that is, the target node can receive the second update information generated by the second node and forwarded by the first node.

[0083] An example is given for the target update information as the third update information: assuming that Company A represents the target node, Company B can represent the first node. Assuming that the first node is not in the training stage, but the target node is in the training stage, that is, Company B is not in the training stage, but Company A is in the training stage, then Company A can use its own local database to train the manufacturing value chain model. Since Company A's local blockchain has no blocks, Company A can build block 1 in its own local blockchain to record the trained manufacturing value chain model in block 1, and then Company A generates target update information based on block 1 to broadcast the target update information to the entire distributed network, so that the adjacent Company B can receive the target update information. Since Company B's local blockchain has no block 1, Company B can build block 1 in its own local blockchain to record the target update information in block 1, and then Company B continues to broadcast the target update information to the entire distributed network, so that the adjacent Company A can receive the target update information, that is, the target node can receive the target update information generated by the target node that is continued to be broadcast by the first node.

[0084] Since there is two-way communication between two adjacent nodes, the target node may receive the target update information generated by the target node and continued to be broadcast by the first node, that is, the third update information may be the target update information, so the target node can first determine whether the third update information is the target update information through the basic block information. Specifically, the target node can determine whether the basic block information of the third update information is consistent with the basic block information of the n+mth block. If the basic block information of the third update information is consistent with the basic block information of the n+mth block, it can be said that the third update information is the target update information. Since the local blockchain of the target node has recorded the target update information, the target node can discard the third update information and no longer perform subsequent operations; if the basic block information of the third update information is inconsistent with the basic block information of the n+mth block, it can be said that the third update information is not the target update information, but the first update information or the second update information, and the target node performs subsequent operations.

[0085] Among them, the n+mth block may refer to the latest block in the local blockchain of the target node, and m≥-1 is an integer. If the receiving time of the third update information is earlier than the receiving time of the training instruction, that is, the target node receives the third update information first and then receives the training instruction, then m=-1, indicating that the latest block in the local blockchain of the target node is the n-1th block; if the receiving time of the third update information is equal to the receiving time of the training instruction, that is, the third update information received by the target node is the target update information, then m=0, indicating that the latest block in the local blockchain of the target node is the nth block; if the receiving time of the third update information is later than the receiving time of the training instruction, that is, the target node receives the training instruction first and then receives the third update information, then m≥1, for example, m=1, that is, the latest block in the local blockchain of the target node is the n+1th block.

[0086] When it is determined that the basic block information of the third update information is inconsistent with the basic block information of the n+mth block, it can be explained that the third update information is not the target update information, but the first update information or the second update information, and the target node can determine whether the block indicated by the third update information belongs to the subblock of the n+mth block. If the block indicated by the third update information belongs to the subblock of the n+mth block, the target node can use the third update information to update its own local blockchain, for example, a new block can be constructed after the n+mth block as the n+m+1th block, so as to record the third update information in the n+m+1th block.

[0087] In one implementation, determining whether the block indicated by the third update information belongs to a sub-block of the (n+m)th block may include:

[0088] Determine whether the parent block hash value of the third update information is consistent with the sub-block hash value of the n+m-th block; if the parent block hash value of the third update information is consistent with the sub-block hash value of the n+m-th block, then determine that the block indicated by the third update information belongs to the sub-block of the n+m-th block.

[0089] The target node can determine whether the block indicated by the third update information belongs to the sub-block of the n+mth block through the hash value information. Specifically, the target node determines whether the hash value of the parent block of the third update information is consistent with the hash value of the sub-block of the n+mth block. If the hash value of the parent block of the third update information is consistent with the hash value of the sub-block of the n+mth block, it means that the third update information has not been tampered with, and it can be determined that the third update information is legal, and the block indicated by the third update information belongs to the sub-block of the n+mth block; if the hash value of the parent block of the third update information is inconsistent with the hash value of the sub-block of the n+mth block, it means that the information in the third update information may be tampered with, or it means that there may be problems of bifurcation and multi-chain in the middle due to abnormal network communication or delay, then the target node can determine that the block indicated by the third update information does not belong to the sub-block of the n+mth block, and then subsequent operations can be performed.

[0090] In one embodiment, after determining whether the block indicated by the third update information belongs to a sub-block of the (n+m)th block, the method may further include:

[0091] If the block indicated by the third update information does not belong to a sub-block of the n+m-th block, determine whether the block indicated by the third update information and the n+m-th block belong to the same parameter training task according to the basic block information of the third update information; if the block indicated by the third update information and the n+m-th block belong to the same parameter training task, merge the block indicated by the third update information with the n+m-th block to obtain target merge information; construct a new block behind the n+m-th block as the n+m+1-th block, record the target merge information in the n+m+1-th block, and broadcast the target merge information to the distributed network, so that the first node in the distributed network updates its own local blockchain according to the target merge information, and the second node updates its own local blockchain according to the target merge information forwarded by the first node.

[0092] Since each block has the parent block hash value of its previous block, when any information in the third update information is tampered with, the parent block hash value of the third update information will change, while the child block hash value of the n+mth block in the local blockchain cannot be changed. Therefore, the parent block hash value of the third update information is inconsistent with the child block hash value of the n+mth block, resulting in the block indicated by the third update information not belonging to the child block of the n+mth block, and the target node performs subsequent operations.

[0093] In addition, since the distributed network broadcast is progressive, there may be forks and multi-chain problems due to network communication anomalies or delays in the middle. Therefore, the hash value of the parent block of the third update information will be inconsistent with the hash value of the child block of the n+mth block, resulting in the block indicated by the third update information not belonging to the child block of the n+mth block, and the target node will perform subsequent operations.

[0094] In a specific implementation, if the block indicated by the third update information does not belong to a subblock of the n+mth block, the target node can determine whether the block indicated by the third update information and the n+mth block belong to the same parameter training task through the basic block information of the third update information. If the block indicated by the third update information and the n+mth block do not belong to the same parameter training task, it means that the third update information has been tampered with, that is, the third update information is illegal, then the third update information can be discarded, and the abnormal situation can be broadcast to the entire distributed network. If the block indicated by the third update information and the n+mth block belong to the same parameter training task, indicating that the problem of bifurcation and multi-chain occurs due to abnormal network communication or delay, the target node can merge the block indicated by the third update information with the n+mth block to obtain the target merge information, and then the target node can use the target merge information to update its own local blockchain. For example, a new block can be built after the n+mth block as the n+m+1th block, so as to record the target merge information in the n+m+1th block. At the same time, the target node can broadcast the target merge information to the distributed network, so that after the first node in the distributed network receives the target merge information, the first node can update its own local blockchain according to the target merge information, and then the first node continues to broadcast the target merge information to the entire distributed network, so that after the second node in the distributed network receives the target merge information forwarded by the first node, the second node can update its own local blockchain according to the target merge information. In this way, the local blockchain of each node in the distributed network is re-merged from a multi-chain structure to a single-chain structure, thereby ensuring the reliability of the training of the large model of the manufacturing value chain.

[0095] In one implementation, merging the block indicated by the third update information with the n+mth block to obtain target merged information may include:

[0096] The target encryption model parameters of the third update information and the target encryption model parameters of the n+mth block are used to calculate the target encryption model parameters of this merge; and the parent block hash value of this merge is calculated using the sub-block hash value of the third update information and the sub-block hash value of the n+mth block; and the sub-block hash value, version number and timestamp of this merge are generated; the target merge information is generated according to the target encryption model parameters of this merge, the parent block hash value, the sub-block hash value, the version number and the timestamp.

[0097] Specifically, the target node can calculate the target encryption model parameters of this merger by taking the average value. For example, the target node can calculate the average value of the target encryption model parameters of the third update information and the target encryption model parameters of the n+mth block, so as to obtain the target encryption model parameters of this merger. Alternatively, the target node can also calculate the target encryption model parameters of this merger by summarizing and eliminating repeated parameters. For example, the target node can first summarize the target encryption model parameters of the third update information and the target encryption model parameters of the n+mth block to obtain the total target encryption model parameters. Since the block indicated by the third update information and the n+mth block belong to the same parameter training task, there will be repeated target encryption model parameters in the total target encryption model parameters. The target node can eliminate the repeated target encryption model parameters from the total target encryption model parameters, so as to obtain the target encryption model parameters of this merger.

[0098] In addition, the target node can calculate the hash value of the parent block of this merger by taking the average value. For example, the target node can calculate the average value of the sub-block hash value of the third update information and the sub-block hash value of the n+mth block, so as to obtain the parent block hash value of this merger. In addition, the target node can generate the sub-block hash value, version number and timestamp of this merger.

[0099] After obtaining the target encryption model parameters, parent block hash value, child block hash value, version number and timestamp of this merger, the target node can generate target merger information according to the target encryption model parameters, parent block hash value, child block hash value, version number and timestamp of this merger. Among them, the target update information at least includes the target encryption model parameters and parent block hash value of this merger, and can also include at least one of the child block hash value, version number and timestamp of this merger.

[0100] The embodiment of the present application can set a preset stop iteration condition for the manufacturing value chain big model in advance, wherein the preset stop iteration condition can be a preset number of iterations. The target node can determine whether the training of the manufacturing value chain big model has reached the preset number of iterations each time it updates its own local blockchain. When the preset number of iterations is reached, it can be determined that the iterative training of the manufacturing value chain big model is completed.

[0101] In one embodiment, the method may further include:

[0102] When a test instruction is received, the target encryption model parameters of the target block are extracted from the local blockchain according to the target block indicated by the test instruction; the target encryption model parameters are decrypted using a homomorphic decryption function to obtain the target model parameters required by the test instruction; the manufacturing value chain large model is tested according to the target model parameters required by the test instruction to obtain test results; the test results are used to characterize the training effect of the manufacturing value chain large model.

[0103] Each business party can verify the training effect of the manufacturing value chain model at any time. Therefore, the target node can receive the test instruction from the business party during the iterative training process, or after the iterative training is completed. Therefore, the target block indicated by the test instruction can be any block in the local blockchain. For example, the target block can be the second block of the local blockchain during the iterative training process (such as Figure 3 ), or it can be the last block of the local blockchain after the iterative training is completed.

[0104] The target node can extract the target encryption model parameter C' of the target block from the local blockchain. Since the target encryption model parameter C' is obtained by encrypting with the homomorphic encryption function f, and the homomorphic encryption function f is an encryption function that can perform homomorphic encryption, the decrypted result is consistent with the operation result of the unencrypted data. For example, the target node uses the corresponding homomorphic decryption function f' to decrypt the target encryption model parameter C', and the target model parameter C required for the test instruction can be obtained. The target model parameter C satisfies: C=A+B, which is consistent with the operation result of the unencrypted data.

[0105] Therefore, after decrypting and obtaining the target model parameter C required for the test instruction, it can be used in the manufacturing value chain large model for easy testing and use. For example, the target node can test the manufacturing value chain large model according to the target model parameter C required by the test instruction, thereby obtaining the test result, wherein the test result can be used to characterize the training effect of the manufacturing value chain large model.

[0106] As can be seen from this example, the solution provided by this application, by adopting a blockchain structure and utilizing a distributed network to complete the training optimization of the large model of the manufacturing value chain, can avoid dependence on the central server and greatly improve the credibility and reliability of the training process. Furthermore, the model parameters are calculated and updated using homomorphic encryption functions during the training process, thereby fully considering the data privacy and security issues involved in the cooperation process of different business parties, greatly improving the credibility and security of the training process. Furthermore, through the collection of blockchain and large models, it is possible to achieve a greatly improved training efficiency of the large model of the manufacturing value chain through distributed training while ensuring data security and privacy.

[0107] In order to enable those skilled in the art to better understand the embodiments of the present application, the embodiments of the present application are described below through the following two examples.

[0108] Example 1: Figure 5 This is a schematic diagram of the modeling process shown in the embodiment of the present application. The specific process is as follows:

[0109] The structure of the manufacturing value chain model and the blockchain structure are determined by the cooperative companies, that is, the structure of the manufacturing value chain model and the blockchain structure are determined by multiple business parties in the cooperation process. When a business party is in the training stage, the business party uses the local database to train the manufacturing value chain model locally, obtains the model parameters, and encrypts the model parameters using the homomorphic encryption function to obtain the encrypted model parameters, and then creates a new block in the local blockchain to record the encrypted model parameters, and then broadcasts the update information to the entire network, so that other business parties in the network can update or merge their own local blockchains according to the update information. When a business party is not in the training stage, the business party can keep monitoring the network and receive update information from the network at any time, and then compare the update information with the local blockchain to complete the update or merge operation. When the preset number of iterations has not been reached, the manufacturing value chain model continues to iterate until the preset number of iterations is reached, and the iterative training of the manufacturing value chain model is completed.

[0110] Example 2: Figure 6 This is a schematic diagram of the manufacturing value chain large model training optimization process shown in the embodiment of the present application. At the same time, the simulated cooperative company network structure in this example can be seen Figure 4 , the broadcast and update process is as follows:

[0111] Company A first trained the manufacturing value chain model locally, built block 1 into the local blockchain and broadcast the update information to the entire network. After the adjacent companies B and E received the update information (block 1), since there were no blocks in the local blockchain, companies B and E added block 1 to their own local blockchains respectively, and then companies B and E continued to broadcast the update information (block 1) to the entire network. After the adjacent company A received the update information (block 1), it compared and found that block 1 was the same as the latest block 1 in the local blockchain, so company A did not perform other operations, such as not updating or broadcasting operations. Due to the actual time difference caused by physical distance and network speed differences, company D first received the update information (block 1) of company E, so it added block 1 to its own local blockchain, and then received the update information (block 1) of company B. After comparison, it found that block 1 was the same as the latest block 1 in the local blockchain, so company D did not perform other operations, such as not updating or broadcasting operations. The update process of company C is the same as that of company D, which will not be repeated here.

[0112] Since the distributed network broadcast is progressive, there may be problems with forks and multiple chains in the middle due to abnormal or delayed network communication. For example, Company B conducts a series of training locally to build Block 2 and broadcasts it again. After the adjacent Company A and Company C receive the update information (Block 2), Company A's network begins to become abnormal and cannot communicate with other companies. Company A and Company C then each update locally and start a new round of parameter training. For example, Company A conducts a new round of parameter training based on Block 2, generating Block 3-1. However, Company A is unable to broadcast the update information (Block 3-1) to the network due to network abnormalities. Therefore, Company C also conducts a new round of parameter training based on Block 2, generating Block 3-2. Company C broadcasts the update information (Block 3-2) to the network. At this time, Company A is unable to receive the update information (Block 3-2) due to network abnormalities. After receiving the update information (block 3-2) from company C, company D continues to train backward along this blockchain and builds a new block 4-2. At this time, company A's network just returns to normal and broadcasts the generated update information (block 3-1) to the network. Company E first receives company A's update information (block 3-1), adds block 3-1 to its own local blockchain, and then receives company D's update information (block 4-2). Company E compares company D's update information (block 4-2) with the latest block 3-1 of the local blockchain and finds that block 4-2 is neither block 3-1 nor a subblock of block 3-1. After determining that the update information (block 4-2) has not been tampered with, company E can merge block 3-1 with block 4-2, such as calculating the new target encryption model parameters by taking the average, and build block 5, and then broadcast the merged information (block 5) to the network, so that each company's local blockchain is merged from a multi-chain structure to a single-chain structure.

[0113] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a blockchain-based manufacturing value chain large model training optimization device, electronic device, computer-readable storage medium and corresponding embodiments.

[0114] Figure 7 It is a structural diagram of a large-scale model training and optimization device for the manufacturing value chain based on blockchain as shown in an embodiment of the present application.

[0115] See also Figure 7 The present application provides a manufacturing value chain large model training and optimization device based on blockchain, which can be applied to target nodes in a distributed network. The device may include:

[0116] The model training module 710 is used to train the manufacturing value chain model using the local database when receiving the training instruction to obtain the trained manufacturing value chain model;

[0117] A block construction module 720 is used to construct a new block in the local blockchain and record the trained manufacturing value chain model into the new block;

[0118] The target update information broadcast module 730 is used to generate target update information according to the new block and broadcast the target update information to the distributed network so that other nodes in the distributed network update their own local blockchain according to the target update information.

[0119] In one embodiment, the model training module 710 may include:

[0120] The training submodule is used to train the manufacturing value chain model using the local database to obtain second model parameters when receiving the training instruction; wherein the second model parameters are model parameters of the manufacturing value chain model after the training;

[0121] The encryption submodule is used to encrypt the second model parameters using a homomorphic encryption function to obtain second encrypted model parameters.

[0122] In one embodiment, the local blockchain includes a plurality of blocks, the plurality of blocks are sequentially connected in a chain form, the block includes a block header and a block body, wherein the block header is used to record basic block information, and the basic block information includes at least one of a version number and a timestamp; the block construction module 720 may include:

[0123] The n-1th block determination submodule is used to determine the n-1th block at the end in the local blockchain according to the version number and / or timestamp; wherein n ≥ 1 and is an integer;

[0124] The nth block construction submodule is used to construct a new block after the n-1th block as the nth block, and extract the first encrypted model parameter from the n-1th block; wherein the first encrypted model parameter is obtained by encrypting the model parameters of the manufacturing value chain large model after the first n-1 trainings by using a homomorphic encryption function;

[0125] The parameter calculation submodule of the nth block is used to add the first encryption model parameter and the second encryption model parameter to obtain the target encryption model parameter, and record the target encryption model parameter in the block body of the nth block.

[0126] In one embodiment, the block header is also used to record hash value information, and the hash value information includes the parent block hash value and the child block hash value; the target update information broadcast module 730 may include:

[0127] The block header information generation submodule of the nth block is used to use the subblock hash value of the n-1th block as the parent block hash value of the nth block, and generate the subblock hash value, version number and timestamp of this training for the nth block;

[0128] The block header information recording submodule of the nth block is used to record the parent block hash value, child block hash value, version number and timestamp of the nth block into the block header of the nth block;

[0129] The target update information generation submodule is used to generate target update information according to the block header and block body of the nth block.

[0130] In one embodiment, the other nodes include a first node and a second node, and the target node is communicatively connected to the second node via the first node; the device may further include:

[0131] a third update information receiving module, configured to receive third update information broadcasted by the first node; wherein the third update information is any one of the first update information, the second update information and the target update information, the first update information is the update information generated by the first node, the second update information is the update information generated by the second node and forwarded by the first node, and the target update information is the update information generated by the target node and continued to be broadcasted by the first node;

[0132] A basic block information consistency judgment module is used to judge whether the basic block information of the third update information is consistent with the basic block information of the n+mth block; wherein the n+mth block is the latest block in the local blockchain, and m≥-1 is an integer;

[0133] a sub-block determination module, configured to determine whether the block indicated by the third update information belongs to a sub-block of the n+m-th block if the basic block information of the third update information is inconsistent with the basic block information of the n+m-th block;

[0134] The n+m+1th block construction module is used to construct a new block behind the n+mth block as the n+m+1th block if the block indicated by the third update information belongs to a sub-block of the n+mth block, and record the third update information in the n+m+1th block.

[0135] In one implementation, the sub-block determination module may include:

[0136] A hash value information consistency judgment module is used to judge whether the parent block hash value of the third update information is consistent with the child block hash value of the n+mth block;

[0137] The sub-block determination module is used to determine whether the block indicated by the third update information belongs to the sub-block of the n+m-th block if the parent block hash value of the third update information is consistent with the sub-block hash value of the n+m-th block.

[0138] In one implementation, after determining whether the block indicated by the third update information belongs to a sub-block of the (n+m)th block, the apparatus may further include:

[0139] A parameter training task consistency judgment module, used for judging whether the block indicated by the third update information and the n+mth block belong to the same parameter training task according to the basic block information of the third update information if the block indicated by the third update information does not belong to the sub-block of the n+mth block;

[0140] a block merging module, configured to merge the block indicated by the third update information with the n+mth block if the block indicated by the third update information and the n+mth block belong to the same parameter training task, to obtain target merged information;

[0141] A target merge information broadcasting module is used to build a new block after the n+mth block as the n+m+1th block, record the target merge information in the n+m+1th block, and broadcast the target merge information to the distributed network, so that the first node in the distributed network updates its own local blockchain according to the target merge information, and the second node updates its own local blockchain according to the target merge information forwarded by the first node.

[0142] In one embodiment, the block merging module may include:

[0143] a merge parameter calculation submodule, used to calculate the target encryption model parameters of this merger by using the target encryption model parameters of the third update information and the target encryption model parameters of the n+mth block; and

[0144] A merge hash value calculation submodule, used to calculate the hash value of the parent block of this merger by using the sub-block hash value of the third update information and the sub-block hash value of the n+mth block; and

[0145] The merge basic information generation submodule is used to generate the hash value, version number and timestamp of the merged subblock;

[0146] The target merge information generation submodule is used to generate the target merge information according to the target encryption model parameters, parent block hash value, child block hash value, version number and timestamp of this merge.

[0147] In one embodiment, the device may further include:

[0148] A test instruction receiving module, configured to extract target encryption model parameters of a target block from a local blockchain according to a target block indicated by the test instruction when receiving the test instruction;

[0149] A decryption module, used to decrypt the target encrypted model parameters using a homomorphic decryption function to obtain the target model parameters required for the test instruction;

[0150] The test module is used to test the manufacturing value chain model according to the target model parameters required by the test instructions to obtain the test results; the test results are used to characterize the training effect of the manufacturing value chain model.

[0151] As can be seen from this example, the solution provided by this application is applied to the target node in the distributed network. When receiving the training instruction, the local database is used to train the large model of the manufacturing value chain to obtain the trained large model of the manufacturing value chain; a new block is constructed in the local blockchain, and the trained large model of the manufacturing value chain is recorded in the new block; target update information is generated according to the new block, and the target update information is broadcast to the distributed network, so that other nodes in the distributed network update their own local blockchain according to the target update information. This application adopts a blockchain structure and uses a distributed network to complete the training optimization of the large model of the manufacturing value chain, thereby avoiding dependence on the central server and greatly improving the credibility and reliability of the training process.

[0152] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.

[0153] Figure 8 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.

[0154] See also Figure 8 , the electronic device 800 includes a memory 810 and a processor 820 .

[0155] The processor 820 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0156] The memory 810 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 820 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at runtime. In addition, the memory 810 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 810 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0157] The memory 810 stores executable codes, and when the executable codes are processed by the processor 820 , the processor 820 can execute part or all of the methods described above.

[0158] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.

[0159] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.

[0160] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A blockchain-based manufacturing value chain large model training optimization method, characterized by: Applied to a target node in a distributed network, the method comprises: When a training instruction is received, the manufacturing value chain model is trained using the local database to obtain a trained manufacturing value chain model; Constructing a new block in the local blockchain and recording the trained manufacturing value chain model into the new block; Generate target update information based on the new block, and broadcast the target update information to the distributed network, so that other nodes in the distributed network update their own local blockchains according to the target update information, so that the structure of the local blockchains of the other nodes and the information recorded therein are the same as the structure of the local blockchain of the target node and the information recorded therein; The local blockchain includes multiple blocks, each of which includes a block header. The block header is used to record basic block information and hash value information. The basic block information is used to control model version updates. The hash value information includes a parent block hash value and a child block hash value. The child block hash value is used to represent the address information of the current block, and the parent block hash value is used to detect whether the information recorded in the current block has been tampered with. The other nodes include a first node and a second node, the target node is communicatively connected to the second node via the first node, and the method further includes: receiving third update information broadcast by the first node; wherein the third update information is any one of first update information, second update information, and target update information, the first update information is update information generated by the first node, the second update information is update information generated by the second node and forwarded by the first node, and the target update information is update information generated by the target node and continued to be broadcast by the first node; When the third update information is the first update information or the second update information, and the block indicated by the third update information does not belong to a subblock of the (n+m)th block, determining whether the block indicated by the third update information and the (n+m)th block belong to the same parameter training task based on the basic block information of the third update information; wherein the (n+m)th block is the latest block in the local blockchain, m ≥ -1 and is an integer, and n ≥ 1 and is an integer; If the block indicated by the third update information and the n+mth block belong to the same parameter training task, it is determined that due to the fork and multi-chain problems caused by network communication abnormality or delay, the block indicated by the third update information does not belong to the subblock of the n+mth block, so as to merge the block indicated by the third update information with the n+mth block to obtain target merge information, and use the target merge information to update its own local blockchain, and broadcast the target merge information to the distributed network, so that the first node updates its own local blockchain according to the target merge information, and the second node updates its own local blockchain according to the target merge information forwarded by the first node.

2. The method according to claim 1, characterized in that When a training instruction is received, the manufacturing value chain model is trained using a local database to obtain a trained manufacturing value chain model, including: When a training instruction is received, the manufacturing value chain model is trained using the local database to obtain second model parameters; wherein the second model parameters are model parameters of the manufacturing value chain model after this training; The second model parameters are encrypted using a homomorphic encryption function to obtain second encrypted model parameters.

3. The method according to claim 2, characterized in that The multiple blocks are sequentially connected in a chain form, and the blocks further include a block body, wherein the basic block information includes at least one of a version number and a timestamp; the step of constructing a new block in the local blockchain and recording the trained manufacturing value chain model in the new block includes: In the local blockchain, determining the n-1th block at the end according to the version number and / or the timestamp; Constructing a new block after the n-1th block as the n-th block, and extracting first encrypted model parameters from the n-1th block; wherein the first encrypted model parameters are obtained by encrypting the model parameters of the manufacturing value chain large model after the first n-1 trainings using the homomorphic encryption function; The first encryption model parameter and the second encryption model parameter are added to obtain a target encryption model parameter, and the target encryption model parameter is recorded in the block body of the nth block.

4. The method according to claim 3, characterized in that Generating target update information according to the new block includes: Use the child block hash value of the n-1th block as the parent block hash value of the nth block, and generate the child block hash value, version number and timestamp of this training for the nth block; Record the parent block hash value, child block hash value, version number and timestamp of the nth block into the block header of the nth block; Generate target update information according to the block header and block body of the nth block.

5. The method according to claim 1, wherein The method further comprises: When the third update information is the first update information or the second update information, and the block indicated by the third update information belongs to a sub-block of the n+m-th block, a new block is constructed after the n+m-th block as the n+m+1-th block, and the third update information is recorded in the n+m+1-th block.

6. The method according to claim 5, characterized in that Whether the block indicated by the third update information belongs to a sub-block of the (n+m)th block is determined by: Determining whether the basic block information of the third update information is consistent with the basic block information of the (n+m)th block; If the basic block information of the third update information is inconsistent with the basic block information of the n+mth block, determining whether the parent block hash value of the third update information is consistent with the child block hash value of the n+mth block; If the parent block hash value of the third update information is inconsistent with the child block hash value of the n+m-th block, it is determined that the block indicated by the third update information does not belong to the child block of the n+m-th block; or, If the parent block hash value of the third update information is consistent with the child block hash value of the n+m-th block, it is determined that the block indicated by the third update information belongs to the child block of the n+m-th block.

7. The method according to claim 1, characterized in that The updating of its own local blockchain using the target merge information includes: A new block is constructed after the n+mth block to serve as the n+m+1th block, and the target merge information is recorded in the n+m+1th block.

8. The method according to claim 1, characterized in that Merging the block indicated by the third update information with the (n+m)th block to obtain target merged information includes: Calculating the target encryption model parameters for this merge using the target encryption model parameters of the third update information and the target encryption model parameters of the (n+m)th block; and calculating the hash value of the parent block for this merge using the sub-block hash value of the third update information and the sub-block hash value of the (n+m)th block; and generating the sub-block hash value, version number, and timestamp for this merge. Generate target merge information based on the target encryption model parameters, parent block hash value, child block hash value, version number and timestamp of the merge.

9. The method according to claim 3, characterized in that The method further comprises: When a test instruction is received, extracting target encryption model parameters of the target block from the local blockchain according to the target block indicated by the test instruction; Decrypting the target encrypted model parameters using a homomorphic decryption function to obtain the target model parameters required by the test instruction; The manufacturing value chain large model is tested according to the target model parameters required by the test instruction to obtain a test result; the test result is used to characterize the training effect of the manufacturing value chain large model.

10. A blockchain-based manufacturing value chain large model training and optimization device, characterized by: Applied to a target node in a distributed network, the device comprises: The model training module is used to train the manufacturing value chain model using the local database when receiving a training instruction to obtain a trained manufacturing value chain model; A block construction module, configured to construct a new block in the local blockchain and record the trained manufacturing value chain model into the new block; a target update information broadcast module, configured to generate target update information based on the new block and broadcast the target update information to the distributed network, so that other nodes in the distributed network update their own local blockchains based on the target update information, so that the structure of the local blockchains of the other nodes and the information recorded therein are the same as the structure of the local blockchain of the target node and the information recorded therein; The local blockchain includes multiple blocks, each of which includes a block header. The block header is used to record basic block information and hash value information. The basic block information is used to control model version updates. The hash value information includes a parent block hash value and a child block hash value. The child block hash value is used to represent the address information of the current block, and the parent block hash value is used to detect whether the information recorded in the current block has been tampered with. The other nodes include a first node and a second node, the target node is communicatively connected to the second node via the first node, and the apparatus further includes: a third update information receiving module, configured to receive third update information broadcast by the first node; wherein the third update information is any one of the first update information, the second update information, and the target update information, the first update information is the update information generated by the first node, the second update information is the update information generated by the second node and forwarded by the first node, and the target update information is the update information generated by the target node and continued to be broadcast by the first node; a parameter training task consistency judgment module, configured to, when the third update information is the first update information or the second update information, and the block indicated by the third update information does not belong to a subblock of the n+mth block, judge, based on the basic block information of the third update information, whether the block indicated by the third update information and the n+mth block belong to the same parameter training task; wherein the n+mth block is the latest block in the local blockchain, m ≥ -1 and is an integer, and n ≥ 1 and is an integer; A block merging module is configured to, if the block indicated by the third update information and the (n+m)th block belong to the same parameter training task, determine that the block indicated by the third update information does not belong to a subblock of the (n+m)th block due to a fork and multi-chain problem caused by network communication abnormality or delay, merge the block indicated by the third update information with the (n+m)th block to obtain target merge information, use the target merge information to update its own local blockchain, and broadcast the target merge information to the distributed network, so that the first node updates its own local blockchain according to the target merge information, and the second node updates its own local blockchain according to the target merge information forwarded by the first node.