A method for autonomously acquiring programs for CNC machine tools
By broadcasting production task records in the blockchain P2P network and independently confirming and downloading production programs by CNC machine tools, the reliability and security issues of CNC machine tool acquisition methods are solved, and high reliability and flexible production task management is achieved.
Patent Information
- Application Number
- CN202411463898.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-10-21
AI Technical Summary
现有技术中,数控机床程序获取方式的可靠性和安全性较差,尤其是在DNC服务器宕机或多台数控机床需要频繁调整生产程序时,系统难以保证高可靠性和安全性。
By creating a Genesis block in the blockchain P2P network and initializing the blockchain network, the DNC server broadcasts the production task records to be published in the blockchain. The CNC machine tool determines whether to accept the task based on these records, and confirms the acceptance of the task in the blockchain through broadcast messages signed by the private key. The accounting node records these confirmation records into the blockchain, ensuring that the CNC machine tool can download the corresponding production program files after the task is successfully accepted.
This method ensures the reliability and security of the CNC machine tool program acquisition process by recording all program issuing processes in the blockchain, and even if the node failure is not affected. At the same time, the combination of multiple DNC servers and CNC machine tools realizes the parallel distribution of production tasks, improving the flexibility and reliability of the system.
Smart Images

Figure CN119011557B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of numerical control machine tool control, and in particular to a method for autonomously acquiring a program for a numerical control machine tool. Background Art
[0002] Under the demand for flexible manufacturing, machine tools need to adjust and update the production programs in the machine tools at any time and quickly according to production needs, and ensure that the programs are quickly, accurately and safely released to the machine tools, so that the machine tools can produce according to the new production programs. With the development of CNC of traditional machine tools, a variety of program release methods have been formed. The networking of DNC (Distributed Numerical Control, CNC equipment networking management) system has given CNC equipment a new life. It breaks the traditional production model, allows remote monitoring and management, and enables the production line to be dynamically adjusted according to real-time data, greatly improving the flexibility and response speed of production. At the same time, through cloud computing technology, DNC equipment can share resources, optimize work processes, achieve collaborative manufacturing, and reduce production costs.
[0003] In the intelligent manufacturing system, although the DNC system is called distributed CNC, in fact, the entire program distribution still relies on the centralized component of the DNC server. All CNC machine tools need to obtain programs from the DNC server. Once the DNC server goes down, the program cannot be issued, and the entire production plant will be difficult to operate. Therefore, it is necessary to improve the reliability of the DNC server. At the same time, with the increase in the number of CNC machine tools and the development of flexible manufacturing, as well as changes in orders, the production programs of CNC machine tools need to be adjusted frequently. One DNC server can no longer meet the production demands. If multiple DNC servers can form a truly distributed system, it can not only achieve elastic expansion, but also greatly improve the reliability of the DNC server. In the past, because traditional CNC machine tools were non-intelligent devices, the computing power and storage space of the equipment were very limited, and some could not even store a completed program. However, with the popularization of computers, a very powerful computing component can be provided to CNC machine tools at a very low cost, making it possible to build a distributed system.
[0004] Therefore, how to use the distributed system composed of DNC servers to realize the automatic acquisition of CNC machine tool programs and improve the reliability and security of the program acquisition process is a problem that needs to be solved urgently. Summary of the invention
[0005] In view of the above analysis, an embodiment of the present invention aims to provide a method for autonomously acquiring programs for CNC machine tools, so as to solve the problem of poor reliability and security of the CNC machine tool program acquisition method in the prior art.
[0006] The present invention discloses a method for autonomously acquiring a program for a numerically controlled machine tool, the method comprising:
[0007] DNC server No. 0 creates the genesis block and initializes the blockchain P2P network;
[0008] The DNC server uses a private key signature to broadcast the record of the production task to be released in the blockchain P2P network, and the accounting node records it in the next block in the blockchain and serves as the latest block in the blockchain;
[0009] Each CNC machine tool receives the record of the production task issued by the DNC server from the latest block of the blockchain, and determines whether to accept the production task. If accepted, a record of confirming acceptance of the production task issued by the corresponding DNC server is published in the blockchain P2P network through a broadcast message signed by a private key; if the record of confirming acceptance of the production task issued by the corresponding DNC server is recorded by the accounting node in the next block of the blockchain, the task is accepted successfully, and the corresponding CNC machine tool downloads the corresponding production program file according to the record of the production task issued by the DNC server.
[0010] On the basis of the above scheme, the present invention also makes the following improvements:
[0011] Furthermore, the production task to be released includes: the number of the production task, the release time, the hash value of the production program file, the acquisition address of the program and the production requirements;
[0012] Production requirements include requirements for CNC machine tools, production quantity and production deadline requirements.
[0013] Furthermore, each CNC machine tool uses the following methods to determine whether to accept the production task issued by the DNC server:
[0014] After receiving the record of the production task issued by the DNC server, if the CNC machine tool confirms that it is in an idle state and meets the production requirements of the production task, it will accept the production task;
[0015] Afterwards, a record confirming acceptance of the production task issued by the corresponding DNC server is published in the blockchain P2P network by means of a broadcast message signed by a private key in the blockchain;
[0016] The record of confirming acceptance of the production task issued by the corresponding DNC server includes: the number of the production task confirmed to be accepted, the producible quantity and the production completion time.
[0017] Further, the corresponding CNC machine tool downloads the corresponding production program file according to the record of the production task released by the DNC server, and executes:
[0018] The corresponding CNC machine tool obtains the production program file according to the program acquisition address in the record of the production task released by the DNC server, and uses the Hash value of the production program file for verification. If the verification passes, the program is successfully issued.
[0019] Furthermore, if the records of production tasks issued by the DNC server are accepted by multiple CNC machine tools at the same time and eventually exceed the production quantity in the published production tasks, the accounting node will determine the CNC machine tool that accepts the production task based on the order in which the CNC machine tool publishes and confirms the records of accepting the production tasks issued by the corresponding DNC server and the quantity that can be produced, and record it in the next block of the blockchain; the acceptance records of subsequent CNC machine tools will be ignored.
[0020] Furthermore, the DNC server broadcasts the record of the production task to be released in the blockchain P2P network using a private key signature, which is recorded by the accounting node to the next block in the blockchain and executed:
[0021] The accounting node receives the record of the production task to be published, and after passing the public key signature verification using the DNC server that broadcasts the record of the production task to be published, writes the record of the production task published by the corresponding DNC server into the candidate block of the next block in the blockchain;
[0022] The validity of the candidate block is verified, and the candidate block that passes the validity verification is published in the blockchain as the next block of the blockchain.
[0023] Furthermore, the block includes: the block number of the current block, the hash value of the previous block, the hash value of the current block, a random number, the record of the current block, and the signature of the accounting node on the current block;
[0024] The validity of the block is verified in the following way: the Hash value of this block is generated by using the block number of this block, the Hash value of the previous block, the record of this block and the signature of this block by the accounting node. This block is valid only when the Hash value of this block is less than the random number.
[0025] Furthermore, the method further comprises:
[0026] When a new CNC machine tool joins the blockchain P2P network, the newly added CNC machine tool joins the blockchain P2P network as a node, maintains its own adjacent nodes, and publishes its own public key in the blockchain P2P network using a broadcast message signed by a private key, which is recorded by the accounting node in the next block of the blockchain.
[0027] Furthermore, the newly added CNC machine tool maintains its neighboring nodes by performing the following operations:
[0028] The newly added CNC machine tool obtains the genesis block, establishes a connection with the IP address of each node in the genesis block, and obtains the IP address of the adjacent node of each node in the genesis block;
[0029] The newly added CNC machine tool randomly selects the IP addresses of multiple adjacent nodes and establishes connections with them, listing them as its own adjacent nodes.
[0030] Furthermore, before the newly added CNC machine tool publishes its own public key in the blockchain P2P network by broadcasting messages signed with private keys, it also executes:
[0031] The newly added CNC machine tool obtains all blocks in the current blockchain from its own adjacent nodes, and uses the preset validity principle to verify the validity of each block in the obtained blockchain, and stores each block that has passed the verification locally.
[0032] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0033] The method for autonomously acquiring programs for numerically controlled machine tools provided by the present invention broadcasts the records of production tasks to be released in the blockchain P2P network through the DNC server, and each numerically controlled machine tool determines whether to accept the production task according to the records of the production tasks released by the DNC server. If accepted, a record of confirming the acceptance of the production task released by the corresponding DNC server is released in the blockchain P2P network through a broadcast message signed by a private key; when the record of accepting the production task released by the corresponding DNC server is recorded in the next block of the blockchain by the accounting node, it indicates that the task is accepted successfully, and the corresponding numerically controlled machine tool downloads the corresponding production program file according to the record of the production task released by the DNC server. By executing the above process, the method in the present invention can ensure that all program issuance processes are recorded in the blockchain, and any node failure will not affect the entire issuance process, thereby effectively ensuring the reliability and security of the numerically controlled machine tool program acquisition process.
[0034] At the same time, since the method involves multiple DNC servers and multiple CNC machine tools, the method can realize the parallel issuance of multiple production tasks, and the data machine tool can select to accept the corresponding production task according to its own status and the production requirements of each production task. In addition, in this method, the accounting node can also select the CNC machine tool that will finally execute the corresponding production task according to the situation that the CNC machine tool confirms to accept the production task. These CNC machine tools obtain the production program file according to the acquisition address of the program, and verify the validity of the production program file according to the hash value of the production program file, so as to smoothly and autonomously obtain the program to execute the corresponding task. The whole process effectively ensures the effective and smooth implementation of the production task, avoids the overproduction of the production task, and ensures the validity of the production program file. The production program file is not directly released, which ensures the lightness and security of the entire blockchain.
[0035] To sum up, the method for autonomously acquiring programs for CNC machine tools provided by the present invention has a clear process and strong feasibility, can ensure the reliability and safety of the CNC machine tool program acquisition process, provides good technical guidance for technical personnel in this field to realize the automatic acquisition process of CNC machine tool programs, and has very good application prospects.
[0036] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the entire drawings, the same reference symbols represent the same components;
[0038] Figure 1 A flowchart of a method for autonomously acquiring a program for a CNC machine tool provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of the connection relationship between a distributed DNC server and multiple CNC machine tools provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0041] A specific embodiment of the present invention discloses a method for autonomously acquiring a program for a CNC machine tool, the flow chart of which is as follows: Figure 1 shown.
[0042] First, the technical concept of this embodiment is described as follows. In the method for autonomous program acquisition of CNC machine tools provided in this embodiment, all DNC servers and CNC machine tools form a blockchain, the DNC server publishes production tasks and production programs in the blockchain, and the CNC machine tools autonomously obtain production programs in the blockchain, thereby completing the production tasks. Various types of CNC machine tools can independently decide whether to receive the production task based on their own idle status and production task requirements in the same blockchain P2P network, and autonomously download the corresponding production program after successfully receiving the production task. Below, the specific process of the method for autonomous program acquisition of CNC machine tools is described as follows:
[0043] Step S1: DNC server No. 0 creates the genesis block and initializes the blockchain P2P network.
[0044] Step S1 is the initialization process of the blockchain. The specific process is described as follows:
[0045] Step S11: DNC server No. 0 creates block No. 0 and uses block No. 0 as the genesis block. The genesis block includes the public key and IP address of DNC server No. 0, the public key list and IP address list of other DNC servers and CNC machine tools with known fixed IP addresses.
[0046] Step S12: Each DNC server and CNC machine tool in the genesis block is used as a node, connected to each other through their respective IP addresses, and the blockchain P2P network is initialized.
[0047] In the specific implementation process, the accounting node is used to receive production tasks and verify the validity of transactions. Other DNC servers other than DNC server No. 0 can be selected as accounting nodes. Alternatively, a dedicated accounting node is set up, and the dedicated accounting node is connected to each DNC server and CNC machine tool in the genesis block through their respective IP addresses to initialize the blockchain P2P network.
[0048] In this embodiment, the composition of each block in the blockchain includes: the block number of this block, the hash value of the previous block, the hash value of this block, the random number, the record of this block, and the signature of the accounting node on this block. Among them, the record of the genesis block includes the public key and IP address of DNC server No. 0, the public key and IP address of other DNC servers and CNC machine tools with known fixed IP addresses. In the specific implementation process, the following method is used to verify the validity of each block: the block number of this block, the hash value of the previous block, the record of this block, and the signature of the accounting node on this block are used to generate the hash value of this block. When the hash value of this block is less than the random number, this block is valid. In particular, since there is no previous block for block No. 0, in the specific implementation process, the hash values of the previous blocks of block No. 0 are all set to 0.
[0049] Step S2: The DNC server broadcasts the record of the production task to be released in the blockchain P2P network using a private key signature, and the accounting node records it in the next block in the blockchain and uses it as the latest block in the blockchain.
[0050] In this embodiment, the production task to be released includes: the number of the production task, the release time, the hash value of the production program file, the program acquisition address and the production requirements. Preferably, the production requirements include requirements for CNC machine tools, production quantity and production deadline requirements.
[0051] A record is generated for the production task to be released, forming a record of the production task to be released. After that, the DNC server broadcasts the record of the production task to be released in the blockchain P2P network by using a private key signature. After that, the accounting node receives the record of the production task to be released, and after passing the verification using the public key signature of the DNC server that broadcasts the record of the production task to be released, the record of the production task released by the corresponding DNC server is written into the candidate block of the next block in the blockchain; the validity of the candidate block is verified, and the candidate block that passes the validity verification is published in the blockchain as the next block of the blockchain.
[0052] Exemplarily, assuming that the latest block in the blockchain is block N, the record of the production task published by the DNC server is written into the candidate block of block N+1 in the blockchain, and the candidate block of block N+1 is represented as the N+1 candidate block. The composition of the N+1 candidate block is consistent with that of block 0, including: the block number of block N+1, the Hash of block N, the Hash value of the N+1 candidate block, a random number, the record of the N+1 candidate block (records published by all nodes), and the signature of the accounting node on the N+1 candidate block. The validity of the N+1 candidate block is verified. If the Hash value of the N+1 candidate block < the random number is satisfied, the N+1 candidate block is valid. After that, the N+1 candidate block is published as the N+1 block in the blockchain. At this time, the N+1 block becomes the latest block in the blockchain. Next, the accounting node begins recording the next block, which is block number N+2.
[0053] Step S3: Each CNC machine tool receives the record of the production task issued by the DNC server from the latest block of the blockchain, and determines whether to accept the production task. If accepted, a record of confirming acceptance of the production task issued by the corresponding DNC server is published in the blockchain P2P network through a broadcast message signed by a private key; if the record of confirming acceptance of the production task issued by the corresponding DNC server is recorded by the accounting node in the next block of the blockchain, the task is accepted successfully, and the corresponding CNC machine tool downloads the corresponding production program file according to the record of the production task issued by the DNC server.
[0054] After receiving the record of the production task issued by the DNC server, if the CNC machine tool confirms that it is in an idle state and meets the production requirements of the production task, it will accept the production task and publish a record of confirming the acceptance of the production task issued by the corresponding DNC server in the blockchain P2P network through a broadcast message signed by a private key in the blockchain, including: the number of the production task confirmed to be accepted, the quantity that can be produced, and the production completion time. After that, a record of confirming the acceptance of the production task issued by the corresponding DNC server is published in the blockchain P2P network through a broadcast message signed by a private key. If the record is recorded in the new block by the accounting node, the task is accepted successfully. The corresponding CNC machine tool obtains the production program file according to the program acquisition address in the record of the production task issued by the DNC server, and uses the Hash value of the production program file for verification. If the verification passes, the program is issued successfully.
[0055] In the specific implementation process, if the records of production tasks issued by the DNC server are accepted by multiple CNC machine tools at the same time and eventually exceed the production quantity in the published production tasks, the accounting node will determine the CNC machine tool that accepts the production task based on the order of the records of the CNC machine tool confirming the acceptance of the production tasks issued by the corresponding DNC server and the number of products that can be produced, and record it in the next block of the blockchain; ignore the records of accepting tasks issued by the subsequent CNC machine tools. The CNC machine tool that has not successfully accepted the task continues to wait for other production tasks.
[0056] It should be noted that after the blockchain P2P network is initialized, new CNC machine tools may be added at any time. The following is a description of the process of adding new CNC machine tools to the blockchain.
[0057] When a new CNC machine tool joins the blockchain P2P network, the newly added CNC machine tool joins the blockchain P2P network as a node, maintains its own adjacent nodes, and publishes its own public key in the blockchain P2P network using a broadcast message signed by a private key, which is recorded by the accounting node in the next block of the blockchain.
[0058] The specific implementation of this process is described as follows:
[0059] (1) The newly added CNC machine tool obtains the genesis block (i.e., block 0) (offline or by other means), establishes a connection with the IP address of each node in the genesis block, and obtains the IP addresses of the adjacent nodes of each node in the genesis block.
[0060] It should be noted that by establishing a connection with the IP addresses of each node in the Genesis Block, the newly added CNC machine tool is first linked to the node in the initial P2P network. After that, by obtaining the IP addresses of the adjacent nodes of each node in the Genesis Block, the IP addresses of other newly added nodes after the initial P2P network is built can be obtained.
[0061] (2) The newly added CNC machine tool randomly selects the IP addresses of multiple adjacent nodes and establishes connections with them, listing them as its own adjacent nodes.
[0062] Based on the above operations, the list of adjacent nodes is maintained. At the same time, the new CNC machine tool can also become an adjacent node of other nodes.
[0063] (3) The newly added CNC machine tool obtains all blocks in the current blockchain from its own adjacent nodes, and uses the preset validity principle to verify the validity of each block in the obtained blockchain. It stores the verified blocks locally and is ready to participate in the subsequent maintenance and update of the blockchain.
[0064] Preferably, the validity principle in this embodiment may be:
[0065] 1) Obtain all blocks in the current blockchain from an adjacent node and verify the validity of each block, that is, determine whether the hash value of each block is less than the random number;
[0066] 2) Obtain all blocks in the current blockchain from an adjacent node. If all blocks have passed the signature verification (i.e., the signature of each block is verified using the public key of the accounting node), then all blocks are valid;
[0067] 3) If the contents of the same block in the current blockchain obtained from multiple adjacent nodes correspond to each other, then all blocks are valid.
[0068] (4) The newly added broadcast message method using private key signature publishes itself in the blockchain P2P network, and the accounting node records the broadcast information in the next block of the blockchain.
[0069] At this point, the entire process of the new CNC machine tool joining the blockchain P2P network has been completed. After that, the new CNC machine tool can receive and subsequently process parameter production tasks.
[0070] In summary, the method for autonomous program acquisition of CNC machine tools provided in this embodiment is to broadcast the record of the production task to be released in the blockchain P2P network through the DNC server, and each CNC machine tool determines whether to accept the production task according to the record of the production task released by the DNC server. If accepted, a record of confirming the acceptance of the production task released by the corresponding DNC server is published in the blockchain P2P network through a broadcast message signed by a private key; when the record of accepting the production task released by the corresponding DNC server is recorded in the next block of the blockchain by the accounting node, it indicates that the task is accepted successfully, and the corresponding CNC machine tool downloads the corresponding production program file according to the record of the production task released by the DNC server. By executing the above process, the method in this embodiment can ensure that all program issuance processes are recorded in the blockchain, and any node failure will not affect the entire issuance process, thereby effectively ensuring the reliability and security of the CNC machine tool program acquisition process.
[0071] At the same time, since the method involves multiple DNC servers and multiple CNC machine tools, the method can realize the parallel issuance of multiple production tasks, and the data machine tool can select to accept the corresponding production task according to its own status and the production requirements of each production task. In addition, in this method, the accounting node can also select the CNC machine tool that will finally execute the corresponding production task according to the situation that the CNC machine tool confirms to accept the production task. These CNC machine tools obtain the production program file according to the acquisition address of the program, and verify the validity of the production program file according to the hash value of the production program file, so as to smoothly and autonomously obtain the program to execute the corresponding task. The whole process effectively ensures the effective and smooth implementation of the production task, avoids the overproduction of the production task, and ensures the validity of the production program file. The production program file is not directly released, which ensures the lightness and security of the entire blockchain.
[0072] To sum up, the method for autonomously acquiring programs for CNC machine tools provided in this embodiment has a clear process and strong feasibility, can ensure the reliability and security of the CNC machine tool program acquisition process, and provides good technical guidance for technical personnel in this field to realize the automatic acquisition process of CNC machine tool programs, and has very good application prospects.
[0073] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0074] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for autonomously acquiring a program for a CNC machine tool, characterized in that: The method comprises: DNC server No. 0 creates the genesis block and initializes the blockchain P2P network; The DNC server uses a private key signature to broadcast the record of the production task to be released in the blockchain P2P network, and the accounting node records it in the next block in the blockchain and serves as the latest block in the blockchain; Each CNC machine tool receives the record of the production task issued by the DNC server from the latest block of the blockchain, and determines whether to accept the production task. If accepted, a record of confirming acceptance of the production task issued by the corresponding DNC server is published in the blockchain P2P network through a broadcast message signed by a private key; if the record of confirming acceptance of the production task issued by the corresponding DNC server is recorded by the accounting node in the next block of the blockchain, the task is accepted successfully, and the corresponding CNC machine tool downloads the corresponding production program file according to the record of the production task issued by the DNC server; The DNC server uses a private key signature to broadcast the record of the production task to be released in the blockchain P2P network, which is recorded by the accounting node to the next block in the blockchain and executed: The accounting node receives the record of the production task to be published, and after passing the verification using the public key signature of the DNC server that broadcasts the record of the production task to be published, writes the record of the production task published by the corresponding DNC server into the candidate block of the next block in the blockchain; The validity of the candidate block is verified, and the candidate block that passes the validity verification is published in the blockchain as the next block of the blockchain.
2. The method for autonomously acquiring a program for a CNC machine tool according to claim 1, characterized in that: The production task to be released includes: the number of the production task, the release time, the hash value of the production program file, the acquisition address of the program and the production requirements; Production requirements include requirements for CNC machine tools, production quantity and production deadline requirements.
3. The method for autonomously acquiring a program for a CNC machine tool according to claim 2, characterized in that: Each CNC machine tool uses the following methods to determine whether to accept the production task issued by the DNC server: After receiving the record of the production task issued by the DNC server, if the CNC machine tool confirms that it is in an idle state and meets the production requirements of the production task, it will accept the production task; Afterwards, a record confirming acceptance of the production task issued by the corresponding DNC server is published in the blockchain P2P network by means of a broadcast message signed by a private key in the blockchain; The record of confirming acceptance of the production task issued by the corresponding DNC server includes: the number of the production task confirmed to be accepted, the producible quantity and the production completion time.
4. The method for autonomously acquiring a program for a CNC machine tool according to claim 3, characterized in that: The corresponding CNC machine tool downloads the corresponding production program file according to the record of the production task released by the DNC server and executes: The corresponding CNC machine tool obtains the production program file according to the program acquisition address in the record of the production task released by the DNC server, and uses the Hash value of the production program file for verification. If the verification passes, the program is successfully issued.
5. The method for autonomously acquiring a program for a CNC machine tool according to claim 4, characterized in that: If the records of production tasks issued by the DNC server are accepted by multiple CNC machine tools at the same time and eventually exceed the production quantity in the published production tasks, the accounting node will determine the CNC machine tool that accepts the production task based on the order in which the CNC machine tool publishes and confirms the records of accepting the production tasks issued by the corresponding DNC server and the quantity that can be produced, and record it in the next block of the blockchain; Ignore the subsequent acceptance task records released by the CNC machine tools.
6. The method for autonomously acquiring a program for a CNC machine tool according to any one of claims 2 to 5, characterized in that: The block includes: the block number of the current block, the hash value of the previous block, the hash value of the current block, a random number, the record of the current block, and the signature of the accounting node on the current block; The validity of the block is verified in the following way: the Hash value of this block is generated by using the block number of this block, the Hash value of the previous block, the record of this block and the signature of this block by the accounting node. This block is valid only when the Hash value of this block is less than the random number.
7. The method for autonomously acquiring a program for a CNC machine tool according to claim 6, characterized in that: The method further comprises: When a new CNC machine tool joins the blockchain P2P network, the newly added CNC machine tool joins the blockchain P2P network as a node, maintains its own adjacent nodes, and publishes its own public key in the blockchain P2P network using a broadcast message signed by a private key, which is recorded by the accounting node in the next block of the blockchain.
8. The method for autonomously acquiring a program for a CNC machine tool according to claim 7, characterized in that: The newly added CNC machine tool maintains its neighbor nodes by performing the following operations: The newly added CNC machine tool obtains the genesis block, establishes a connection with the IP address of each node in the genesis block, and obtains the IP address of the adjacent node of each node in the genesis block; The newly added CNC machine tool randomly selects the IP addresses of multiple adjacent nodes and establishes connections with them, listing them as its own adjacent nodes.
9. The method for autonomously acquiring a program for a CNC machine tool according to claim 8, characterized in that: Before the newly added CNC machine tool publishes its own public key in the blockchain P2P network using the private key signature broadcast message method, it also executes: The newly added CNC machine tool obtains all blocks in the current blockchain from its own adjacent nodes, and uses the preset validity principle to verify the validity of each block in the obtained blockchain, and stores each block that has passed the verification locally.
Citation Information
Patent Citations
Accounting method and system for block chain network
CN109086626A
A log storage method and system based on a data center
CN109902074A