Data verification method and device and electronic equipment
By receiving and processing the shipper's coal quality data and laboratory equipment data on the data verification server, and using residual calculation to realize automated preliminary inspection and spot inspection, the problem of low manual verification efficiency and large errors is solved, and the coal quality data verification is improved. accuracy and efficiency of testing.
Patent Information
- Application Number
- CN202310403171.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing method, it is inefficient for laboratory technicians to manually verify the test results of the initial test samples, and it is easy to cause subjective errors.
By receiving the shipper's coal quality data sent by the blockchain server and the initial inspection coal quality data sent by the laboratory equipment on the data verification server, the residual is calculated based on these data and the historical average coal quality data, and the initial inspection and random inspection are automatically carried out. , determine the final coal quality data and send it to the blockchain server to avoid manual verification.
It improves the degree of automation of initial inspection and spot inspection, reduces data verification errors, and avoids subjective errors caused by manual verification.
Smart Images

Figure CN118797729A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a data verification method, a data verification device and an electronic device. Background Art
[0002] Usually, after coal is mined, it is shipped to transit points such as ports, and then transported from the transit points to destinations such as power plants. Coal samples need to be tested at the transit points. The first step is to conduct an initial inspection of the coal samples. If the initial inspection results are abnormal, a random inspection will be conducted. That is, for the same batch of coal quality that has been put into storage, manual review is required during the initial inspection. If any abnormalities are found, a targeted random inspection of the retained samples will be initiated. During the random inspection, the retained samples need to be taken out from the storage cabinet for testing, and then compared with the initial inspection results to facilitate the laboratory technician's judgment.
[0003] The existing method uses laboratory technicians to manually verify the test results of initial test samples, which is inefficient and prone to subjective errors. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a method for solving the defects of the existing method that the laboratory technicians manually verify the test results of the initial test samples, which is inefficient and prone to subjective errors in manual verification.
[0005] In order to achieve the above object, an embodiment of the present invention provides a data verification method, which is applied to a data verification server, and the method includes:
[0006] Receive coal quality data from the shipper sent by the blockchain server, and receive initial coal quality data from the testing equipment;
[0007] Perform residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value;
[0008] When the first residual value is greater than a set threshold, receiving sampling coal quality data of coal testing sent by the testing equipment;
[0009] Perform residual calculation based on the sampled coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a second residual value;
[0010] The final coal quality data is determined based on the first residual value and the second residual value, and the final coal quality data is sent to the blockchain server.
[0011] Optionally, the performing residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value includes:
[0012] A residual calculation is performed based on the initial inspection coal quality data, the shipping party's coal quality data, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain a first residual value.
[0013] Optionally, the residual calculation is performed based on the initial inspection coal quality data, the coal quality data of the shipping party, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain a first residual value, which is implemented by the following formula:
[0014] The first residual value = |a×coal quality data of the shipping party + b×historical average coal quality data|-initial inspection coal quality data;
[0015] Among them, a represents the first preset coefficient, and b represents the second preset coefficient.
[0016] Optionally, the performing residual calculation based on the sampled coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a second residual value includes:
[0017] A residual calculation is performed based on the sampled coal quality data, the coal quality data of the shipping party, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain a second residual value.
[0018] Optionally, the residual calculation is performed based on the sampled coal quality data, the coal quality data of the shipping party, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain the second residual value, which is implemented by the following formula:
[0019] The second residual value = |a×coal quality data of the shipping party + b×historical average coal quality data|-sampling coal quality data;
[0020] Among them, a represents the first preset coefficient, and b represents the second preset coefficient.
[0021] Optionally, determining final assayed coal quality data based on the first residual value and the second residual value, and sending the final assayed coal quality data to the blockchain server includes:
[0022] The coal quality data corresponding to the minimum value between the first residual value and the second residual value is determined as the final coal quality data.
[0023] Optionally, after performing residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value, the method further includes:
[0024] When the first residual value is less than or equal to the set threshold, the initial inspection coal quality data is uploaded to the blockchain server.
[0025] On the other hand, an embodiment of the present invention further provides a data verification method, which is applied to a blockchain server, and the method includes:
[0026] Sending coal quality data of the shipper to the data verification server;
[0027] The final tested coal quality data sent by the data verification server is received so as to calculate the historical average coal quality data based on the final tested coal quality data.
[0028] On the other hand, an embodiment of the present invention further provides a data verification device, including:
[0029] The first data receiving module is used to receive the coal quality data of the shipper sent by the blockchain server, and receive the initial coal quality data of the coal test sent by the testing equipment;
[0030] A first residual calculation module, used to perform residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value;
[0031] A second data receiving module is used to receive the sampling coal quality data of the coal test sent by the testing equipment when the first residual value is greater than the set threshold value;
[0032] A second residual calculation module, used to perform residual calculation based on the sampled coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a second residual value;
[0033] A data sending module is used to determine the final coal quality data based on the first residual value and the second residual value, and send the final coal quality data to the blockchain server.
[0034] On the other hand, an embodiment of the present invention further provides a data verification device, including:
[0035] A data sending module, used for sending the coal quality data of the shipping party to the data verification server;
[0036] The data receiving module is used to receive the final coal quality data tested by the data verification server, so as to calculate the historical average coal quality data based on the final coal quality data tested.
[0037] On the other hand, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the data verification methods described above is implemented.
[0038] On the other hand, the present invention further provides a machine-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the data verification method described in any one of the above is implemented.
[0039] Through the above technical scheme, the present invention performs residual calculation based on the initial inspection coal quality data, the shipping party's coal quality data and the historical average coal quality data to obtain a first residual value, thereby realizing automatic initial inspection; when the first residual value is greater than a set threshold, the residual calculation is performed based on the random inspection coal quality data, the shipping party's coal quality data and the historical average coal quality data to obtain a second residual value; automatic random inspection is realized; and then the final test coal quality data is determined based on the first residual value and the second residual value, and the final test coal quality data is sent to the blockchain server, so that the present invention calculates the first residual value and the second residual value, and the final test coal quality data obtained based on the first residual value and the second residual value is uploaded to the blockchain, thereby avoiding manual verification of the test results of the initial inspection samples by the laboratory technician, and avoiding subjective errors caused by manual verification, thereby improving the degree of automation of the initial inspection and random inspection, and reducing data verification errors.
[0040] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0042] Figure 1 It is one of the flow charts of the data verification method provided by the present invention;
[0043] Figure 2 This is the second flow chart of the data verification method provided by the present invention;
[0044] Figure 3 This is the third flow chart of the data verification method provided by the present invention;
[0045] Figure 4 This is the fourth flow chart of the data verification method provided by the present invention;
[0046] Figure 5 It is one of the structural schematic diagrams of the data verification device provided by the present invention;
[0047] Figure 6 This is the second structural schematic diagram of the data verification device provided by the present invention;
[0048] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0049] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0050] Method Embodiment
[0051] Please refer to Figure 1 The present invention proposes a data verification method, which is applied to a data verification server, and the method comprises:
[0052] Step 101: Receive the coal quality data of the shipper sent by the blockchain server, and receive the initial coal quality data of the coal test sent by the testing equipment.
[0053] The data verification server receives the coal quality data of the shipper sent by the blockchain server, and receives the initial coal quality data of the coal test sent by the testing equipment.
[0054] The coal quality data of the shipper is the test data of the coal quality from the upstream shipper stored in the blockchain server. For example, the coal quality data of the shipper can be the test data of the coal quality that the coal producer tests and uploads to the blockchain server. Specifically, the coal quality data can include data such as the moisture content, ash content and fixed carbon content of the coal.
[0055] The initial coal quality data is the coal quality data obtained by the third-party testing equipment for the preliminary testing of the coal from the shipper. The testing equipment is used to test the coal of the coal producer to obtain the tested coal quality data, including the initial coal quality data for the initial test and the random test coal quality data for the random test.
[0056] Step 102: Perform residual calculation based on the initial inspection coal quality data, the shipping party's coal quality data and the historical average coal quality data to obtain a first residual value.
[0057] The data verification server performs residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value. The historical average coal quality data represents the historical average value of the coal quality data received by the data verification server. The first residual value calculated by the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data facilitates automatic initial inspection based on the first residual value. The automation level of the initial inspection is improved.
[0058] Step 103: When the first residual value is greater than a set threshold, receive sampling coal quality data sent by a testing device for coal testing.
[0059] When the first residual value is greater than the set threshold, it indicates that the initial coal quality data is significantly different from the coal quality data of the shipper and the historical average coal quality data, that is, the initial coal quality data is abnormal and a targeted sampling inspection of the retained samples is required. Therefore, the data verification server receives the sampling coal quality data of the coal test sent by the testing equipment.
[0060] Step 104: perform residual calculation based on the sampled coal quality data, the shipping party's coal quality data and the historical average coal quality data to obtain a second residual value.
[0061] The data verification server performs residual calculation based on the sampled coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a second residual value. The historical average coal quality data represents the historical average value of the coal quality data received by the data verification server. The second residual value calculated by the sampled coal quality data, the coal quality data of the shipping party and the historical average coal quality data facilitates automatic sampling based on the second residual value, thereby improving the automation level of sampling.
[0062] Step 105: determine the final coal quality data based on the first residual value and the second residual value, and send the final coal quality data to the blockchain server.
[0063] The data verification server determines the final tested coal quality data based on the first residual value and the second residual value, and sends the final tested coal quality data to the blockchain server.
[0064] In one embodiment, step 105, determining the final tested coal quality data based on the first residual value and the second residual value, and sending the final tested coal quality data to the blockchain server, specifically includes: determining the tested coal quality data corresponding to the minimum value between the first residual value and the second residual value as the final tested coal quality data, and sending the final tested coal quality data to the blockchain server.
[0065] The data verification server selects the minimum value between the first residual value and the second residual value, thereby obtaining the data with the smallest deviation from the coal quality data of the shipping party and the historical average coal quality data in the initial inspection coal quality data and the random inspection coal quality data as the final test coal quality data. The present invention has a smaller error than the method of manual judgment or judgment by the average value of coal quality. For example, when the first residual value is less than the second residual value, the initial inspection coal quality data corresponding to the first residual value is determined as the final test coal quality data, and the final test coal quality data is sent to the blockchain server. Otherwise, when the first residual value is greater than the second residual value, the random inspection coal quality data corresponding to the second residual value is determined as the final test coal quality data, and the final test coal quality data is sent to the blockchain server.
[0066] In one embodiment, please refer to Figure 2, the testing terminal obtains the initial inspection coal quality data and the random inspection coal quality data from the testing equipment, and uploads the obtained coal quality testing data to the data verification server. The data verification server of the embodiment of the present invention includes an initial inspection processing module and a random inspection processing module. The initial inspection processing module is used to receive the coal quality data of the shipping party sent by the blockchain server, and receive the initial inspection coal quality data of the coal test sent by the testing equipment; based on the initial inspection coal quality data, the shipping party coal quality data and the historical average coal quality data, the residual calculation is performed to obtain a first residual value; when the first residual value is greater than the set threshold, the automatic random inspection process is started. The random inspection processing module is used to receive the random inspection coal quality data of the coal test sent by the testing equipment; based on the random inspection coal quality data, the shipping party coal quality data and the historical average coal quality data, the residual calculation is performed to obtain a second residual value; based on the first residual value and the second residual value, the final inspection coal quality data is determined, and the final inspection coal quality data is sent to the blockchain server.
[0067] The present invention performs residual calculation based on initial inspection coal quality data, coal quality data of the shipping party and historical average coal quality data to obtain a first residual value, thereby realizing automatic initial inspection; when the first residual value is greater than a set threshold value, residual calculation is performed based on spot inspection coal quality data, coal quality data of the shipping party and historical average coal quality data to obtain a second residual value; automatic spot inspection is realized; and then final test coal quality data is determined based on the first residual value and the second residual value, and the final test coal quality data is sent to the blockchain server, so that the present invention calculates the first residual value and the second residual value, and the final test coal quality data obtained based on the first residual value and the second residual value is uploaded to the blockchain, thereby avoiding manual verification of the test results of the initial inspection samples by the laboratory technician, and avoiding subjective errors caused by manual verification, thereby improving the degree of automation of the initial inspection and spot inspection, and reducing data verification errors.
[0068] In other aspects of the embodiment of the present invention, step 102, performing residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value, includes:
[0069] A residual calculation is performed based on the initial inspection coal quality data, the shipping party's coal quality data, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain a first residual value.
[0070] Specifically, in one embodiment, residual calculation is performed based on the initial inspection coal quality data, the coal quality data of the shipping party, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain a first residual value, which is implemented by the following formula:
[0071] The first residual value = |a×coal quality data of the shipping party + b×historical average coal quality data|-initial inspection coal quality data;
[0072] Wherein, a represents the first preset coefficient, and b represents the second preset coefficient. Wherein, the first preset coefficient is the weight coefficient of the coal quality data of the shipping party, and the second preset coefficient is the weight coefficient of the historical average coal quality data.
[0073] By comprehensively calculating the first residual value through the coal quality data of the shipping party, the historical average coal quality data and the initial inspection coal quality data, it is possible to more comprehensively and accurately measure the degree to which the initial inspection coal quality data deviates from the coal quality data of the shipping party and the historical average coal quality data. Compared with the method of judging whether the data is abnormal only by comparing the historical average coal quality data, the embodiment of the present invention reduces the data verification error of the initial inspection coal quality data.
[0074] In other aspects of the embodiments of the present invention, step 104, performing residual calculation based on the sampled coal quality data, the shipping party's coal quality data and the historical average coal quality data to obtain a second residual value, includes: performing residual calculation based on the sampled coal quality data, the shipping party's coal quality data, the historical average coal quality data, a first preset coefficient and a second preset coefficient to obtain a second residual value.
[0075] Specifically, in one embodiment, residual calculation is performed based on the sampled coal quality data, the coal quality data of the shipping party, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain the second residual value, which is implemented by the following formula:
[0076] The second residual value = |a×coal quality data of the shipping party + b×historical average coal quality data|-sampling coal quality data;
[0077] Among them, a represents the first preset coefficient, and b represents the second preset coefficient.
[0078] The first preset coefficient is the weight coefficient of the coal quality data of the shipper, and the second preset coefficient is the weight coefficient of the historical average coal quality data.
[0079] By comprehensively calculating the second residual value of the coal quality data of the shipping party, the historical average coal quality data and the sampled coal quality data, it is possible to more comprehensively and accurately measure the degree to which the sampled coal quality data deviates from the shipping party's coal quality data and the historical average coal quality data. Compared with the method of judging whether the data is abnormal only by comparing the historical average coal quality data, the embodiment of the present invention reduces the data verification error of the sampled coal quality data.
[0080] Please refer to Figure 3 In other aspects of the embodiments of the present invention, after step 102, performing residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value, the method further includes:
[0081] Step 106: When the first residual value is less than or equal to a set threshold, upload the initial inspection coal quality data to the blockchain server.
[0082] When the first residual value is less than or equal to the set threshold, it means that the initial coal quality data is normal, and the data verification server uploads the initial coal quality data to the blockchain server. This facilitates the blockchain server to obtain the best test data based on the initial coal quality data, and save the final test coal quality data as historical data, so as to be used to calculate the historical average data, forming a closed loop for the use of test coal quality data.
[0083] Please refer to Figure 4 The present invention also proposes a data verification method, which is applied to a blockchain server, and the method comprises:
[0084] Step 201: Send the coal quality data of the shipping party to the data verification server.
[0085] The blockchain server sends the coal quality data of the shipper to the data verification server. The coal quality data of the shipper is the test data of the coal quality from the upstream shipper stored in the blockchain server. For example, the coal quality data of the shipper can be the test coal quality data that the coal producer tests and uploads to the blockchain server. Specifically, the coal quality data can include data such as the moisture content, ash content, and fixed carbon of the coal.
[0086] Step 202: receiving the final tested coal quality data sent by the data verification server, so as to calculate the historical average coal quality data based on the final tested coal quality data.
[0087] The blockchain server receives the final coal quality data sent by the data verification server. Since the final coal quality data is the best test data obtained by the data verification server based on the initial coal quality data or the random coal quality data, the final coal quality data is saved as historical data for use in calculating the historical average data, thus forming a closed loop for the use of coal quality data.
[0088] Device Embodiment
[0089] Please refer to Figure 5 The present invention provides a data verification device, comprising:
[0090] The first data receiving module 501 is used to receive the coal quality data of the shipper sent by the blockchain server, and receive the initial coal quality data of the coal test sent by the testing equipment;
[0091] A first residual calculation module 502, configured to perform residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value;
[0092] The second data receiving module 503 is used to receive the sampling coal quality data of the coal test sent by the testing equipment when the first residual value is greater than the set threshold value;
[0093] A second residual calculation module 504, configured to perform residual calculation based on the sampled coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a second residual value;
[0094] The data sending module 505 is used to determine the final tested coal quality data based on the first residual value and the second residual value, and send the final tested coal quality data to the blockchain server.
[0095] Optionally, the first residual calculation module 502 is used to perform residual calculation based on the initial inspection coal quality data, the shipping party's coal quality data, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain a first residual value.
[0096] Optionally, the residual calculation is performed based on the initial inspection coal quality data, the coal quality data of the shipping party, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain a first residual value, which is implemented by the following formula:
[0097] The first residual value = |a×coal quality data of the shipping party + b×historical average coal quality data|-initial inspection coal quality data;
[0098] Among them, a represents the first preset coefficient, and b represents the second preset coefficient.
[0099] Optionally, the second residual calculation module 504 is used to perform residual calculation based on the sampled coal quality data, the shipping party's coal quality data, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain a second residual value.
[0100] Optionally, the residual calculation is performed based on the sampled coal quality data, the coal quality data of the shipping party, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain the second residual value, which is implemented by the following formula:
[0101] The second residual value = |a×coal quality data of the shipping party + b×historical average coal quality data|-sampling coal quality data;
[0102] Among them, a represents the first preset coefficient, and b represents the second preset coefficient.
[0103] Optionally, the data sending module is used to determine that the tested coal quality data corresponding to the minimum value between the first residual value and the second residual value is the final tested coal quality data, and send the final tested coal quality data to the blockchain server.
[0104] Optionally, the data verification device further includes:
[0105] The data uploading module is used to upload the initial inspection coal quality data to the blockchain server when the first residual value is less than or equal to a set threshold.
[0106] The data verification device includes a processor and a memory. The above-mentioned first data receiving module 501, the first residual calculation module 502, the second data receiving module 503, the second residual calculation module 504 and the data sending module 505 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0107] The processor contains a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to solve the defect that the existing technology cannot flexibly use blockchain smart contracts, resulting in insufficient flexibility to meet the business requirements.
[0108] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0109] Please refer to Figure 6 The present invention also provides a data verification device, comprising:
[0110] Data sending module 601, used for sending coal quality data of the shipping party to the data verification server;
[0111] The data receiving module 602 is used to receive the final tested coal quality data sent by the data verification server, so as to calculate the historical average coal quality data based on the final tested coal quality data.
[0112] The data verification device includes a processor and a memory. The data sending module 601, the data receiving module 602, etc. are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
[0113] The processor contains a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to solve the defect that the existing technology cannot flexibly use blockchain smart contracts, resulting in insufficient flexibility to meet the business requirements.
[0114] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0115] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor (processor) 710, a communication interface (Communications Interface) 720, a memory (memory) 730 and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 can call the logic instructions in the memory 730 to execute the data verification method, which includes: receiving the coal quality data of the shipper sent by the blockchain server, and receiving the initial coal quality data of the coal test sent by the testing equipment; performing residual calculation based on the initial coal quality data, the coal quality data of the shipper and the historical average coal quality data to obtain a first residual value; when the first residual value is greater than the set threshold, receiving the random coal quality data of the coal test sent by the testing equipment; performing residual calculation based on the random coal quality data, the coal quality data of the shipper and the historical average coal quality data to obtain a second residual value; determining the final test coal quality data based on the first residual value and the second residual value, and sending the final test coal quality data to the blockchain server. Alternatively, sending the coal quality data of the shipper to the data verification server; receiving the final test coal quality data sent by the data verification server, so as to calculate the historical average coal quality data based on the final test coal quality data.
[0116] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. 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 codes.
[0117] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a machine-readable storage medium, when the computer program is executed by a processor, the computer can execute the data verification method provided by the above methods, the method includes:
[0118] On the other hand, the present invention also provides a machine-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor, it is implemented to execute the data verification method provided by the above methods, the method comprising: receiving the coal quality data of the shipper sent by the blockchain server, and receiving the initial coal quality data of the coal test sent by the testing equipment; performing residual calculation based on the initial coal quality data, the coal quality data of the shipper and the historical average coal quality data to obtain a first residual value; when the first residual value is greater than a set threshold, receiving the random coal quality data of the coal test sent by the testing equipment; performing residual calculation based on the random coal quality data, the coal quality data of the shipper and the historical average coal quality data to obtain a second residual value; determining the final test coal quality data based on the first residual value and the second residual value, and sending the final test coal quality data to the blockchain server. Alternatively, sending the coal quality data of the shipper to the data verification server; receiving the final test coal quality data sent by the data verification server, so as to calculate the historical average coal quality data based on the final test coal quality data.
[0119] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data verification method, characterized in that: Applied to a data verification server, the method comprises: Receive coal quality data from the shipper sent by the blockchain server, and receive initial coal quality data from the testing equipment; Perform residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value; When the first residual value is greater than a set threshold, receiving sampling coal quality data of coal testing sent by the testing equipment; Perform residual calculation based on the sampled coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a second residual value; The final coal quality data is determined based on the first residual value and the second residual value, and the final coal quality data is sent to the blockchain server.
2. The data verification method according to claim 1, characterized in that: The residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value includes: A residual calculation is performed based on the initial inspection coal quality data, the shipping party's coal quality data, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain a first residual value.
3. The data verification method according to claim 2, characterized in that: The residual calculation is performed based on the initial inspection coal quality data, the coal quality data of the shipping party, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain the first residual value, which is achieved by the following formula: The first residual value = |a×coal quality data of the shipping party+b×historical average coal quality data|-initial inspection coal quality data; Among them, a represents the first preset coefficient, and b represents the second preset coefficient.
4. The data verification method according to claim 1, characterized in that: The residual calculation based on the sampled coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a second residual value includes: A residual calculation is performed based on the sampled coal quality data, the coal quality data of the shipping party, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain a second residual value.
5. The data verification method according to claim 4, characterized in that: The residual calculation is performed based on the sampled coal quality data, the coal quality data of the shipping party, the historical average coal quality data, the first preset coefficient and the second preset coefficient to obtain the second residual value, which is achieved by the following formula: The second residual value = |a×coal quality data of the shipping party + b×historical average coal quality data|-sampling coal quality data; Among them, a represents the first preset coefficient, and b represents the second preset coefficient.
6. The data verification method according to any one of claims 1 to 5, characterized in that: The determining the final coal quality data based on the first residual value and the second residual value, and sending the final coal quality data to the blockchain server, comprises: Determine the coal quality data corresponding to the minimum value between the first residual value and the second residual value as the final coal quality data, and send the final coal quality data to the blockchain server.
7. The data verification method according to claim 1, characterized in that: After performing residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value, the method further includes: When the first residual value is less than or equal to the set threshold, the initial inspection coal quality data is uploaded to the blockchain server.
8. A data verification method, characterized in that: Applied to a blockchain server, the method includes: Sending coal quality data of the shipper to the data verification server; The final tested coal quality data sent by the data verification server is received so as to calculate the historical average coal quality data based on the final tested coal quality data.
9. A data verification device, characterized in that: include: The first data receiving module is used to receive the coal quality data of the shipper sent by the blockchain server, and receive the initial coal quality data of the coal test sent by the testing equipment; A first residual calculation module, used to perform residual calculation based on the initial inspection coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a first residual value; A second data receiving module is used to receive the sampling coal quality data of the coal test sent by the testing equipment when the first residual value is greater than the set threshold value; A second residual calculation module, used to perform residual calculation based on the sampled coal quality data, the coal quality data of the shipping party and the historical average coal quality data to obtain a second residual value; A data sending module is used to determine the final coal quality data based on the first residual value and the second residual value, and send the final coal quality data to the blockchain server.
10. A data verification device, characterized in that: include: A data sending module, used for sending the coal quality data of the shipping party to the data verification server; The data receiving module is used to receive the final coal quality data tested by the data verification server, so as to calculate the historical average coal quality data based on the final coal quality data tested.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor implements the data verification method according to any one of claims 1 to 7 when executing the program, or implements the data verification method according to claim 8 when executing the program.
12. A machine-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data verification method according to any one of claims 1 to 7 is implemented, or when the program is executed, the data verification method according to claim 8 is implemented.
