A blockchain-based industrial Internet identification product management method and device
Through the blockchain-based industrial Internet identification product management method, the data silos and tampering risks in the product life cycle management system are solved, the data immutability and credibility of data are realized, and the data is transparent and decentralized. Integrated management improves the security and efficiency of the system.
Patent Information
- Application Number
- CN202411070905.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-06
AI Technical Summary
The existing product life cycle management system has data silos, data tampering risks, privacy and security issues, resulting in low efficiency and reduced credibility of data management, difficult to trace the source of the problem, and may face legal and regulatory risks.
Adopt blockchain-based industrial Internet identification product management method to generate unique and tamper-free industrial Internet identification (IIoT ID) through smart contracts and blockchain networks, record and store device information and life cycle events to ensure that data is not possible Tampering and credibility, and improving the system's resistance to attacks through decentralized management.
It realizes the immutability and credibility of data, ensures the transparency and traceability of data, improves the degree of decentralization and security of the system, reduces the complexity and resource investment of data management, and enhances the product Lifecycle events management and recording capabilities.
Smart Images

Figure CN118586042B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial Internet technology, and in particular to a blockchain-based industrial Internet identification product management method and device. Background Art
[0002] With the development of IoT technology, more and more physical products are digitized, and a large amount of data is generated in the processes of manufacturing, logistics, testing and certification. These data are of great value for product quality traceability, supply chain management and market supervision. Digital transformation gives products more information, allowing data from each link to be collected and analyzed, thereby providing support for corporate decision-making. However, the current product lifecycle management system has the problem of data islands. Data from different links are usually managed by different companies or departments, lacking unified standards and interoperability. This decentralized data management method leads to difficulty in data collection, information asymmetry and limited data analysis, which affects the operational efficiency and decision-making accuracy of the enterprise.
[0003] The existing centralized data storage system is at risk of being tampered with, and the authenticity and credibility of the data are difficult to guarantee. Especially in scenarios involving product quality and safety, the problems caused by the risk of data tampering are particularly prominent. Data in centralized storage systems can be easily tampered with or deleted maliciously, resulting in a decrease in the credibility of the data, difficulty in quality traceability, and difficulty for enterprises to accurately locate the source of the problem, affecting the rapid resolution of the problem and accountability. In addition, data tampering may involve legal and regulatory issues. If the data cannot be trusted, the company may face the risk of legal proceedings and regulatory penalties.
[0004] Data in the product life cycle may contain the company's business secrets and the user's privacy information. How to share and utilize data while ensuring data security is a major challenge. In the process of collecting, storing and transmitting product life cycle data, there is a risk of unauthorized access and leakage, which will cause significant losses to enterprises and users. Under the premise of ensuring data privacy and security, it is a complex issue to balance data openness and privacy protection to achieve data sharing and utilization. From manufacturing to scrapping, products have a long life cycle and many links. The amount of data is huge and the sources and formats are diverse. How to efficiently store and manage this data and ensure the integrity and consistency of the data requires complex data processing and verification mechanisms, and comprehensive management of product life cycle data requires a lot of resources. In summary, the current product life cycle management system has significant deficiencies in data silos, data tampering risks, privacy and security issues, and the difficulty of managing data throughout the life cycle. An efficient, secure and reliable solution is urgently needed to meet these challenges. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides an industrial Internet identification product management method and device based on blockchain.
[0006] The first aspect of the present application provides a blockchain-based industrial Internet identification product management method, the method comprising:
[0007] Determine the number of preconfigured timestamp digits, data center ID digits, worker node ID digits, and sequence number digits;
[0008] Determine the offset of the data center ID based on the number of bits in the sequence number and the number of bits in the working node ID, determine the offset of the working node ID based on the number of bits in the sequence number, and determine the offset of the timestamp based on the number of bits in the data center ID, the number of bits in the working node ID and the number of bits in the sequence number;
[0009] Determine the maximum values of the data center ID, the work node ID, and the sequence number respectively;
[0010] Generate a data center ID and a working node ID for the industrial equipment based on the corresponding offsets and maximum values;
[0011] Generate an industrial Internet identification IIoT ID based on the current timestamp, the data center ID and the working node ID;
[0012] Constructing a first mapping relationship between the IIoT ID and the device information of the target industrial device, and storing the first mapping relationship in a preconfigured smart contract, where the smart contract is configured on the target blockchain network;
[0013] An event array is extended on the smart contract, wherein an event function is configured in the event array, and the event function can be called externally, and the life cycle event of the target industrial equipment is obtained through the event function;
[0014] Constructing a second mapping relationship between the IIoT ID of the target industrial device and the event array, and storing the second mapping relationship on the target blockchain network;
[0015] Lifecycle events of industrial equipment are managed based on the first mapping relationship and the second mapping relationship.
[0016] Optionally, determining the offset of the data center ID based on the number of bits of the sequence number and the number of bits of the working node ID includes:
[0017] The offset of the data center ID is determined by the following formula:
[0018] DC_shift=work_ID_bits+sequence_bits;
[0019] Wherein DC_shift represents the offset of the data center ID, work_ID_bits represents the number of bits of the work node ID, and sequence_bits represents the number of bits of the sequence number.
[0020] Optionally, determining the offset of the timestamp based on the number of bits of the data center ID, the number of bits of the working node ID, and the number of bits of the sequence number includes:
[0021] Determined by:
[0022] timestamp_left_shift=work_ID_bits+sequence_bits+DC_bits;
[0023] Among them, timestamp_left_shift represents the offset of the timestamp, work_ID_bits represents the number of bits of the work node ID, sequence_bits represents the number of bits of the sequence number, and DC_bits represents the number of bits of the data center ID.
[0024] Optionally, determined as follows:
[0025] max_datacenter_id=(2^DC_bits)-1;
[0026] max_worker_id=(2^work_ID_bits)-1;
[0027] max_sequence=(2^work_sequence_bits)-1.
[0028] Optionally, generating an industrial Internet identifier IIoT ID based on the current timestamp, the data center ID, and the working node ID includes:
[0029] Get the current timestamp current_timestamp;
[0030] If the current timestamp is equal to the previous timestamp, increase the sequence number sequence;
[0031] If the current timestamp is less than the previous timestamp, the clock is set back;
[0032] Combine the current timestamp, data center ID, work node ID and serial number to generate the IIoT ID;
[0033] The calculation formula of IIoT ID is: IIoT ID=(current_timestamp< <timestamp_shift)∣(datacenter_id<<DC_shift)∣(worker_id<<worker_id_shift)∣sequence;
[0034] Among them, timestamp_shift represents the offset of the timestamp, DC_shift represents the offset of the data center ID, datacenter_id represents the data center ID, worker_id represents the worker node ID, and worker_id_shift represents the offset of the worker node ID.
[0035] Optionally, constructing a first mapping relationship between the IIoT ID and the device information of the target industrial device, and storing the first mapping relationship in a preconfigured smart contract, wherein the smart contract is configured on the target blockchain network and includes:
[0036] A data structure for storing the mapping between the IIoT ID and the device information is defined in the smart contract, wherein the data structure is a mapping, and the IIoT ID is used as a key and the device information is stored in the mapping as a value;
[0037] Deploy the smart contract to the target blockchain network;
[0038] When an industrial device is registered, its corresponding IIoT ID is generated; the device information includes at least the device name, device model, device manufacturer and serial number;
[0039] Map and associate the generated IIoT ID with the device information to form a key-value pair;
[0040] Call the public function storeDeviceInfo in the smart contract and write the mapping relationship between IIoT ID and device information into the smart contract;
[0041] Deploy the smart contract to the target blockchain network.
[0042] Optionally, an event array is extended on the smart contract, an event function is configured in the event array, the event function can be called externally, and obtaining the life cycle event of the target industrial device through the event function includes:
[0043] Define a structure or data type in the smart contract to represent the information of each lifecycle event;
[0044] Declare a dynamic event array for storing all lifecycle events. The event array is used to continuously expand and record new lifecycle events in the smart contract.
[0045] The event information of the lifecycle event is obtained from the external unit through a preconfigured public function, and the event information is added to the event array. The public function allows an external system or other smart contract to call through an interface.
[0046] Optionally, constructing a second mapping relationship between the IIoT ID of the target industrial device and the event array, and storing the second mapping relationship on the target blockchain network includes:
[0047] Define a mapping in the smart contract to associate each IIoT ID with the index of the corresponding event array;
[0048] Configure an index function to store the IIoT ID and the corresponding event array index into the mapping.
[0049] Optionally, the managing of lifecycle events of industrial equipment based on the first mapping relationship and the second mapping relationship includes:
[0050] When the device information changes or needs to be queried, the public function is called through the interface provided by the smart contract to obtain or update the device information corresponding to the IIoT ID;
[0051] Configure one or more functions that allow external systems or other smart contracts to query lifecycle events related to a specific IIoT ID;
[0052] The one or more functions are used to return life cycle events in the event array according to the query condition;
[0053] The one or more functions include at least a getLifecycleEvents function or a getLifecycleEventsByTimeRange.
[0054] The second aspect of the present application provides an industrial Internet identification product management device based on blockchain, the device comprising:
[0055] A bit determination unit, used to determine the number of pre-configured timestamp bits, data center ID bits, work node ID bits, and sequence number bits;
[0056] an offset determination unit, configured to determine an offset of a data center ID based on the number of bits of the sequence number and the number of bits of the working node ID, determine an offset of the working node ID based on the number of bits of the sequence number, and determine an offset of a timestamp based on the number of bits of the data center ID, the number of bits of the working node ID and the number of bits of the sequence number;
[0057] A maximum value determination unit, used to determine the maximum values of the data center ID, the work node ID and the sequence number respectively;
[0058] A basic ID generation unit, used to generate a data center ID and a work node ID for the industrial device based on the corresponding offsets and maximum values;
[0059] A unique ID generating unit, configured to generate an industrial Internet identification IIoT ID based on a current timestamp, the data center ID, and the working node ID;
[0060] A first configuration unit, configured to construct a first mapping relationship between the IIoT ID and device information of a target industrial device, and store the first mapping relationship in a preconfigured smart contract, wherein the smart contract is configured on a target blockchain network;
[0061] An extension unit, configured to extend an event array on the smart contract, wherein the event array is configured with an event function, the event function can be called externally, and the life cycle event of the target industrial device is obtained through the event function;
[0062] A second configuration unit is used to construct a second mapping relationship between the IIoT ID of the target industrial device and the event array, and store the second mapping relationship on the target blockchain network;
[0063] A management unit is used to manage life cycle events of industrial equipment based on the first mapping relationship and the second mapping relationship.
[0064] The third aspect of the present application provides an industrial Internet identification product management device based on blockchain, the device comprising:
[0065] Processor, memory, input-output unit, and bus;
[0066] The processor is connected to the memory, the input and output unit, and the bus;
[0067] The memory stores a program, and the processor calls the program to execute the first aspect and any optional method in the first aspect.
[0068] It can be seen from the above technical solutions that this application has the following advantages:
[0069] 1. Record and store IIoT ID, equipment information and life cycle events through blockchain technology to ensure the immutability and credibility of data. Once the data on the blockchain is recorded, it cannot be modified or deleted, thus enhancing the security and reliability of the data.
[0070] 2. The use of smart contracts and blockchain networks makes it possible to manage and record industrial equipment information and events without relying on a centralized management agency or a single point, thereby improving the system's degree of decentralization and anti-attack capabilities.
[0071] 3. Blockchain technology enables all parties to access and view the data recorded on the chain, ensuring data transparency. In addition, since all modifications and event records are traceable, the complete history and operation process of industrial equipment can be traced. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the technical solution in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0073] Figure 1 This is a flowchart of an embodiment of the industrial Internet identification product management method based on blockchain provided in this application;
[0074] Figure 2 A flowchart of an embodiment of managing life cycle events of industrial equipment in the blockchain-based industrial Internet identification product management method provided in this application;
[0075] Figure 3 This is a schematic diagram of the structure of an embodiment of an industrial Internet identification product management device based on blockchain provided in this application;
[0076] Figure 4 This is a schematic diagram of the structure of an embodiment of another blockchain-based industrial Internet identification product management device provided in this application. DETAILED DESCRIPTION
[0077] It should be noted that the blockchain-based industrial Internet identification product management method provided in this application can be applied to terminals, systems, and servers. For example, the terminal can be a smart phone or computer, tablet computer, smart TV, smart watch, portable computer terminal, or a fixed terminal such as a desktop computer. For the convenience of explanation, this application uses the terminal as the execution subject for example.
[0078] See also Figure 1 , the present application first provides an embodiment of an industrial Internet identification product management method based on blockchain, the embodiment comprising:
[0079] S101, determining the number of pre-configured timestamp digits, data center ID digits, work node ID digits, and sequence number digits;
[0080] Step S101 is the basis of the blockchain-based industrial Internet identification product management method, which ensures that each IIoT ID generated is unique and ordered.
[0081] In this embodiment, various parameters are first initialized and the number of bits of the pre-configured parameters is determined, including:
[0082] timestamp_bits: The number of timestamp bits (can be 41 bits). Refers to the number of bits used to represent the timestamp to ensure uniqueness and order.
[0083] datacenter_id_bits: The number of digits in the data center ID (can be 5 digits). Used to identify different data centers to ensure that the IDs generated in different data centers do not conflict.
[0084] worker_id_bits: The number of bits in the worker node ID (can be 5 bits). It is used to identify different worker nodes in the same data center to ensure that the IDs generated by different nodes in the same data center do not conflict.
[0085] sequence_bits: The number of bits in the sequence number (can be 12 bits). It is used to generate multiple unique IDs at the same timestamp to ensure the uniqueness of the ID under high concurrency.
[0086] The following is an explanation of the meaning of the above digits:
[0087] timestamp_bits: Set to 41 bits, which means that the timestamp can represent 2412^{41}241 time units. This is enough to cover a time range of approximately 69 years (41 bits of binary are enough to represent 69 years of milliseconds).
[0088] datacenter_id_bits: Set to 5 bits, which means 32 datacenters can be supported (0 to 31).
[0089] worker_id_bits: Set to 5 bits, which means each data center can have 32 worker nodes (0 to 31).
[0090] sequence_bits: Set to 12 bits, which means 4096 unique IDs (0 to 4095) can be generated every millisecond.
[0091] In this step, in a distributed system, each data center and worker node can generate IDs independently without conflicting with each other. By predetermining the number of digits, the ID generation process can be effectively managed and coordinated.
[0092] Because each node can generate an ID independently, there is no single point of failure, which improves the reliability and availability of the system.
[0093] By properly configuring the number of bits, multiple data centers and work nodes can be supported to adapt to the expansion of the system scale. The pre-configured number of bits can be adjusted according to actual needs to ensure the flexibility of the system.
[0094] If you need to expand the data center or work nodes in the future, you only need to adjust the corresponding bit configuration without changing the core logic of the ID generation algorithm.
[0095] Calculate the offset: DC_shift, worker_id_shift, timestamp_shift.
[0096] Calculate the maximum values: max_datacenter_id, max_worker_id, max_sequence.
[0097] S102, determining an offset of a data center ID based on the number of bits of the sequence number and the number of bits of the working node ID, determining an offset of the working node ID based on the number of bits of the sequence number, and determining an offset of a timestamp based on the number of bits of the data center ID, the number of bits of the working node ID, and the number of bits of the sequence number;
[0098] In this step, the offset is used to correctly arrange the different parts of the ID (such as timestamp, data center ID, worker node ID, and sequence number) in a 64-bit integer. Each part occupies a different position in the final ID, and the left shift operation puts each part in the correct position.
[0099] Here is a way to calculate the offset:
[0100] DC_shift: The offset of the data center ID, which is equal to the number of bits in the sequence number plus the number of bits in the worker node ID.
[0101] worker_id_shift: The offset of the worker node ID, which is equal to the number of bits in the sequence number.
[0102] timestamp_shift: The timestamp offset, which is equal to the number of bits in the data center ID plus the number of bits in the worker node ID plus the number of bits in the sequence number.
[0103] That is, it is calculated by the following formula:
[0104] The offset of the data center ID is determined by the following formula:
[0105] DC_shift=work_ID_bits+sequence_bits;
[0106] Wherein DC_shift represents the offset of the data center ID, work_ID_bits represents the number of bits of the work node ID, and sequence_bits represents the number of bits of the sequence number.
[0107] The timestamp offset is determined as follows:
[0108] timestamp_left_shift=work_ID_bits+sequence_bits+DC_bits;
[0109] Among them, timestamp_left_shift represents the offset of the timestamp, work_ID_bits represents the number of bits of the work node ID, sequence_bits represents the number of bits of the sequence number, and DC_bits represents the number of bits of the data center ID.
[0110] Here is a calculation example:
[0111] Assumptions:
[0112] sequence_bits = 12;
[0113] worker_id_bits=5;
[0114] datacenter_id_bits=5;
[0115] The offset is:
[0116] DC_shift=sequence_bits+worker_id_bits=12+5=17;
[0117] worker_id_shift=sequence_bits=12;
[0118] timestamp_shift=datacenter_id_bits+worker_id_bits+sequence_bits=5+5+12=22.
[0119] S103, respectively determining the maximum values of the data center ID, the working node ID, and the sequence number;
[0120] In this step, the maximum value is used to define the range of values for each part, ensuring that the generated ID is valid within the specified number of digits. The maximum value of each part depends on the number of digits, calculated by raising 2 to the power of the number of digits minus 1.
[0121] The following is a specific method for determining the maximum value:
[0122] max_datacenter_id: The maximum value of the data center ID, which is equal to 2 to the power of datacenter_id_bits minus 1.
[0123] max_worker_id: The maximum value of the worker node ID, which is equal to 2 to the power of worker_id_bits minus 1.
[0124] max_sequence: The maximum value of the sequence number, which is equal to 2 to the power of sequence_bits minus 1.
[0125] Using mathematical expression:
[0126] max_datacenter_id=(2^DC_bits)-1;
[0127] max_worker_id=(2^work_ID_bits)-1;
[0128] max_sequence=(2^work_sequence_bits)-1;
[0129] Among them, max_datacenter_id represents the maximum number of data center ID digits, max_worker_id represents the maximum number of worker node ID digits, and max_sequence represents the maximum number of timestamp digits.
[0130] The following is an example of calculating the maximum value:
[0131] Assumptions:
[0132] datacenter_id_bits=5;
[0133] worker_id_bits=5;
[0134] sequence_bits = 12;
[0135] The maximum value is:
[0136] max_datacenter_id=2^5-1=31;
[0137] max_worker_id=2^5-1=31;
[0138] max_sequence=2^12-1=4095.
[0139] By calculating the offset and the maximum value, it is ensured that the values of the various parts can be correctly arranged in the unique ID finally generated, thereby ensuring that the generated ID is efficient and unique.
[0140] S104, generating a data center ID and a working node ID for the industrial device based on the corresponding offsets and the maximum value;
[0141] Data Center ID Generation:
[0142] In step S101 , the number of digits of the data center ID (eg, 5 digits) has been determined.
[0143] (1<<number of digits in the data center ID)−1
[0144] Example: If the data center ID is 5 digits long, the maximum value is (1<<5)−1=31
[0145] Generate a unique data center ID:
[0146] Generate data center IDs in a distributed, unique manner, ensuring that each data center ID is between 0 and a maximum value.
[0147] This can be achieved in a variety of ways, such as configuration files, environment variables, or a centralized management system (such as ZooKeeper).
[0148] Here is a code implementation example:
[0149] #Sample Python code
[0150] Import random
[0151] Def generate_datacenter_id(datacenter_bits):
[0152] max_datacenter_id=(1< <datacenter_bits)-1
[0153] #Random numbers are used here to generate data center IDs. In actual applications, distributed unique generation should be used
[0154] datacenter_id=random.randint(0,max_datacenter_id)
[0155] Return datacenter_id
[0156] datacenter_bits=5#The number of digits in the data center ID
[0157] datacenter_id=generate_datacenter_id(datacenter_bits)
[0158] print(f"Generated data center ID:{datacenter_id}")
[0159] Worker node ID generation:
[0160] In step S101 , the number of digits of the working node ID (eg, 5 digits) has been determined.
[0161] Maximum value calculation formula: max_worker_id = (1<<number of digits in the worker node ID) − 1
[0162] Example: If the worker node ID is 5 digits long, the maximum value is (1<<5)−1=31
[0163] Generate a unique worker node ID:
[0164] Generate worker node IDs in a distributed, unique way, ensuring that each worker node ID is between 0 and a maximum value.
[0165] This can be achieved in a variety of ways, such as configuration files, environment variables, or a centralized management system (such as ZooKeeper).
[0166] The specific code implementation method may be similar to the code implementation process of the above data center ID.
[0167] In actual applications, when generating unique data center IDs and working node IDs, it is necessary to avoid conflicts and ensure uniqueness. The following methods can be used:
[0168] You can use a centralized management system (such as ZooKeeper) to assign data center IDs and worker node IDs to ensure that each ID is unique. You can pre-specify unique IDs in the configuration files or environment variables of each data center and worker node. Or use a database table to manage the state of assigned IDs to ensure that each ID is unique. You can also use distributed coordination services (such as Etcd, Consul) to generate and assign unique IDs.
[0169] S105, generating an industrial Internet identification IIoT ID based on the current timestamp, the data center ID and the working node ID;
[0170] In this step, you first need to obtain the timestamp of the current system time.
[0171] Combine the timestamp, data center ID, worker node ID, and serial number to generate a unique IIoT ID.
[0172] The calculation formula is: IIoT ID=(current_timestamp< <timestamp_shift)∣(datacenter_id<<DC_shift)∣(worker_id<<worker_id_shift)∣sequence。
[0173] S106, constructing a first mapping relationship between the IIoT ID and the device information of the target industrial device, and storing the first mapping relationship in a preconfigured smart contract, where the smart contract is configured on the target blockchain network;
[0174] In this step, first define a data structure suitable for storing the mapping between IIoT ID and device information in the smart contract. This can be a mapping that uses IIoT ID as the key and device information as the value.
[0175] Deploy the smart contract to the target blockchain network. Ensure that the contract has sufficient storage space and execution capabilities to handle the mapping relationship between IIoT ID and device information.
[0176] When an industrial device is manufactured or registered, its corresponding IIoT ID is generated. Device information can include important data such as device name, model, and manufacturing time.
[0177] The generated IIoT ID is associated with the device information to form a key-value pair. This mapping relationship uses the IIoT ID as the key and the device information as the corresponding value.
[0178] Call the public function storeDeviceInfo of the smart contract to write the mapping relationship between IIoT ID and device information into the contract. This process ensures that the mapping relationship is securely recorded on the blockchain, ensuring the immutability and credibility of the data.
[0179] In this step, you can also ensure that the smart contract has appropriate access control mechanisms to allow only authorized users or systems to call storage and query functions. This access control can be implemented through role-based permission management or other security mechanisms.
[0180] When the device information changes or needs to be queried, the query interface provided by the smart contract can be used to obtain the device information corresponding to the IIoT ID, or to update the device information.
[0181] If we use Ethereum smart contracts as an example, the public functions may be implemented as follows (based on the Solidity language):
[0182] / / Assume this is a simple storage contract example
[0183] Contract DeviceRegistry{
[0184] mapping(bytes32=>string)public deviceInfo; / / Device information mapping, using IIoTID as the key
[0185] / / Storage function, stores the mapping relationship between IIoTID and device information into the contract
[0186] Function
[0187] storeDeviceInfo(bytes32_iiotId,stringmemory_info)public{
[0188] deviceInfo[_iiotId]=_info;
[0189] In the example above:
[0190] deviceInfo is a mapping that associates and stores IIoTID (byte32 type) and device information (string type).
[0191] storeDeviceInfo is a public function that receives IIoTID and device information as parameters and stores the device information into the deviceInfo map.
[0192] This public function stores the passed IIoTID and device information mapping relationship into the contract state for subsequent query and use.
[0193] S107, extending an event array on the smart contract, wherein the event array is configured with an event function, the event function can be called externally, and the life cycle event of the target industrial equipment is obtained through the event function;
[0194] Expand the event array in the smart contract and configure the event function so that it can be called externally to obtain the life cycle events of the target industrial equipment. Specifically:
[0195] In this step, the management of lifecycle events of industrial equipment based on the first mapping relationship and the second mapping relationship is implemented in the smart contract, which may specifically include:
[0196] Define a structure or data type in the smart contract to represent the information of each lifecycle event; for example, an event may include event type, timestamp, related parameters, etc.
[0197] Declare a dynamic event array for storing all lifecycle events. The event array is used to continuously expand and record new lifecycle events in the smart contract.
[0198] The event information of the lifecycle event is obtained from the external unit through a preconfigured public function, and the event information is added to the event array. The public function allows an external system or other smart contract to call through an interface.
[0199] Write one or more functions that allow external systems or other contracts to query for lifecycle events related to a specific IIoT ID. These query functions can filter and return events in the event array based on conditions such as IIoT ID, time range, etc.
[0200] When a new event is recorded, you can consider triggering an event to notify other contracts or external systems. This can be achieved through an event triggering mechanism to ensure timely propagation and processing of events.
[0201] A specific code implementation example is provided below to describe the implementation process of this embodiment:
[0202] pragma solidity ^0.8.0;
[0203] contract LifecycleManagement {
[0204] / / Define the event structure
[0205] struct LifecycleEvent {
[0206] uint256 timestamp;
[0207] string eventType;
[0208] string eventData;
[0209] }
[0210] / / Mapping of IIoT ID to event array
[0211] mapping(bytes32 =>LifecycleEvent[]) public lifecycleEvents;
[0212] / / Function to record life cycle events
[0213] function recordEvent(bytes32 _iiotId, string memory _eventType, string memory _eventData) public {
[0214] LifecycleEvent memory newEvent = LifecycleEvent({
[0215] timestamp: block.timestamp,
[0216] eventType: _eventType,
[0217] eventData: _eventData
[0218] });
[0219] lifecycleEvents[_iiotId].push(newEvent);
[0220] }
[0221] / / Get a list of lifecycle events for a specific IIoT ID
[0222] function getLifecycleEvents(bytes32 _iiotId) public view returns(LifecycleEvent[] memory) {
[0223] return lifecycleEvents[_iiotId];
[0224] In this example, the LifecycleEvent structure defines the data structure of a lifecycle event, including timestamp, event type, and event data. lifecycleEvents is a map that associates each IIoT ID with its corresponding lifecycle event array. The recordEvent function is used to record a new lifecycle event and add the event to the event array of the corresponding IIoT ID. The getLifecycleEvents function allows external callers to query and get the relevant lifecycle event array based on the IIoT ID.
[0225] Through the above embodiments, smart contracts can effectively manage and record the life cycle events of industrial equipment, and provide external interfaces to query and obtain these events, thereby achieving transparent, traceable and secure storage of life cycle events.
[0226] S108, constructing a second mapping relationship between the IIoT ID of the target industrial device and the event array, and storing the second mapping relationship on the target blockchain network;
[0227] Implement the mapping relationship between the IIoT ID of the target industrial device and the event array in the smart contract, and store this relationship on the blockchain network, which may include:
[0228] Define a mapping in the smart contract to associate each IIoT ID with the index of its corresponding event array. This allows you to quickly find the event array corresponding to the IIoT ID.
[0229] Write a function to store the IIoT ID and its corresponding event array index into a mapping. This mapping can be persistently stored on the blockchain to ensure the trustworthiness and immutability of the data.
[0230] Provides an externally callable function interface that allows querying the corresponding event array index based on the IIoT ID. This interface can help external systems or users easily access all lifecycle events associated with the IIoT ID.
[0231] For example, you can use the iiotsToEventArrays mapping to map each IIoT ID to its corresponding event array index. You can use the mapIIoTToEventArray function to associate and store the IIoT ID and event array index. You can use the getEventArrayIndex function to allow external queries to the event array index corresponding to the IIoT ID. Use the addEvent function to add a new event to the event array corresponding to the IIoT ID, record the event timestamp, event type, and event data, and trigger an event notification.
[0232] Through such a design, smart contracts can effectively manage the mapping relationship between IIoT ID and event array, and ensure the secure storage and reliable access of these mapping relationships, thereby providing a transparent and traceable management mechanism for the life cycle events of industrial equipment.
[0233] S109: Manage lifecycle events of industrial equipment based on the first mapping relationship and the second mapping relationship.
[0234] Through these mapping relationships, smart contracts can effectively manage and record the life cycle events of industrial equipment, ensuring the security, reliability and traceability of data.
[0235] Specifically, in an optional embodiment, the present application further provides an embodiment of managing life cycle events of industrial equipment based on the first mapping relationship and the second mapping relationship, that is, a specific implementation of step S109, which includes:
[0236] S1091. When the device information changes or needs to be queried, the public function is called through the interface provided by the smart contract to obtain or update the device information corresponding to the IIoT ID;
[0237] S1092. Configure one or more functions, wherein the one or more functions allow an external system or other smart contract to query lifecycle events related to a specific IIoT ID;
[0238] S1093, the one or more functions are used to return the life cycle events in the event array according to the query condition;
[0239] In this embodiment, the one or more functions include at least a getLifecycleEvents function or a getLifecycleEventsByTimeRange.
[0240] In this embodiment, it is necessary to first define an event structure, including information such as timestamp, event type, event data, etc. A mapping relationship structure is defined to map the IIoT ID to the event array index.
[0241] Create a function to store the IIoT ID with the device information and its first mapping relationship in the smart contract. This mapping relationship maps the IIoT ID to the device information and its index in the event array.
[0242] Create a function to store the mapping relationship between IIoT ID and event array index in the smart contract. This mapping relationship is used to quickly find the event array corresponding to the IIoT ID.
[0243] Creates a function that allows logging new lifecycle events into the events array corresponding to a specific IIoT ID.
[0244] Create a function that allows external querying of all lifecycle events for a specific IIoT ID.
[0245] The following is a partial implementation of a sample smart contract, which demonstrates how to manage the lifecycle events of industrial equipment through mapping relationships:
[0246] The following is a specific code implementation example:
[0247] pragma solidity ^0.8.0;
[0248] contract LifecycleManagement {
[0249] / / Event structure
[0250] struct LifecycleEvent {
[0251] uint256 timestamp;
[0252] string eventType;
[0253] string eventData;
[0254] }
[0255] / / Mapping of IIoT ID to device information and first mapping relationship
[0256] mapping(bytes32 =>DeviceInfo) public iotsToDevice;
[0257] / / Mapping of IIoT ID to event array index
[0258] mapping(bytes32 =>uint256) public iotsToEventArrayIndex;
[0259] / / Mapping of IIoT ID to event array
[0260] mapping(bytes32 =>LifecycleEvent[]) public iotsToEvents;
[0261] / / Device information structure
[0262] struct DeviceInfo {
[0263] string name;
[0264] string description;
[0265] uint256 manufacturingTime;
[0266] / / Other device information fields...
[0267] }
[0268] / / Store IIoT ID and device information and their first mapping relationship
[0269] function storeDeviceInfo(bytes32 _iiotId, string memory _name, stringmemory _description, uint256 _manufacturingTime) public {
[0270] DeviceInfo memory deviceInfo = DeviceInfo({
[0271] name: _name,
[0272] description: _description,
[0273] manufacturingTime: _manufacturingTime
[0274] });
[0275] iotsToDevice[_iiotId] = deviceInfo;
[0276] }
[0277] / / Store the mapping between IIoT ID and event array index
[0278] function mapIIoTToEventArray(bytes32 _iiotId, uint256 _eventArrayIndex) public {
[0279] iotsToEventArrayIndex[_iiotId] = _eventArrayIndex;
[0280] }
[0281] / / Record lifecycle events into the event array corresponding to the IIoT ID
[0282] function recordEvent(bytes32 _iiotId, uint256 _timestamp, stringmemory _eventType, string memory _eventData) public {
[0283] LifecycleEvent memory newEvent = LifecycleEvent({
[0284] timestamp: _timestamp,
[0285] eventType: _eventType,
[0286] eventData: _eventData
[0287] });
[0288] iotsToEvents[_iiotId].push(newEvent);
[0289] }
[0290] / / Query all lifecycle events corresponding to the IIoT ID
[0291] function getLifecycleEvents(bytes32 _iiotId) public view returns(LifecycleEvent[] memory) {
[0292] return iotsToEvents[_iiotId];
[0293] In this example: The DeviceInfo structure defines the basic information of the device, including name, description, and manufacturing time. The iiotsToDevice mapping maps each IIoT ID to its corresponding device information. The iiotsToEventArrayIndex mapping maps each IIoT ID to its corresponding event array index. The iiotsToEvents mapping maps each IIoT ID to its corresponding lifecycle event array.
[0294] The above is a detailed description of an embodiment of the method provided in the present application. The following is a detailed description of an embodiment of the blockchain-based industrial Internet identification product management device provided in the present application.
[0295] See also Figure 3 , this application provides an embodiment of an industrial Internet identification product management device based on blockchain, which includes:
[0296] A bit determination unit 301 is used to determine the number of preconfigured timestamp bits, data center ID bits, work node ID bits, and sequence number bits;
[0297] An offset determination unit 302 is used to determine an offset of a data center ID based on the number of bits in the sequence number and the number of bits in the working node ID, determine an offset of the working node ID based on the number of bits in the sequence number, and determine an offset of a timestamp based on the number of bits in the data center ID, the number of bits in the working node ID, and the number of bits in the sequence number;
[0298] A maximum value determination unit 303, used to determine the maximum values of the data center ID, the working node ID and the sequence number respectively;
[0299] A basic ID generation unit 304, used to generate a data center ID and a working node ID for the industrial device based on the corresponding offsets and maximum values;
[0300] A unique ID generating unit 305 is used to generate an industrial Internet identification IIoT ID based on the current timestamp, the data center ID and the working node ID;
[0301] A first configuration unit 306 is used to construct a first mapping relationship between the IIoT ID and the device information of the target industrial device, and store the first mapping relationship in a preconfigured smart contract, where the smart contract is configured on the target blockchain network;
[0302] An extension unit 307 is used to extend an event array on the smart contract, wherein the event array is configured with an event function, the event function can be called externally, and the life cycle event of the target industrial device is obtained through the event function;
[0303] A second configuration unit 308 is used to construct a second mapping relationship between the IIoT ID of the target industrial device and the event array, and store the second mapping relationship on the target blockchain network;
[0304] The management unit 309 is configured to manage lifecycle events of the industrial equipment based on the first mapping relationship and the second mapping relationship.
[0305] Optionally, the offset determination unit 302 is specifically configured to:
[0306] The offset of the data center ID is determined by the following formula:
[0307] DC_shift=work_ID_bits+sequence_bits;
[0308] Wherein DC_shift represents the offset of the data center ID, work_ID_bits represents the number of bits of the work node ID, and sequence_bits represents the number of bits of the sequence number.
[0309] Optionally, the offset determination unit 302 is specifically configured to:
[0310] Determined by:
[0311] timestamp_left_shift=work_ID_bits+sequence_bits+DC_bits;
[0312] Among them, timestamp_left_shift represents the offset of the timestamp, work_ID_bits represents the number of bits of the work node ID, sequence_bits represents the number of bits of the sequence number, and DC_bits represents the number of bits of the data center ID.
[0313] The maximum value determination unit 303 is specifically used for:
[0314] The maximum value is determined as follows:
[0315] max_datacenter_id=(2^DC_bits)-1;
[0316] max_worker_id=(2^work_ID_bits)-1;
[0317] max_sequence=(2^work_sequence_bits)-1;
[0318] Among them, max_datacenter_id represents the maximum number of data center ID digits, max_worker_id represents the maximum number of worker node ID digits, and max_sequence represents the maximum number of timestamp digits.
[0319] The unique ID generating unit 305 is specifically used for:
[0320] Get the current timestamp current_timestamp;
[0321] If the current timestamp is equal to the previous timestamp, increase the sequence number sequence;
[0322] If the current timestamp is less than the previous timestamp, the clock is set back;
[0323] The current timestamp, data center ID, worker node ID, and serial number are combined to generate the IIoT ID.
[0324] Optionally, the first configuration unit 306 is specifically configured to:
[0325] A data structure for storing the mapping between the IIoT ID and the device information is defined in the smart contract, wherein the data structure is a mapping, and the IIoT ID is used as a key and the device information is stored in the mapping as a value;
[0326] Deploy the smart contract to the target blockchain network;
[0327] When an industrial device is registered, its corresponding IIoT ID is generated; the device information includes at least the device name, device model, device manufacturer and serial number;
[0328] Map and associate the generated IIoT ID with the device information to form a key-value pair;
[0329] Call the public function storeDeviceInfo in the smart contract and write the mapping relationship between IIoT ID and device information into the smart contract;
[0330] Deploy the smart contract to the target blockchain network.
[0331] Optionally, the extension unit 307 is specifically used for:
[0332] Define a structure or data type in the smart contract to represent the information of each lifecycle event;
[0333] Declare a dynamic event array for storing all lifecycle events. The event array is used to continuously expand and record new lifecycle events in the smart contract.
[0334] The event information of the lifecycle event is obtained from the external unit through a preconfigured public function, and the event information is added to the event array. The public function allows an external system or other smart contract to call through an interface.
[0335] Optionally, the second configuration unit 308 is specifically configured to:
[0336] Define a mapping in the smart contract to associate each IIoT ID with the index of the corresponding event array;
[0337] Configure an index function to store the IIoT ID and the corresponding event array index into the mapping.
[0338] Optionally, the management unit 309 is specifically configured to:
[0339] When the device information changes or needs to be queried, the public function is called through the interface provided by the smart contract to obtain or update the device information corresponding to the IIoT ID;
[0340] Configure one or more functions that allow external systems or other smart contracts to query lifecycle events related to a specific IIoT ID;
[0341] The one or more functions are used to return life cycle events in the event array according to the query condition;
[0342] The one or more functions include at least a getLifecycleEvents function or a getLifecycleEventsByTimeRange.
[0343] See also Figure 4 , the present application also provides an industrial Internet identification product management device based on blockchain, including:
[0344] Processor 401, memory 402, input and output unit 403, bus 404;
[0345] The processor 401 is connected to the memory 402, the input and output unit 403 and the bus 404;
[0346] The memory 402 stores a program, and the processor 401 calls the program to execute any of the above blockchain-based industrial Internet identification product management methods.
[0347] The present application also relates to a computer-readable storage medium on which a program is stored, and the characteristic is that when the program runs on a computer, the computer executes any of the above-mentioned industrial Internet identification product management methods based on blockchain.
[0348] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0349] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0350] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0351] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0352] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A blockchain-based industrial Internet identification product management method, characterized in that: The method comprises: Determine the number of preconfigured timestamp digits, data center ID digits, worker node ID digits, and sequence number digits; Determine the offset of the data center ID based on the number of bits in the sequence number and the number of bits in the working node ID, determine the offset of the working node ID based on the number of bits in the sequence number, and determine the offset of the timestamp based on the number of bits in the data center ID, the number of bits in the working node ID and the number of bits in the sequence number; Determine the maximum values of the data center ID, the work node ID, and the sequence number respectively; Generate a data center ID and a working node ID for the industrial equipment based on the corresponding offsets and maximum values; Generate an industrial Internet identification IIoTID based on the current timestamp, the data center ID and the working node ID; Constructing a first mapping relationship between the IIoT ID and the device information of the target industrial device, and storing the first mapping relationship in a preconfigured smart contract, where the smart contract is configured on the target blockchain network; An event array is extended on the smart contract, wherein an event function is configured in the event array, and the event function can be called externally, and the life cycle event of the target industrial equipment is obtained through the event function; Constructing a second mapping relationship between the IIoT ID of the target industrial device and the event array, and storing the second mapping relationship on the target blockchain network; Managing lifecycle events of industrial equipment based on the first mapping relationship and the second mapping relationship; The step of constructing a first mapping relationship between the IIoT ID and the device information of the target industrial device, and storing the first mapping relationship in a preconfigured smart contract, wherein the smart contract is configured on the target blockchain network and includes: A data structure for storing the mapping between the IIoT ID and the device information is defined in the smart contract, wherein the data structure is a mapping, and the IIoT ID is used as a key and the device information is stored in the mapping as a value; Deploy the smart contract to the target blockchain network; When an industrial device is registered, its corresponding IIoT ID is generated; the device information includes at least the device name, device model, device manufacturer and serial number; Map and associate the generated IIoT ID with the device information to form a key-value pair; Call the public function storeDeviceInfo in the smart contract and write the mapping relationship between IIoT ID and device information into the smart contract; Deploy the smart contract to the target blockchain network; An event array is extended on the smart contract, wherein an event function is configured in the event array, and the event function can be called externally, and the life cycle events of the target industrial equipment are obtained through the event function, including: Define a structure or data type in the smart contract to represent the information of each lifecycle event; Declare a dynamic event array for storing all lifecycle events. The event array is used to continuously expand and record new lifecycle events in the smart contract. Obtaining event information of lifecycle events from an external unit through a preconfigured public function, and adding the event information to the event array, wherein the public function allows an external system or other smart contract to call through an interface; The generating of the industrial Internet identification IIoT ID based on the current timestamp, the data center ID and the working node ID includes: Get the current timestamp current_timestamp; If the current timestamp is equal to the previous timestamp, increase the sequence number sequence; If the current timestamp is less than the previous timestamp, the clock is set back; Combine the current timestamp, data center ID, work node ID and serial number to generate the IIoT ID; The calculation formula of IIoT ID is: IIoT ID=(current_timestamp< <timestamp_shift)∣(datacenter_id<<DC_shift)∣(worker_id<<worker_id_shift)∣sequence; Among them, timestamp_shift represents the offset of the timestamp, DC_shift represents the offset of the data center ID, datacenter_id represents the data center ID, worker_id represents the worker node ID, and worker_id_shift represents the offset of the worker node ID.
2. According to the blockchain-based industrial Internet identification product management method described in claim 1, it is characterized in that: Determining the offset of the data center ID based on the number of bits of the sequence number and the number of bits of the working node ID includes: The offset of the data center ID is determined by the following formula: DC_shift=work_ID_bits+sequence_bits; Wherein DC_shift represents the offset of the data center ID, work_ID_bits represents the number of bits of the work node ID, and sequence_bits represents the number of bits of the sequence number.
3. According to the blockchain-based industrial Internet identification product management method described in claim 2, it is characterized in that: Determining the offset of the timestamp based on the number of bits of the data center ID, the number of bits of the working node ID, and the number of bits of the sequence number includes: Determined by: timestamp_left_shift=work_ID_bits+sequence_bits+DC_bits; Among them, timestamp_left_shift represents the offset of the timestamp, work_ID_bits represents the number of bits of the work node ID, sequence_bits represents the number of bits of the sequence number, and DC_bits represents the number of bits of the data center ID.
4. According to the blockchain-based industrial Internet identification product management method described in claim 3, it is characterized in that: The maximum value is determined as follows: max_datacenter_id=(2^DC_bits)-1; max_worker_id=(2^work_ID_bits)-1; max_sequence=(2^work_sequence_bits)-1; Among them, max_datacenter_id represents the maximum number of data center ID digits, max_worker_id represents the maximum number of worker node ID digits, and max_sequence represents the maximum number of timestamp digits.
5. According to the blockchain-based industrial Internet identification product management method described in claim 1, it is characterized in that: The step of constructing a second mapping relationship between the IIoT ID of the target industrial device and the event array, and storing the second mapping relationship on the target blockchain network includes: Define a mapping in the smart contract to associate each IIoT ID with the index of the corresponding event array; Configure an index function to store the IIoT ID and the corresponding event array index into the mapping.
6. According to the blockchain-based industrial Internet identification product management method described in claim 1, it is characterized in that: The managing of lifecycle events of industrial equipment based on the first mapping relationship and the second mapping relationship includes: When the device information changes or needs to be queried, the public function is called through the interface provided by the smart contract to obtain or update the device information corresponding to the IIoT ID; Configure one or more functions that allow external systems or other smart contracts to query lifecycle events related to a specific IIoT ID; The one or more functions are used to return life cycle events in the event array according to the query condition; The one or more functions include at least a getLifecycleEvents function or a getLifecycleEventsByTimeRange.
7. An industrial Internet identification product management device based on blockchain, characterized in that: The device comprises: A bit determination unit, used to determine the number of pre-configured timestamp bits, data center ID bits, work node ID bits, and sequence number bits; an offset determination unit, configured to determine an offset of a data center ID based on the number of bits of the sequence number and the number of bits of the working node ID, determine an offset of the working node ID based on the number of bits of the sequence number, and determine an offset of a timestamp based on the number of bits of the data center ID, the number of bits of the working node ID and the number of bits of the sequence number; A maximum value determination unit, used to determine the maximum values of the data center ID, the work node ID and the sequence number respectively; A basic ID generation unit, used to generate a data center ID and a work node ID for the industrial device based on the corresponding offsets and maximum values; A unique ID generating unit, configured to generate an industrial Internet identification IIoT ID based on a current timestamp, the data center ID, and the working node ID; A first configuration unit, configured to construct a first mapping relationship between the IIoT ID and device information of a target industrial device, and store the first mapping relationship in a preconfigured smart contract, wherein the smart contract is configured on a target blockchain network; An extension unit, configured to extend an event array on the smart contract, wherein the event array is configured with an event function, the event function can be called externally, and the life cycle event of the target industrial device is obtained through the event function; A second configuration unit is used to construct a second mapping relationship between the IIoT ID of the target industrial device and the event array, and store the second mapping relationship on the target blockchain network; A management unit, configured to manage lifecycle events of industrial equipment based on the first mapping relationship and the second mapping relationship; The first configuration unit is specifically used for: A data structure for storing the mapping between the IIoT ID and the device information is defined in the smart contract, wherein the data structure is a mapping, and the IIoT ID is used as a key and the device information is stored in the mapping as a value; Deploy the smart contract to the target blockchain network; When an industrial device is registered, its corresponding IIoT ID is generated; the device information includes at least the device name, device model, device manufacturer and serial number; Map and associate the generated IIoT ID with the device information to form a key-value pair; Call the public function storeDeviceInfo in the smart contract and write the mapping relationship between IIoT ID and device information into the smart contract; Deploy the smart contract to the target blockchain network; The expansion unit is specifically used for: Define a structure or data type in the smart contract to represent the information of each lifecycle event; Declare a dynamic event array for storing all lifecycle events. The event array is used to continuously expand and record new lifecycle events in the smart contract. Obtaining event information of lifecycle events from an external unit through a preconfigured public function, and adding the event information to the event array, wherein the public function allows an external system or other smart contract to call through an interface; The unique ID generation unit is specifically used for: Get the current timestamp current_timestamp; If the current timestamp is equal to the previous timestamp, increase the sequence number sequence; If the current timestamp is less than the previous timestamp, the clock is set back; Combine the current timestamp, data center ID, work node ID and serial number to generate the IIoT ID; The calculation formula of IIoT ID is: IIoT ID=(current_timestamp< <timestamp_shift)∣(datacenter_id<<DC_shift)∣(worker_id<<worker_id_shift)∣sequence; Among them, timestamp_shift represents the offset of the timestamp, DC_shift represents the offset of the data center ID, datacenter_id represents the data center ID, worker_id represents the worker node ID, and worker_id_shift represents the offset of the worker node ID.
8. An industrial Internet identification product management device based on blockchain, characterized in that: The device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 6.
