A method and system for test data management of an embedded product

By dividing the blockchain network into multiple zone networks and selecting the best performance network for storage in the traditional method, the problem of large consumption of blockchain storage resources is solved, and more efficient storage resource utilization and faster response speed is achieved.

CN118944887BActive Publication Date: 2025-06-10深圳市云希谷科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411101928.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2025-06-10
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

When traditional methods store test data in embedded products, they need to mobilize the entire blockchain network and each storage node, resulting in a huge consumption of blockchain storage resources and lack of technical means to effectively reduce the consumption of storage resources.

Method used

By receiving test instructions for embedded products, locking the products to be tested and testing devices, generating test data and dividing the data traceability management network into multiple area networks, selecting the area network with the best network performance for storage, and selecting security nodes and verification nodes from other area networks to split and store the test data.

Benefits of technology

It reduces the burden on a single blockchain network, improves the storage efficiency of the overall network, ensures that test data is stored in the network with the best performance, improves the utilization rate and response speed of storage resources, and enhances the security of the network and the accuracy of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118944887B_ABST
    Figure CN118944887B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of test data storage, and discloses a test data management method for an embedded product, including: receiving test data generated when the embedded product is in use, and starting a data traceability management network where the embedded product is located. Based on the generation location and data volume of the test data, perform network division on the data traceability management network to obtain at least two data traceability area networks, select the data traceability area network with the highest network performance value to obtain the optimal traceability area network, and select security nodes and verification nodes from the chain nodes included in other data traceability area networks. Perform a splitting operation on the test data to obtain multiple groups of test sub-data, store the multiple groups of test sub-data without repetition in the chain nodes included in the optimal traceability area network, and when the storage is completed, generate an access key using the security node and transmit the access key back to the verification node. The present invention can improve the utilization efficiency of the storage resources of the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and system for managing test data of an embedded product, and belongs to the technical field of test data storage. Background Art

[0002] Before an embedded product is put into use, a large number of tests need to be performed. How to manage the generated test data is a key link to ensure the normal operation of the product. With its characteristics of immutability, decentralization, and transparency, blockchain technology provides an innovative solution for test data traceability. Since blockchain technology allows test data to be securely stored and shared among multiple nodes, it ensures the integrity and traceability of the data. In addition, blockchain can also provide real-time supply chain management to help embedded enterprises and users understand each transfer link of the embedded product, thereby improving the usage and learning efficiency of the embedded product.

[0003] Although blockchain technology shows great potential in the testing of embedded products, traditional methods generally directly apply blockchain technology, that is, each block in the blockchain is used as a storage node, and the test data generated by the embedded product is directly stored in each storage node. Although this method can also achieve the purpose of traceability management, each time test data is stored, the entire huge blockchain network and each storage node in the network need to be mobilized, which greatly consumes the storage resources of the entire blockchain. How to reasonably utilize blockchain to achieve traceability management of test data is a technical problem that needs to be solved urgently.

[0004] That is, there is still a lack of a technical means to reduce the storage resource consumption of the blockchain at present. Summary of the Invention

[0005] The present invention provides a method, device, and computer-readable storage medium for managing test data of an embedded product, and its main purpose is to improve the utilization efficiency of the storage resources of the blockchain.

[0006] To achieve the above object, a method for managing test data of an embedded product provided by the present invention includes:

[0007] Receiving a test instruction of an embedded product, and locking the embedded product to be tested and the product test device for testing the embedded product according to the test instruction;

[0008] Sending the test configuration file of the product test device to the initiator of the test instruction, and receiving the modified configuration file obtained after the initiator modifies the test configuration file;

[0009] Starting the product test device to directly enter the product test process, and testing the embedded product based on the modified configuration file to obtain test data;

[0010] Start the data traceability management network where the embedded product is located. The data traceability management network is constructed by a blockchain and consists of K chain nodes, where K ≥ 1;

[0011] Based on the generation location and data volume of the test data, perform network partitioning on the data traceability management network to obtain at least two data traceability sub-network areas, and each data traceability sub-network area consists of N chain nodes, where N ≤ K;

[0012] Calculate the network performance value of each data traceability sub-network area, select the data traceability sub-network area with the highest network performance value to obtain the optimal traceability sub-network area, and select security nodes and verification nodes from the chain nodes included in other data traceability sub-network areas;

[0013] Perform a splitting operation on the test data to obtain multiple groups of test sub-data, where the number of groups of test sub-data needs to be greater than or equal to the number of chain nodes included in the optimal traceability sub-network area;

[0014] Store the multiple groups of test sub-data without repetition in the chain nodes included in the optimal traceability sub-network area. When the storage is completed, use the security node to generate an access key and send the access key back to the verification node to complete the test of the embedded product.

[0015] Optionally, the performing network partitioning on the data traceability management network based on the generation location and data volume of the test data to obtain at least two data traceability sub-network areas includes:

[0016] Obtain the local IP of the embedded product and the transmission IP for transmitting the test data, and determine whether the local IP and the transmission IP are in the same network;

[0017] If the local IP and the transmission IP are not in the same network, prohibit performing network partitioning on the data traceability management network and generate an abnormal reminder instruction for the test data;

[0018] If the local IP and the transmission IP are in the same network, after using the subnet mask of the transmission IP as the generation location of the test data, determine the data volume of the test data;

[0019] Determine the radius with the generation location of the test data as the center point to construct a screening range;

[0020] Select the chain nodes belonging to the screening range from the data traceability management network;

[0021] Perform clustering on the chain nodes belonging to the screening range based on the data volume of the test data to obtain at least two data traceability sub-network areas.

[0022] Optionally, clustering is performed on the chain nodes belonging to the screening range based on the data volume of the test data to obtain at least two data traceability area networks, including:

[0023] Receiving the number of iterations set by the operator of the embedded product, and simultaneously calculating the number of cluster centers according to the data volume of the test data, where the number of cluster centers is greater than or equal to 2;

[0024] Setting the geographical coordinates of each cluster center, where the number of geographical coordinates is the same as the number of cluster centers;

[0025] Calculating the distance values between each chain node belonging to the screening range and each cluster center according to the geographical coordinates;

[0026] Adjusting the cluster center to which each chain node belongs according to the distance values;

[0027] Judging the relationship between the number of adjustments for adjusting the cluster center to which each chain node belongs and the number of iterations. If the number of adjustments for adjusting the cluster center to which each chain node belongs is less than the number of iterations, return to the step of calculating the distance values;

[0028] Until the number of adjustments for adjusting the cluster center to which each chain node belongs is greater than or equal to the number of iterations, eliminating the cluster centers without chain nodes, and determining the remaining cluster centers and the included chain nodes as data traceability area networks, obtaining at least two data traceability area networks, and the number of data traceability area networks is less than or equal to the number of cluster centers.

[0029] Optionally, the calculating the number of cluster centers according to the data volume of the test data includes:

[0030] Calculating the number of cluster centers according to the following formula:

[0031] ;

[0032] where H represents the number of cluster centers, [ ] represents the rounding symbol, represents the data volume of the test data generated when the i-th embedded product is used, represents the standard data volume of the test data generated when the i-th embedded product is used, and are weight factors that can be set by the operator of the embedded product.

[0033] Optionally, the calculating the network performance value of each data traceability area network includes:

[0034] Obtaining the storage records and performance indicators of all the chain nodes in the data traceability area network during the historical time period;

[0035] Quantifying the performance value according to the performance indicators, and extracting the storage data volume and storage duration from the storage records;

[0036] The chain nodes are divided into high - activity nodes, medium - activity nodes, and low - activity nodes according to the activity of the chain nodes in the historical time period;

[0037] Based on the high - activity nodes, medium - activity nodes, and low - activity nodes, weights are assigned to the corresponding performance value, stored data volume, and storage duration to obtain a weighted performance value, weighted stored data volume, and weighted storage duration;

[0038] Based on the weighted performance value, weighted stored data volume, and weighted storage duration, the network performance value of the data traceability area network is calculated.

[0039] Optionally, the step of dividing the chain nodes into high - activity nodes, medium - activity nodes, and low - activity nodes according to the activity of the chain nodes in the historical time period includes:

[0040] Obtain the number of storage operations completed by the chain node in the historical time period;

[0041] The activity of the chain node in the historical time period is calculated according to the following formula:

[0042] ;

[0043] where, represents the activity of the i - th chain node in the j - th data traceability area network in the historical time period, t represents the duration of the historical time period, represents the number of storage operations completed by the i - th chain node in the j - th data traceability area network in the historical time period, represents the storage quantization value of the i - th chain node in the j - th data traceability area network when performing the th storage;

[0044] When the activity is greater than or equal to the first activity threshold, the chain node is determined to be a high - activity node;

[0045] When the activity is less than the first activity threshold and greater than or equal to the second activity threshold, the chain node is determined to be a medium - activity node;

[0046] When the activity is less than the second activity threshold, the chain node is determined to be a low - activity node.

[0047] Optionally, the calculation of the storage quantization value includes:

[0048] ;

[0049] where, represents the data volume of the test data stored by the i - th chain node in the j - th data traceability area network when performing the th storage.

[0050] Optionally, calculating the network performance value of the data traceability area network based on the weighted performance value, weighted stored data volume, and weighted storage duration includes:

[0051] Normalize the weighted performance value, weighted stored data volume, and weighted storage duration to obtain a normalized performance value, a normalized stored data volume, and a normalized storage duration respectively;

[0052] Accumulate the normalized performance value, normalized stored data volume, and normalized storage duration of all chain nodes to obtain an accumulated performance value, an accumulated stored data volume, and an accumulated storage duration, where the accumulation operation is:

[0053] ;

[0054] ;

[0055] ;

[0056] Wherein, , and respectively represent the accumulated performance value, the accumulated stored data volume, and the accumulated storage duration of the j-th data traceability area network, u represents the total number of chain nodes included in the j-th data traceability area network, , and respectively represent the normalized performance value, the normalized stored data volume, and the normalized storage duration of the i-th chain node in the j-th data traceability area network;

[0057] Calculate the network performance value of the data traceability area network according to the following formula:

[0058] ;

[0059] Wherein, represents the network performance value of the j-th data traceability area network, is the weight factor for calculating the network performance value of the j-th data traceability area network.

[0060] Optionally, selecting security nodes and verification nodes from the chain nodes included in other data traceability area networks includes:

[0061] Determine the data security verification network as the data traceability area network with the second-highest network performance value;

[0062] Obtain the performance metrics of each chain node in the data security verification network within a historical time period, and quantify them to obtain performance values;

[0063] Select the chain node with the highest performance value as the security node, and select the chain node with the second-highest performance value as the verification node.

[0064] To achieve the above object, the present invention also provides a test data management system for an embedded product, including:

[0065] A test data receiving module, configured to receive a test instruction of the embedded product, lock the embedded product to be tested and the product test device for testing the embedded product according to the test instruction, send the test configuration file of the product test device to the initiator of the test instruction, and receive the modified configuration file obtained after the initiator modifies the test configuration file, start the product test device to directly enter the product test process, and test the embedded product based on the modified configuration file to obtain test data, start the data traceability management network where the embedded product is located, where the data traceability management network is constructed by a blockchain, and the data traceability management network is composed of K chain nodes, K≥1;

[0066] A network partitioning module, configured to perform network partitioning on the data traceability management network based on the generation location and data volume of the test data to obtain at least two data traceability area networks, and each data traceability area network is composed of N chain nodes, N≤K:

[0067] A area network selection module, configured to calculate the network performance value of each data traceability area network, and select the data traceability area network with the highest network performance value to obtain the optimal traceability area network, and select the security node and the verification node from the chain nodes included in other data traceability area networks;

[0068] A test data storage module, configured to perform a splitting operation on the test data to obtain multiple groups of test sub-data, where the number of groups of test sub-data needs to be greater than or equal to the number of chain nodes included in the optimal traceability area network, store the multiple groups of test sub-data without repetition in the chain nodes included in the optimal traceability area network, and when the storage is completed, use the security node to generate an access key and send the access key back to the verification node to complete the test of the embedded product.

[0069] To solve the above problems, the present invention also provides an electronic device, where the electronic device includes:

[0070] At least one processor; and,

[0071] A memory communicatively connected to the at least one processor; wherein,

[0072] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the above-mentioned test data management method for the embedded product.

[0073] To solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned test data management method for embedded products.

[0074] Compared with the problems described in the background art, the present invention first receives a test instruction of an embedded product, locks the embedded product to be tested and the product test device for testing the embedded product according to the test instruction, sends the test configuration file of the product test device to the initiator of the test instruction, and receives the modified configuration file obtained after the initiator modifies the test configuration file, starts the product test device to directly enter the product test process, and tests the embedded product based on the modified configuration file to obtain test data, and starts the data traceability management network where the embedded product is located. Among them, the data traceability management network is constructed by a blockchain. Based on the generation location and data volume of the test data, the network division is performed on the data traceability management network to obtain at least two data traceability area networks. By performing network division based on the generation location and data volume of the test data, multiple smaller data traceability area networks are obtained, rather than storing all data in a single large blockchain network, thereby reducing the burden on a single blockchain network and improving the storage efficiency of the overall network; then, calculate the network performance value of each data traceability area network, and select the data traceability area network with the highest network performance value to obtain the optimal traceability area network, and select security nodes and verification nodes from the chain nodes included in other data traceability area networks. Selecting the area network with the highest network performance value as the optimal traceability area network can ensure that the test data is stored in the network with the best performance, thereby further improving the storage efficiency and response speed. In addition, selecting security nodes and verification nodes from other data traceability area networks helps to improve the security of the network and the accuracy of the data, and at the same time avoids the resource consumption caused by multiple storage in different chain nodes; finally, perform a splitting operation on the test data to obtain multiple groups of test sub-data. Among them, the number of groups of test sub-data needs to be greater than or equal to the number of chain nodes included in the optimal traceability area network, and store the multiple groups of test sub-data without repetition in the chain nodes included in the optimal traceability area network. When the storage is completed, use the security node to generate an access key and send the access key back to the verification node to complete the test data management of the embedded product. Splitting the test data into multiple groups of test sub-data can disperse the data and store it on different chain nodes in the optimal traceability area network, avoiding data concentration on a few nodes and improving the balance and utilization rate of storage resources. Therefore, the main purpose of the test data management method and system for embedded products proposed by the present invention is to improve the utilization efficiency of the storage resources of the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 Schematic flowchart of the test data management method for an embedded product provided by an embodiment of the present invention;

[0076] Figure 2 Functional module diagram of the test data management system for an embedded product provided by an embodiment of the present invention;

[0077] Figure 3 Schematic structural diagram of an electronic device for implementing the test data management method of the embedded product provided by an embodiment of the present invention.

[0078] The implementation, functional features and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners

[0079] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0080] An embodiment of the present application provides a test data management method for an embedded product. The execution subject of the test data management method for the embedded product includes, but is not limited to, at least one of an electronic device such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the test data management method for the embedded product can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc.

[0081] Embodiment 1:

[0082] Refer to Figure 1 As shown, it is a schematic flowchart of the test data management method for an embedded product provided by an embodiment of the present invention. In this embodiment, the test data management method for the embedded product includes:

[0083] S1. Receive a test instruction of the embedded product, and lock the embedded product to be tested and the product test device for testing the embedded product according to the test instruction.

[0084] It should be explained that all embedded products need to be tested when they are produced, including PCBA testing and assembly testing. Among them, PCBA testing includes ICT testing, FCT testing, aging testing, fatigue testing, testing under harsh environments, etc. ICT testing includes the circuit continuity, voltage and current values and fluctuation curves, amplitude, noise, etc. of the embedded product, and FCT testing includes IC program burning, simulation testing, etc.

[0085] Exemplarily, Xiao Zhang is a communication engineer. The company where he works recently produced a batch of switches. Therefore, Xiao Zhang initiated a test instruction, that is, the switch is an embedded product. It is understandable that the device used to test the switch is the product test device. That is, the product test device can sequentially perform PCBA tests, assembly tests, etc. on the switch.

[0086] In addition, in the embodiments of the present invention, the default startup of the product test device will directly enter the test of the embedded product, thereby reducing the time for manual operation of the product test device and improving the test efficiency.

[0087] S2. Send the test configuration file of the product test device to the initiator of the test instruction, and receive the modified configuration file obtained after the initiator modifies the test configuration file.

[0088] It should be explained that PCBA tests and assembly tests can be implemented by modifying the test configuration file. In the embodiments of the present invention, the file format of the test configuration file is json, and the test configuration file has multiple test functions according to the test purpose. For example, the ICT test corresponds to the ICT test function, the FCT test corresponds to the FCT test function, and so on. By analogy, which test function is run, which test will be performed on the embedded product, thus realizing the liberalization and intelligence of the test. Importantly, the initiator of the test instruction can very flexibly set the function parameters of the test function.

[0089] S3. Start the product test device to directly enter the product test process, and test the embedded product based on the modified configuration file to obtain test data.

[0090] Exemplarily, Xiao Zhang uses the product test device to perform PCBA tests, assembly tests, etc. on the switch, thereby generating test data of the switch.

[0091] S4. Start the data traceability management network where the embedded product is located.

[0092] Importantly, the data traceability management network described in the embodiments of the present invention is constructed by a blockchain, and the data traceability management network consists of K chain nodes, where K≥1. Blockchain is a distributed storage technology with unique advantages in terms of security, transparency, and decentralization. In the embodiments of the present invention, the data traceability management network consists of K chain nodes, and each chain node represents a block and the storage space corresponding to the block. As is known to the public, each block contains a block header (Header) and a block body (Body). The block header contains information such as the hash value of the previous block, timestamp, difficulty target (Target), Nonce, etc. Therefore, each chain node not only has the characteristics of high block security but also has storage capabilities.

[0093] S5. Perform network partitioning on the data traceability management network based on the generation location and data volume of the test data to obtain at least two data traceability area networks.

[0094] Specifically, the performing network partitioning on the data traceability management network based on the generation location and data volume of the test data to obtain at least two data traceability area networks includes:

[0095] Obtain the local IP of the embedded product and the transmission IP for transmitting the test data, and determine whether the local IP and the transmission IP are in the same network;

[0096] If the local IP and the transmission IP are not in the same network, prohibit performing network partitioning on the data traceability management network and generate an abnormal reminder instruction for the test data;

[0097] If the local IP and the transmission IP are in the same network, after using the subnet mask of the transmission IP as the generation location of the test data, determine the data volume of the test data;

[0098] Determine the radius with the generation location of the test data as the center point to construct a screening range;

[0099] Select chain nodes belonging to the screening range from the data traceability management network;

[0100] Perform clustering on the chain nodes belonging to the screening range based on the data volume of the test data to obtain at least two data traceability area networks.

[0101] Exemplarily, the product testing device of the company where Xiao Zhang works needs to upload switch test data to the data traceability management network. Then the product testing device needs to connect to the company's network. Assuming the IP address of the product testing device is: "192.168.1.10 / 24", then "192.168.1.10 / 24" is the local IP.

[0102] Since most companies prevent the test data generated by embedded products from being stolen and do not directly connect the embedded products to the data traceability management network, but add a security verification mechanism between the embedded products and the data traceability management network. That is, the device transmitting the test data is not the product testing device. Instead, the security verification mechanism first receives the switch test data generated by the product testing device within the company's network and then transmits the switch test data to the data traceability management network. Therefore, the local IP and the transmission IP are often different. Assuming the IP address of the security verification mechanism is: "192.168.1.20 / 24", then "192.168.1.20 / 24" is the transmission IP.

[0103] It should be noted that within the same network, the subnet masks of all devices are the same. That is, the security verification mechanism and the product testing device have the same subnet mask. Assuming that the subnet masks of the IP address of the product testing device and the IP address of the security verification mechanism are both: "255.255.255.0", it means that the local IP and the transfer IP are in the same network, that is, the product testing device and the security verification mechanism belong to the same network, with a certain degree of security. Therefore, the subsequent network division can be performed.

[0104] Furthermore, assuming that a subnet mask of "255.255.255.0" is used as the center point and a radius of 10 KM is used to construct a screening range, it means that as long as the chain nodes within this screening range meet the requirements of this time.

[0105] Finally, clustering is performed on the chain nodes belonging to the screening range based on the data volume of the test data to obtain at least two data traceability area networks, including:

[0106] Receiving the number of iterations set by the operator of the embedded product, and at the same time calculating the number of cluster centers according to the data volume of the test data, where the number of cluster centers is greater than or equal to 2;

[0107] Setting the geographical coordinates of each cluster center, where the number of geographical coordinates is the same as the number of cluster centers;

[0108] Calculating the distance value between each chain node belonging to the screening range and each cluster center according to the geographical coordinates;

[0109] Adjusting the cluster center to which each chain node belongs according to the distance value;

[0110] Judging the relationship between the number of adjustments for adjusting the cluster center to which each chain node belongs and the number of iterations. If the number of adjustments for adjusting the cluster center to which each chain node belongs is less than the number of iterations, return to the calculation step of the distance value;

[0111] Until the number of adjustments for adjusting the cluster center to which each chain node belongs is greater than or equal to the number of iterations, eliminating the cluster centers without chain nodes, and determining the remaining cluster centers and the included chain nodes as data traceability area networks, obtaining at least two data traceability area networks, and the number of data traceability area networks is less than or equal to the number of cluster centers.

[0112] Exemplarily, there are 300 chain nodes belonging to the screening range. Now, it is necessary to construct one or more data traceability area networks depending on these 300 chain nodes. Assuming that the number of iterations set by the operator of the embedded product is 20 times, further, it is necessary to calculate the number of cluster centers. Specifically, calculating the number of cluster centers according to the data volume of the test data includes:

[0113] Calculating the number of cluster centers according to the following formula:

[0114] ;

[0115] where H represents the number of cluster centers, [ ] represents the rounding symbol, represents the amount of test data generated by the i-th embedded product during use, represents the standard amount of test data generated by the i-th embedded product during use, and are weight factors that can be set by the operator of the embedded product.

[0116] It should be explained that if the calculated value of H is less than 2 according to the above, the number of cluster centers is directly determined to be 2.

[0117] Exemplarily, there are 300 chain nodes belonging to the screening range. According to the above assumption, the calculated number of cluster centers is 10, which indicates that the data of the generated data traceability area network is less than or equal to the number of cluster centers 10.

[0118] Further, when the number of cluster centers is 10 and the number of iterations is 20 times, then the above clustering operation is performed. When the adjustment times of the cluster center to which each chain node belongs are greater than or equal to the number of iterations, assuming that it is found that the 5th cluster center does not include any chain node, then the 5th cluster center is removed, and a total of 9 cluster centers remain and 9 data traceability area networks are generated. Assuming that the 1st data traceability area network has 20 chain nodes, the 2nd data traceability area network has 30 chain nodes,..., and the 10th data traceability area network has 15 chain nodes.

[0119] S6. Calculate the network performance value of each data traceability area network, select the data traceability area network with the highest network performance value to obtain the optimal traceability area network, and select security nodes and verification nodes from the chain nodes included in other data traceability area networks.

[0120] Specifically, the calculation of the network performance value of each data traceability area network includes:

[0121] Obtain the storage records and performance indicators of all chain nodes in the data traceability area network during the historical time period;

[0122] Quantify the performance value according to the performance indicators, and extract the stored data volume and storage duration from the storage records;

[0123] Classify the chain nodes into high-active nodes, medium-active nodes, and low-active nodes according to the activity of the chain nodes during the historical time period;

[0124] Based on high-active nodes, medium-active nodes, and low-active nodes, weights are assigned to the corresponding performance values, stored data volumes, and storage durations to obtain weighted performance values, weighted stored data volumes, and weighted storage durations;

[0125] Based on the weighted performance values, weighted stored data volumes, and weighted storage durations, the network performance value of the data traceability area network is calculated.

[0126] Exemplarily, assume that the second data traceability area network has 30 chain nodes. Then, the storage records and performance metrics of the 30 chain nodes in the historical time period are extracted. Assume that the first chain node has stored test data 6 times in the past month. When the first test data was stored, the performance metrics of the first chain node included a CPU load rate of 37% and a memory usage rate of 52%, etc. The data volume of the test data was 10M (stored data volume), and it took 10 seconds (storage duration) to complete the storage of 10M test data.

[0127] Furthermore, it is necessary to quantify the performance value according to the performance metrics. There are various methods for quantifying the performance value according to the performance metrics in the embodiments of the present invention. For example, performance metrics including a CPU load rate of 37% and a memory usage rate of 52% are used as input data for machine learning. By analyzing these input data through machine learning, an output value is finally obtained, and this output value is the performance value.

[0128] Importantly, in the embodiments of the present invention, a network performance model is not directly constructed using the performance value, stored data volume, and storage duration. Instead, the chain nodes are first classified according to their activity levels because the importance of chain nodes with different activity levels in the data traceability area network is different. High-activity chain nodes are certainly more important in the data traceability area network. Therefore, specifically, the chain nodes are divided into high-active nodes, medium-active nodes, and low-active nodes according to the activity levels of the chain nodes in the historical time period, including:

[0129] Obtain the number of storage operations completed by the chain node in the historical time period;

[0130] The activity level of the chain node in the historical time period is calculated according to the following formula:

[0131] ;

[0132] Where represents the activity level of the i-th chain node in the j-th data traceability area network in the historical time period, t represents the duration of the historical time period, represents the number of storage operations completed by the i-th chain node in the j-th data traceability area network in the historical time period, represents the storage quantization value of the i-th chain node in the j-th data traceability area network when the th storage is performed;

[0133] When the activity level is greater than or equal to the first activity threshold, the chain node is determined to be a highly active node;

[0134] When the activity level is less than the first activity threshold and greater than or equal to the second activity threshold, the chain node is determined to be a moderately active node;

[0135] When the activity level is less than the second activity threshold, the chain node is determined to be a lowly active node.

[0136] Exemplarily, the above-mentioned second data traceability area network has 30 chain nodes. Among them, the first chain node has stored test data 6 times in the past month. Then , assuming that the duration of the historical time period is 30 days, then t = 30. Further, the calculation of the storage quantization value needs to depend on whether each storage of test data is successfully calculated. Specifically, the calculation of the storage quantization value includes:

[0137] ;

[0138] wherein, represents the data volume of the test data stored when the i-th chain node in the j-th data traceability area network executes the th storage.

[0139] Exemplarily, if the first chain node has stored test data 6 times in the past month and 2 of them are failed to store test data, then mark , and whether the other storages are successful depends on the size of the data volume of the stored test data. In addition, the first activity threshold and the second activity threshold can be preset by empirical values.

[0140] Further, the embodiments of the present invention assign higher weight performance values, stored data volumes, and storage durations to highly active nodes, followed by moderately active nodes, and finally lowly active nodes. Assuming that the performance value, stored data volume, and storage duration of the first chain node are 0.15, 100M, and 120 seconds respectively, a weight of 0.5 is assigned, that is, 0.5 is multiplied by 0.15, 100M, and 120 respectively. If the weight assigned to the moderately active node is 0.3 and the weight assigned to the lowly active node is 0.2, then they are also multiplied correspondingly, and the weights of the highly active node, moderately active node, and lowly active node add up to 1.

[0141] It should be emphasized that in the embodiments of the present invention, various methods can be used to calculate the network performance value of the data traceability area network, including but not limited to using the weighted performance value, weighted storage data volume, and weighted storage duration as input for a machine learning model for analysis to obtain an output value for measuring the data traceability area network, and this output value is the network performance value. In addition, in another embodiment of the present invention, the network performance value can be calculated by a simple and direct method. Specifically, calculating the network performance value of the data traceability area network based on the weighted performance value, weighted storage data volume, and weighted storage duration includes:

[0142] Normalize the weighted performance value, weighted storage data volume, and weighted storage duration to obtain the normalized performance value, normalized storage data volume, and normalized storage duration respectively;

[0143] Accumulate the normalized performance value, normalized storage data volume, and normalized storage duration of all chain nodes to obtain the accumulated performance value, accumulated storage data volume, and accumulated storage duration. Among them, the accumulation operation is:

[0144] ;

[0145] ;

[0146] ;

[0147] Among them, 、 and represent the accumulated performance value, accumulated storage data volume, and accumulated storage duration of the j-th data traceability area network respectively, u represents the total number of chain nodes included in the j-th data traceability area network, 、 and represent the normalized performance value, normalized storage data volume, and normalized storage duration of the i-th chain node in the j-th data traceability area network respectively;

[0148] Calculate the network performance value of the data traceability area network according to the following formula:

[0149] ;

[0150] Among them, represents the network performance value of the j-th data traceability area network, is the weight factor for calculating the network performance value of the j-th data traceability area network.

[0151] Exemplarily, assume that the second data traceability area network has 30 chain nodes. Then, the 30 chain nodes correspond to 30 weight performance values, weight storage data volumes, and weight storage durations. Now, perform normalization on the 30 weight performance values, weight storage data volumes, and weight storage durations respectively to obtain 30 normalized performance values, normalized storage data volumes, and normalized storage durations (it should be noted that the normalization operations are separate operations, that is, normalization is performed among the first weight performance value, weight storage data volume, and weight storage duration, and normalization is performed among the second weight performance value, weight storage data volume, and weight storage duration, and so on). Further, according to the above accumulation operation and combined with the calculation formula of the network performance value, finally calculate the network performance value of the th data traceability area network.

[0152] Importantly, after calculating the network performance value of each data traceability area network, select the data traceability area network with the highest network performance value as the optimal traceability area network. And to ensure the storage security of the test data, the embodiment of the present invention will select security nodes and verification nodes from the chain nodes included in other data traceability area networks. And there are various selection methods. In one embodiment of the present invention, the selection of security nodes and verification nodes from the chain nodes included in other data traceability area networks includes:

[0153] Determine the data traceability area network with the second highest network performance value as the data security verification network;

[0154] Obtain the performance indicators of each chain node in the data security verification network within the historical time period, and quantify the performance values according to the performance indicators;

[0155] Select the chain node with the highest performance value as the security node, and select the chain node with the second highest performance value as the verification node.

[0156] It can be understood that the embodiment of the present invention performs network division on the data traceability management network to obtain at least 2 data traceability area networks. Therefore, at least 1 data traceability area network is used as an alternative network for the data security verification network. And the method of quantifying the performance value according to the performance indicator is similar to the above step S3, and will not be elaborated here.

[0157] S7. Perform a splitting operation on the test data to obtain multiple groups of test sub-data, where the number of groups of test sub-data needs to be greater than or equal to the number of chain nodes included in the optimal traceability area network.

[0158] To ensure the security of test data and combine with the immutable feature of the blockchain, the embodiments of the present invention will perform a splitting operation on the test data to obtain multiple groups of test sub-data. Moreover, to improve security, the number of groups of test sub-data needs to be greater than or equal to the number of chain nodes included in the optimal traceability area network. Exemplarily, assuming that the number of chain nodes included in the optimal traceability area network is 20, then the test data needs to be split into at least 20 groups of test sub-data.

[0159] S8. Store the multiple groups of test sub-data without repetition in the chain nodes included in the optimal traceability area network. When the storage is completed, use the security node to generate an access key and send the access key back to the verification node to complete the test data management of the embedded product.

[0160] Importantly, when the embodiments of the present invention perform the storage of test sub-data, they preferentially select the more active chain nodes, that is, store the multiple groups of test sub-data in the order of high-active nodes, medium-active nodes, and low-active nodes. After the storage is completed, use the security node to generate an access key and send the access key back to the verification node.

[0161] It can be understood that there are various ways to generate an access key using the security node, including but not limited to using encryption methods such as BitLocker, FileVault, transparent data encryption (TDE), and column-level encryption on the chain nodes in the optimal traceability area network to generate an access key and send the access key back to the verification node.

[0162] Compared with the problems described in the background art, the present invention first receives a test instruction of an embedded product, locks the embedded product to be tested and a product test device for testing the embedded product according to the test instruction, sends the test configuration file of the product test device to the initiator of the test instruction, and receives the modified configuration file obtained after the initiator modifies the test configuration file, starts the product test device to directly enter the product test process, and tests the embedded product based on the modified configuration file to obtain test data, and starts the data traceability management network where the embedded product is located. Among them, the data traceability management network is constructed by a blockchain. Based on the generation location and data volume of the test data, the network is divided to obtain at least two data traceability area networks. By dividing the network based on the generation location and data volume of the test data, multiple smaller data traceability area networks are obtained, rather than storing all data in a single large blockchain network, thereby reducing the burden on a single blockchain network and improving the storage efficiency of the overall network; then, calculate the network performance value of each data traceability area network, select the data traceability area network with the highest network performance value to obtain the optimal traceability area network, and select security nodes and verification nodes from the chain nodes included in other data traceability area networks. Selecting the area network with the highest network performance value as the optimal traceability area network can ensure that the test data is stored in the network with the best performance, thereby further improving the storage efficiency and response speed. In addition, selecting security nodes and verification nodes from other data traceability area networks helps to improve the security of the network and the accuracy of the data, and at the same time avoids the resource consumption caused by multiple storage in different chain nodes; finally, perform a splitting operation on the test data to obtain multiple groups of test sub-data. Among them, the number of groups of test sub-data needs to be greater than or equal to the number of chain nodes included in the optimal traceability area network, store the multiple groups of test sub-data without repetition in the chain nodes included in the optimal traceability area network, and when the storage is completed, use the security node to generate an access key and send the access key back to the verification node to complete the test data management of the embedded product. Splitting the test data into multiple groups of test sub-data can disperse the data and store it on different chain nodes in the optimal traceability area network, avoiding the concentration of data on a few nodes and improving the balance and utilization rate of storage resources. Therefore, the main purpose of the test data management method and system for embedded products proposed by the present invention is to improve the utilization efficiency of the storage resources of the blockchain.

[0163] Embodiment 2:

[0164] As Figure 2 shown, it is a functional module diagram of a test data management system for an embedded product provided by an embodiment of the present invention.

[0165] The test data management system 100 of the embedded product described in the present invention can be installed in an electronic device. According to the functions implemented, the test data management system 100 of the embedded product can include a test data receiving module 101, a network partitioning module 102, a regional network selection module 103, and a test data storage module 104. The modules described in the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of the electronic device and can complete fixed functions, and are stored in the memory of the electronic device.

[0166] The test data receiving module 101 is configured to receive a test instruction of the embedded product, lock the embedded product to be tested and the product test device for testing the embedded product according to the test instruction, send the test configuration file of the product test device to the initiator of the test instruction, receive the modified configuration file obtained after the initiator modifies the test configuration file, start the product test device to directly enter the product test process, and test the embedded product based on the modified configuration file to obtain test data, and start the data traceability management network where the embedded product is located, where the data traceability management network is constructed by a blockchain and consists of K chain nodes, K≥1;

[0167] The network partitioning module 102 is configured to perform network partitioning on the data traceability management network based on the generation location and data volume of the test data to obtain at least two data traceability regional networks, and each data traceability regional network consists of N chain nodes, N≤K;

[0168] The regional network selection module 103 is configured to calculate the network performance value of each data traceability regional network, select the data traceability regional network with the highest network performance value to obtain the optimal traceability regional network, and select security nodes and verification nodes from the chain nodes included in other data traceability regional networks;

[0169] The test data storage module 104 is configured to perform a splitting operation on the test data to obtain multiple groups of test sub-data, where the number of groups of test sub-data needs to be greater than or equal to the number of chain nodes included in the optimal traceability regional network, store the multiple groups of test sub-data without repetition in the chain nodes included in the optimal traceability regional network, and when the storage is completed, generate an access key using the security node and send the access key back to the verification node to complete the test of the embedded product.

[0170] Specifically, each module in the test data management system 100 of the embedded product described in the embodiments of the present invention uses the same technical means as the Figure 1 embedded product test data management method described above and can produce the same technical effects, which will not be elaborated here.

[0171] Example 3:

[0172] As Figure 3 shown, it is a schematic structural diagram of an electronic device for implementing a test data management method for embedded products provided by an embodiment of the present invention.

[0173] The electronic device 1 may include a processor 10, a memory 11, a bus 12, and a communication interface 13, and may further include a computer program stored in the memory 11 and operable on the processor 10, such as a test data management program for embedded products.

[0174] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as the mobile hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 1. Further, the memory 11 may include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 can be used not only to store application software installed in the electronic device 1 and various types of data, such as the code of the test data management program for embedded products, etc., but also to temporarily store data that has been output or will be output.

[0175] The processor 10 may be composed of integrated circuits in some embodiments. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions packaged together, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines, and by running or executing programs or modules stored in the memory 11 (such as the test data management program for embedded products, etc.), and calling data stored in the memory 11, to perform various functions of the electronic device 1 and process data.

[0176] The bus can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. The bus is set to implement connection communication between the memory 11 and at least one processor 10, etc.

[0177] Figure 3 Only an electronic device with components is shown. Those skilled in the art can understand that Figure 2 the shown structure does not constitute a limitation on the electronic device 1, and it may include fewer or more components than shown, or combine certain components, or have a different component arrangement.

[0178] For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for powering each component. Preferably, the power source can be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charging management, discharging management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, and a power status indicator. The electronic device 1 may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.

[0179] Furthermore, the electronic device 1 may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0180] Optionally, the electronic device 1 may further include a user interface. The user interface can be a display, an input unit (such as a keyboard), and optionally, the user interface can also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display can be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display can also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visual user interface.

[0181] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.

[0182] The test data management program of the embedded product stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve the following:

[0183] Receive the test instructions of the embedded product, and lock the embedded product to be tested and the product test device for testing the embedded product according to the test instructions;

[0184] Send the test configuration file of the product test device to the initiator of the test instructions, and receive the modified configuration file obtained after the initiator modifies the test configuration file;

[0185] Start the product test device to directly enter the product test process, and test the embedded product based on the modified configuration file to obtain test data;

[0186] Start the data traceability management network where the embedded product is located. Among them, the data traceability management network is constructed by a blockchain, and the data traceability management network consists of K chain nodes, where K ≥ 1;

[0187] Based on the generation location and data volume of the test data, perform network partitioning on the data traceability management network to obtain at least two data traceability area networks, and each data traceability area network consists of N chain nodes, where N ≤ K;

[0188] Calculate the network performance value of each data traceability area network, and select the data traceability area network with the highest network performance value to obtain the optimal traceability area network, and select security nodes and verification nodes from the chain nodes included in other data traceability area networks;

[0189] Perform a splitting operation on the test data to obtain multiple groups of test sub-data. Among them, the number of groups of test sub-data needs to be greater than or equal to the number of chain nodes included in the optimal traceability area network;

[0190] Store the multiple groups of test sub-data without repetition in the chain nodes included in the optimal traceability area network. When the storage is completed, use the security node to generate an access key, and send the access key back to the verification node to complete the test of the embedded product.

[0191] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 2 The description of the relevant steps in the corresponding embodiment, which will not be elaborated here.

[0192] Furthermore, if the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only Memory).

[0193] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor of an electronic device, it can implement:

[0194] Receiving a test instruction of an embedded product, and locking the embedded product to be tested and a product test device for testing the embedded product according to the test instruction;

[0195] Sending a test configuration file of the product test device to the initiator of the test instruction, and receiving a modified configuration file obtained after the initiator modifies the test configuration file;

[0196] Starting the product test device to directly enter the product test process, and testing the embedded product based on the modified configuration file to obtain test data;

[0197] Starting a data traceability management network where the embedded product is located. The data traceability management network is constructed by a blockchain and consists of K chain nodes, where K≥1;

[0198] Performing network partitioning on the data traceability management network based on the generation location and data volume of the test data to obtain at least two data traceability area networks, and each data traceability area network consists of N chain nodes, where N≤K;

[0199] Calculating the network performance value of each data traceability area network, selecting the data traceability area network with the highest network performance value to obtain the optimal traceability area network, and selecting security nodes and verification nodes from the chain nodes included in other data traceability area networks;

[0200] Performing a splitting operation on the test data to obtain multiple groups of test sub-data, where the number of groups of test sub-data needs to be greater than or equal to the number of chain nodes included in the optimal traceability area network;

[0201] Storing the multiple groups of test sub-data without repetition in the chain nodes included in the optimal traceability area network, and when the storage is completed, generating an access key using the security node and transmitting the access key back to the verification node to complete the test of the embedded product.

[0202] The module described as a separation component may or may not be physically separated. The component shown as a module may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0203] In addition, in each embodiment of the present invention, each functional module may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a combination of hardware and software functional modules.

[0204] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.

[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A test data management method for embedded products, characterized in that: The method comprises: Receiving a test instruction of an embedded product, and locking the embedded product to be tested and a product testing device for testing the embedded product according to the test instruction; Sending a test configuration file of the product test device to a person who initiates the test instruction, and receiving a modified configuration file obtained after the initiator modifies the test configuration file; Start the product testing device to directly enter the product testing process, and test the embedded product based on the modified configuration file to obtain test data; Start the data traceability management network where the embedded product is located, where the data traceability management network is constructed by the blockchain and consists of K chain nodes, K ≥ 1; Based on the generation location and data volume of the test data, the data traceability management network is divided into at least two data traceability area networks, and each data traceability area network consists of N chain nodes, N≤K; Calculate the network performance value of each data traceability area network, select the data traceability area network with the highest network performance value, obtain the optimal traceability area network, and select security nodes and verification nodes from the chain nodes included in other data traceability area networks; Perform a split operation on the test data to obtain multiple groups of test data, where the number of groups of test data must be greater than or equal to the number of chain nodes included in the optimal traceability area network; Store multiple groups of test data without duplication in the chain nodes included in the optimal traceability area network. When the storage is completed, use the security node to generate an access key, and send the access key back to the verification node to complete the test of the embedded product. Wherein, based on the generation location and data volume of the test data, the data traceability management network is divided into at least two data traceability area networks, including: Obtain the local IP address of the embedded product and the transmission IP address of the test data, and determine whether the local IP address and the transmission IP address are located in the same network; If the local IP and the transmission IP are not in the same network, it is prohibited to perform network segmentation on the data traceability management network, and an abnormal reminder instruction for the test data is generated; If the local IP and the transmission IP are in the same network, the subnet mask of the transmission IP is used as the test data generation location to determine the data volume of the test data; Determine the radius with the location where the test data is generated as the point, and construct the screening range; Selecting a chain node belonging to the screening range from the data traceability management network; Based on the data volume of the test data, clustering is performed on the chain nodes that belong to the screening range to obtain at least 2 data traceability area networks.

2. The test data management method for embedded products according to claim 1, characterized in that: The chain nodes belonging to the screening range are clustered based on the data volume of the test data to obtain at least two data traceability area networks, including: Receiving the number of iterations set by the operator of the embedded product, and calculating the number of cluster centers according to the amount of test data, wherein the number of cluster centers is greater than or equal to 2; Set the geographical coordinates of each cluster center, where the number of geographical coordinates is the same as the number of cluster centers; According to the geographic coordinates, the distance value between each chain node belonging to the screening range and the center of each cluster is calculated; Adjust the cluster center to which each chain node belongs according to the distance value; Determine the relationship between the number of times the cluster center to which each chain node belongs is adjusted and the number of iterations, and if the number of times the cluster center to which each chain node belongs is adjusted is less than the number of iterations, return to the distance value calculation step; Until the number of adjustments to the cluster center to which each chain node belongs is greater than or equal to the number of iterations, the cluster centers without chain nodes are eliminated, and the remaining cluster centers and the included chain nodes are determined as the data traceability area network, obtaining at least 2 data traceability area networks, and the number of data traceability area networks is less than or equal to the number of cluster centers.

3. The test data management method for embedded products according to claim 2, characterized in that: The step of calculating the number of cluster centers according to the amount of test data includes: The number of cluster centers is calculated according to the following formula: ; Where H represents the number of cluster centers, [ ] represents the integer symbol, represents the amount of test data generated by the i-th embedded product when it is used, represents the standard amount of test data generated by the i-th embedded product when it is used, and is a weighting factor that can be set by the operator of the embedded product.

4. The test data management method for embedded products according to claim 1, characterized in that: The network performance value of each data traceability area network is calculated, including: Obtain the storage records and performance indicators of all chain nodes in the data traceability zone network within the historical time period; The performance value is quantified based on the performance indicators, and the storage data volume and storage duration are extracted from the storage records; According to the activity of chain nodes in the historical time period, chain nodes are divided into high-activity nodes, medium-activity nodes and low-activity nodes; Based on high-activity nodes, medium-activity nodes, and low-activity nodes, weights are assigned to the corresponding performance values, storage data volumes, and storage durations to obtain weighted performance values, weighted storage data volumes, and weighted storage durations. The network performance value of the data traceability area network is calculated based on the weight performance value, weight storage data volume and weight storage time.

5. The test data management method for embedded products according to claim 4, characterized in that: According to the activity of the chain nodes in the historical time period, the chain nodes are divided into high-activity nodes, medium-activity nodes and low-activity nodes, including: Get the number of storage times completed by the chain node in the historical time period; The activity of the chain node in the historical time period is calculated according to the following formula: ; in, represents the activity of the i-th chain node in the j-th data traceability zone network in the historical time period, and t represents the length of the historical time period. Indicates the number of storages completed by the i-th chain node in the j-th data traceability zone network in the historical time period, Indicates that the i-th chain node in the j-th data traceability zone network is executing The storage quantization value at the time of storage; When the activity is greater than or equal to the first activity threshold, the chain node is determined to be a high-activity node; When the activity is less than the first activity threshold and greater than or equal to the second activity threshold, the chain node is determined to be a medium-active node; When the activity is less than the second activity threshold, the chain node is determined to be a low-activity node.

6. The test data management method for embedded products according to claim 5, characterized in that: The calculation of the stored quantization value includes: ; in, Indicates that the i-th chain node in the j-th data traceability zone network is executing The amount of test data stored during the first storage.

7. The test data management method for embedded products according to claim 5, characterized in that: The network performance value of the data traceability area network is calculated based on the weight performance value, the weight storage data volume and the weight storage duration, including: Normalize the weight performance value, weight storage data volume, and weight storage duration to obtain a normalized performance value, a normalized storage data volume, and a normalized storage duration, respectively; The normalized performance value, normalized storage data volume, and normalized storage duration of all chain nodes are accumulated to obtain the accumulated performance value, accumulated storage data volume, and accumulated storage duration, where the accumulation operation is: ; ; ; in, , and They represent the cumulative performance value, cumulative storage data volume and cumulative storage duration of the j-th data traceability zone network, and u represents the total number of chain nodes included in the j-th data traceability zone network. , and They respectively represent the normalized performance value, normalized storage data volume, and normalized storage duration of the i-th chain node in the j-th data traceability zone network; The network performance value of the data traceability area network is calculated according to the following formula: ; in, represents the network performance value of the jth data traceability area network, It is the weight factor for calculating the network performance value of the j-th data traceability area network.

8. The test data management method for embedded products according to claim 7, characterized in that: The step of selecting security nodes and verification nodes from chain nodes included in other data traceability area networks includes: Determine the data tracing area network with the second highest network performance value as the data security verification network; Obtain the performance indicators of each chain node in the data security verification network in the historical time period, and quantify the performance value based on the performance indicators; The chain node with the highest performance value is selected as the security node, and the chain node with the second highest performance value is selected as the verification node.

9. A test data management system for embedded products, characterized in that: A test data management method for an embedded product according to any one of claims 1 to 8, the system comprising: A test data receiving module is used to receive a test instruction of an embedded product, lock the embedded product to be tested and the product test device used to test the embedded product according to the test instruction, send a test configuration file of the product test device to the initiator of the test instruction, and receive a modified configuration file obtained after the initiator modifies the test configuration file, start the product test device to directly enter the product test process, and test the embedded product based on the modified configuration file to obtain test data, and start the data traceability management network where the embedded product is located, wherein the data traceability management network is constructed by a blockchain, and the data traceability management network consists of K chain nodes, K≥1; The network partitioning module is used to perform network partitioning on the data traceability management network based on the generation location and data volume of the test data, and obtain at least 2 data traceability area networks, and each data traceability area network consists of N chain nodes, N≤K: The zone network selection module is used to calculate the network performance value of each data traceability zone network, select the data traceability zone network with the highest network performance value, obtain the optimal traceability zone network, and select security nodes and verification nodes from the chain nodes included in other data traceability zone networks; The test data storage module is used to perform a split operation on the test data to obtain multiple groups of test sub-data, wherein the number of groups of test sub-data must be greater than or equal to the number of chain nodes included in the optimal traceability area network, and the multiple groups of test sub-data are stored without duplication in the chain nodes included in the optimal traceability area network. When the storage is completed, an access key is generated using the security node, and the access key is returned to the verification node to complete the test of the embedded product.

Citation Information

Patent Citations

  • Data bank security system

    CN114218194A

  • Internet of Things system

    CN116368355A