Data processing method, device, equipment, system and storage medium

By processing multiple algorithms and comparing the data to be processed consistently, the target output data is generated, which solves the error problems caused by failures during data processing, and improves the accuracy of data processing and system security.

CN120371592APending Publication Date: 2025-07-25CONTEMPORARY AMPEREX FUTURE ENERGY RES INST (SHANGHAI) LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410092710.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-23
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

During the data processing process, the prior art is difficult to effectively prevent data processing errors caused by bit flip, computing circuit failure, single point failure, etc., which affects system security.

Method used

Multiple processing algorithms are used to redundantly process the data to be processed, and target output data is generated through consistency comparison, and a redundant architecture with diversified algorithms is built, and the redundant architecture is used to ensure the accuracy of data processing results and system security.

Benefits of technology

Improve the accuracy of data processing results, prevent unexpected operations caused by failure or interference, and enhance the security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371592A_ABST
    Figure CN120371592A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device, equipment and a storage medium. The method comprises the steps of receiving to-be-processed data; processing the to-be-processed data by using a plurality of processing algorithms to obtain a plurality of processing results; wherein the multiple processing algorithms are different algorithms for realizing the same processing result; and under the condition that the consistency comparison of the plurality of processing results is passed, generating target output data of the to-be-processed data according to the processing results. Redundant data processing is performed on the to-be-processed data, and the correctness of the processing result is detected through consistency comparison, so that the target output data is generated after the processing result is correct, and the accuracy of the processing result is improved. Unexpected operation caused by faults or interference in the data processing process can be prevented, and the system safety is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, equipment, system and storage medium. Background Art

[0002] At present, in some data processing scenarios, the data processing results are particularly important to the security of the entire system. If there are faults such as bit flipping, operation circuit failure, single point failure, common cause failure, etc. during the data processing process, it will cause errors in data processing. This may bring great safety hazards and may even cause safety accidents or economic losses. Therefore, how to improve the accuracy of data processing results is a technical problem that needs to be solved urgently in this field. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a data processing method, apparatus, device, system and storage medium to achieve the technical effect of improving the accuracy of data processing results.

[0004] A first aspect of an embodiment of the present application provides a data processing method, the method comprising:

[0005] receiving data to be processed;

[0006] Using a plurality of processing algorithms to process the data to be processed respectively to obtain a plurality of processing results; wherein the plurality of processing algorithms are different algorithms for achieving the same processing result;

[0007] When the consistency comparison of the plurality of processing results is passed, target output data of the data to be processed is generated according to the processing results.

[0008] In the above implementation process, redundant data processing is performed on the data to be processed, and then the correctness of the processing result is detected by consistency comparison, so that the target output data is generated after ensuring that the processing result is correct, thereby improving the accuracy of the processing result. In addition, unexpected operations caused by failures or interference during data processing can be prevented, thereby improving system security.

[0009] Furthermore, the method further includes: determining a data processing function failure when the consistency comparison fails. By performing consistency comparison on multiple processing results, a fault condition can be detected before outputting target output data, preventing the output of erroneous processing results, thereby improving system safety.

[0010] Further, the data to be processed includes multiple data blocks. The step of using multiple processing algorithms to process the data to be processed respectively to obtain multiple processing results includes: for each of the processing algorithms, processing the multiple data blocks according to a target processing order corresponding to the processing algorithm to obtain a processing result. In view of the characteristic that the data to be processed includes multiple data blocks, by setting different processing orders for different processing algorithms, when using different processing algorithms to process the same data to be processed, the same processing result is achieved through different processing processes, thereby building a redundant architecture with diverse algorithms, and using the redundant architecture to ensure the accuracy of the data processing result.

[0011] Further, the processing algorithms include redundant operations, and the redundant operations included in different processing algorithms are different, and / or the order of the redundant operations in different processing algorithms is different. By setting different redundant operations for different processing algorithms, when using different processing algorithms to process the same data to be processed, the same processing result is achieved through different processing processes, thereby building a redundant architecture with diverse algorithms, and using the redundant architecture to ensure the accuracy of the data processing result.

[0012] Further, the memory areas where the storage areas corresponding to the multiple processing results are located are different; or the sectors where the storage areas corresponding to the multiple processing results are located are different. By storing different processing results in different storage areas, it is possible to identify the abnormality of the processing result caused by the damage of the storage area, thereby improving the accuracy of the processing result and ensuring the system security.

[0013] Further, the multiple processing algorithms include a first processing algorithm and a second processing algorithm; the processing results include a first processing result obtained by using the first processing algorithm and a second processing result obtained by using the second processing algorithm; the step of generating the target output data of the data to be processed according to the processing results includes: generating a first check code of the first processing result by using a first check algorithm to obtain a first output data including the first processing result and the first check code; generating a second check code of the second processing result by using a second check algorithm to obtain a second output data including the second processing result and the second check code; and performing a merging process on the first output data and the second output data to obtain the target output data. The first check code and the second check code can be used to verify the authenticity and integrity of the data in the subsequent process, so as to improve the security of the system from the perspective of preventing data tampering.

[0014] Further, the first check code is located at the first position of the first output data, and the first output data further includes a first identifier located at the second position; the second check code is located at the second position of the second output data, and the second output data further includes a second identifier located at the first position; the merging the first output data and the second output data to obtain the target output data includes: performing an AND operation on the first processing result and the second processing result to obtain a target processing result; performing an OR operation on the first check code located at the first position and the second identifier to obtain a third check code; and / or performing an OR operation on the first identifier located at the second position and the second check code to obtain a fourth check code; generating the target output data including the target processing result and the target check code; wherein the target check code includes the third check code and / or the fourth check code. The third check code is obtained according to the first check code and the second identifier, and the fourth check code is obtained according to the second check code and the first identifier, which can be used to verify the authenticity and integrity of the subsequent data, so as to improve the security of the system from the perspective of preventing data tampering.

[0015] Further, the method further includes: sending the target output data to a receiving end, so that the receiving end generates a fifth check code of the target processing result by using a pre-stored target check algorithm, obtains a sixth check code after performing an OR operation on the fifth check code and a target identifier, and verifies the target processing result according to the target check code and the sixth check code. By pre-storing the check algorithm and the identifier at the receiving end, the receiving end can verify the target processing result to prevent the target processing result from being tampered with during transmission. And when the consistency comparison function of the data processing device fails and an incorrect target processing result is sent down, the error can be recognized in time, further improving the security of the system.

[0016] A second aspect of the embodiments of the present application provides a data processing device, the device includes:

[0017] a receiving module, configured to receive data to be processed;

[0018] a processing module, configured to process the data to be processed by using a plurality of processing algorithms respectively to obtain a plurality of processing results; wherein each of the processing algorithms is a different algorithm for implementing the same processing result;

[0019] a comparison module, configured to generate target output data of the data to be processed according to the processing result in the case that the consistency comparison of the plurality of processing results passes.

[0020] Further, the processing module includes a plurality of processing sub-modules, and each processing sub-module is configured to process the data to be processed by using a processing algorithm to obtain a corresponding processing result; the plurality of processing sub-modules are mounted in different processors.

[0021] In a third aspect of the embodiments of the present application, a data processing device is provided, and the device includes:

[0022] A processor;

[0023] A memory for storing processor-executable instructions;

[0024] Wherein, when the processor calls the executable instructions, the operations of any of the methods in the first aspect are implemented.

[0025] In a fourth aspect of the embodiments of the present application, a power energy storage system is provided, including a data processing device as described in the third aspect.

[0026] In a fifth aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which computer instructions are stored, and when the computer instructions are executed by a processor, the steps of any of the methods in the first aspect are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1 It is an application scenario of a data processing method provided by an embodiment of the present application;

[0029] Figure 2 It is a schematic flowchart of a data processing method provided by an embodiment of the present application;

[0030] Figure 3 It is a schematic diagram of the processing process of the data to be processed provided by an embodiment of the present application;

[0031] Figure 4 It is a schematic flowchart of another data processing method provided by an embodiment of the present application;

[0032] Figure 5 It is a schematic flowchart of another data processing method provided by an embodiment of the present application;

[0033] Figure 6 It is a schematic diagram of the generation process of the target output data provided by an embodiment of the present application;

[0034] Figure 7 A schematic diagram of a redundant architecture provided in an embodiment of the present application;

[0035] Figure 8 A structural block diagram of a data processing device provided in an embodiment of the present application;

[0036] Figure 9 A hardware structure diagram of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0038] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0039] In some data processing scenarios, the data processing results will affect the safety of the entire system. Taking the secondary control system in the power energy storage product as an example, the secondary control system is the "brain" of the DC direct-mounted energy storage valve product, and its reliability and safety are particularly important to the safety of the entire power energy storage product. Among them, the secondary control system usually processes the received data and sends the processing results to other devices. At this time, if the processing result is control data or operation data, the accuracy of the data processing will affect the control result or operation result. If a single point failure, common cause failure, etc. occur in the data processing process, it may cause the equipment to perform unexpected operations, which may bring great safety hazards, and even cause major safety accidents or economic losses. Therefore, how to improve the accuracy of data processing results is a technical problem that needs to be solved urgently in this field.

[0040] To this end, the embodiments of the present application provide a data processing method for improving the accuracy of data processing results. Specifically, the received data to be processed is processed separately using multiple processing algorithms to obtain multiple processing results, and then whether the multiple processing results are consistent is compared. In the case where the consistency comparison passes, the target output data is generated according to the processing results. Since each processing algorithm can achieve the same processing result, under normal circumstances, the respective processing results obtained using different processing algorithms should be consistent. However, if a failure occurs during the data processing by a certain processing algorithm, the processing result obtained from this data processing will be different from other processing results. Therefore, by performing redundant processing on the data to be processed and comparing the consistency of multiple processing results, it is possible to determine whether a failure has occurred during the data processing process, and then verify whether the processing result is correct, ensuring the security of the system.

[0041] The following Figures 1-9 describes the embodiments of the present application. Refer to Figure 1 , which is an application scenario of a data processing method provided by the embodiments of the present application, including a communication device 110 and a data processing device 120. Among them, the communication device 110 is communicatively connected to the data processing device 120. The above-mentioned data processing method can be applied to the data processing device 120.

[0042] The data processing device 120 refers to a device with data processing capabilities. Of course, the data processing device 120 may also have other required functions. As an example, the data processing device 120 may be the secondary control system mentioned above. Of course, in different application fields, the data processing device 120 may specifically be other forms of devices, and the embodiments of the present application do not limit the specific form of the data processing device here.

[0043] According to some embodiments of the present application, in a first aspect, a data processing method is provided. The method can be applied to scenarios with requirements for data processing accuracy, such as but not limited to energy storage scenarios, control scenarios, etc. The above-mentioned data processing method includes steps 210-step 230 as Figure 2 shown.

[0044] Step 210: Receive the data to be processed;

[0045] Step 220: Process the data to be processed separately using multiple processing algorithms to obtain multiple processing results;

[0046] Among them, the multiple processing algorithms are different algorithms for achieving the same processing result;

[0047] Step 230: In the case where the consistency comparison of the multiple processing results passes, generate the target output data of the data to be processed according to the processing results.

[0048] Among them, the data to be processed can be sent from the communication device 110 to the data processing device 120.

[0049] The multiple processing algorithms can be preset in the execution entity of the method, that is, the data processing device 120. The so-called multiple processing algorithms are different algorithms used to achieve the same processing result, which means that multiple algorithms can all achieve the same logical processing function, but they are different in algorithms. That is, when each processing algorithm faces the same data, in the case of normal operation without faults or interference, the data processing processes are different, but the finally output processing results are the same.

[0050] In this way, when the multiple processing algorithms are used to process the data to be processed respectively, in the case of normal operation without faults or interference, the multiple processing results obtained are consistent. Therefore, after obtaining the multiple processing results, the consistency of all the processing results can be compared. Among them, each processing algorithm corresponds to a processing result respectively.

[0051] The passing of the consistency comparison can be, for example, that all the processing results compared are consistent; it can also be that the number of consistent processing results is greater than the first quantity threshold; it can also be that the deviation of the multiple processing results is within the allowable deviation range. The first quantity threshold and the allowable deviation range can be set according to the actual situation, and are not limited in this embodiment.

[0052] In the case where the consistency comparison passes, the target output data of the data to be processed can be generated according to the processing result. The target output data includes the correct processing result of the data to be processed.

[0053] Exemplarily, the consistent target processing results can be screened out from all the processing results, and the target processing results can be determined as the correct processing results, so as to generate the target output data.

[0054] Actually, using multiple processing algorithms to process the same data to be processed respectively can also be called multi-channel processing. Each channel corresponds to a processing algorithm. In this way, the multi-channel data processing architecture is actually a redundant architecture with algorithm diversification. The data to be processed undergoes multi-channel processing, which is actually redundant processing of the data to be processed.

[0055] If the processing results output by each channel are consistent, it indicates that no channel has an abnormality. If the processing result output by one channel or some channels is inconsistent with the processing results output by the remaining channels, there may be an abnormality in that channel. At this time, other methods can be used to determine the channel with the abnormality.

[0056] In addition, when processing data to be processed using multiple processing algorithms, as an example, the processing procedures corresponding to multiple algorithms can be executed by the same processor. The processor can refer to a device control core such as a CPU (Central Processing Unit), or can also refer to a core in a multi-core processor.

[0057] Optionally, the same processor can execute the processing procedures corresponding to multiple processing algorithms in parallel. Optionally, the same processor can execute the processing procedures corresponding to multiple processing algorithms sequentially one after another.

[0058] As an example, the processing procedures corresponding to multiple algorithms can be executed by multiple processors.

[0059] It can be seen that a data processing method provided in this embodiment performs redundant data processing on the data to be processed, and then detects the correctness of the processing result through consistency comparison. It can be seen that through consistency comparison, the target output data can be generated after ensuring the correctness of the processing result, thereby improving the accuracy of the processing result. And it can prevent unexpected operations caused by faults or interferences during the data processing process, improving the system security.

[0060] Based on the above embodiments, in some embodiments, the method may further include:

[0061] In the case where the consistency comparison fails, determine that the data processing function is faulty.

[0062] The failure of the consistency comparison can be, for example, that all the processing results compared are inconsistent; there is a processing result that is inconsistent with other processing results; the number of inconsistent processing results is greater than a second quantity threshold; or the deviation between multiple processing results exceeds the allowed deviation range. Among them, the second quantity threshold can be the same as or different from the first quantity threshold described above. The second quantity threshold and the allowed deviation range can be set according to the actual situation, and this embodiment does not limit them here.

[0063] There are various reasons for the failure of the data processing function, such as including but not limited to bit flipping during data transmission, a fault in the arithmetic circuit for implementing the data processing function, insufficient power supply, damage to the memory, etc.

[0064] In the case where the consistency comparison fails, it can be determined that the data processing function is faulty. It can be seen that by performing consistency comparison on multiple processing results, the fault situation can be detected before the target output data is output, preventing the output of incorrect processing results to improve the system security. At this time, optionally, each processing result can be discarded. After the data processing function returns to normal, multiple processing results can be generated again using multiple processing algorithms.

[0065] Based on the above embodiments, regarding multiple different processing algorithms for achieving the same processing result, multiple different processing algorithms that can achieve the same processing result can be determined according to the characteristics of the data to be processed. For example, in some embodiments, the characteristic of the data to be processed is that it includes multiple data blocks, and the processing result is obtained by combining the corresponding processing of each data block. And the processing of each data block is independent of each other and does not affect each other. Then, the generation process of multiple processing results in step 220 may include:

[0066] For each of the processing algorithms, process the multiple data blocks according to the target processing order corresponding to the processing algorithm to obtain a processing result.

[0067] Different processing algorithms correspond to different processing orders. For example, the processing order may be the same as the arrangement order of the data blocks in the data to be processed; it may be the opposite of this arrangement order; it may be to process the data blocks in the odd positions first and then the data blocks in the even positions; it may also be to process the data blocks in the even positions first and then the data blocks in the odd positions, and so on.

[0068] Then when processing using multiple processing algorithms, the target processing order corresponding to the processing algorithm can be determined, and then the multiple data blocks can be processed according to the target processing order to obtain the sub-processing results of each data block. Finally, the multiple sub-processing results can be assembled to obtain the processing result corresponding to the processing algorithm.

[0069] See Figure 3 , taking multiple processing algorithms including processing algorithm 1 and processing algorithm 2 as an example to illustrate this embodiment. As Figure 3 shown, the data to be processed includes N data blocks, which are data block 1 (Block-1), data block 2 (Block-2) …… data block N (Block-N) respectively. The arrangement order of the N data blocks in the data to be processed is the 1-N order. When processing the data to be processed using processing algorithm 1, first determine that the target processing order corresponding to processing algorithm 1 is the 1-N order. In this way, corresponding processing can be first performed on data block 1 to obtain the sub-processing result (Data-1) of data block 1, then corresponding processing is performed on data block 2 to obtain the sub-processing result (Data-2) of data block 2, and so on, until finally corresponding processing is performed on data block N to obtain the sub-processing result (Data-3) of data block N. After obtaining the sub-processing results corresponding to the N data blocks respectively, the N sub-processing results can be assembled to obtain processing result 1 corresponding to processing algorithm 1.

[0070] Similarly, when using processing algorithm 2 to process the data to be processed, first determine that the target processing order corresponding to processing algorithm 2 is the N-1 order. In this way, corresponding processing can be first performed on data block N to obtain the sub-processing result of data block N (Data-N), then corresponding processing is performed on data block N-1 to obtain the sub-processing result of data block N-1, and so on, until finally corresponding processing is performed on data block 1 to obtain the sub-processing result of data block 1 (Data-1). After obtaining the sub-processing results corresponding to the N data blocks respectively, the N sub-processing results can be assembled to obtain the processing result 2 corresponding to processing algorithm 2.

[0071] In this embodiment, in view of the characteristic that the data to be processed includes multiple data blocks, by setting different processing orders for different processing algorithms, when using different processing algorithms to process the same data to be processed, the same processing result is achieved through different processing processes, thereby building a redundant architecture with diverse algorithms, and using the redundant architecture to ensure the accuracy of the data processing result.

[0072] For another example, in some embodiments, the processing algorithm may include redundant operations. The redundant operation refers to an operation that can cancel each other out during the operation process. Since the redundant operations can cancel each other out during the operation process, adding redundant operations to the processing algorithm will not affect the processing result.

[0073] As an example, the redundant operations included in different processing algorithms are different. Since the redundant operations do not affect the processing result, adding different redundant operations to different processing algorithms will also not affect the processing result.

[0074] As an example, the order of the redundant operations in different processing algorithms is different. For example, if the processing algorithm includes multiple redundant operations, then the operation order between the multiple redundant operations in different processing algorithms can be different.

[0075] As an example, at least some of the redundant operations in different processing algorithms are different, and the order of the same redundant operations is different. In this way, different processing algorithms are different in time.

[0076] It can be seen that in this embodiment, by setting different redundant operations for different processing algorithms, when using different processing algorithms to process the same data to be processed, the same processing result is achieved through different processing processes, thereby building a redundant architecture with diverse algorithms, and using the redundant architecture to ensure the accuracy of the data processing result.

[0077] Based on any of the above embodiments, after obtaining multiple processing results using multiple processing algorithms, the multiple processing results can be stored first, and then subsequent steps can be executed. In some possible scenarios, if the storage area used to store the processing results is damaged, it may cause the processing result read after storing the correct processing result in the damaged storage area to be incorrect, although there is no abnormality in the processing process of the data to be processed.

[0078] Therefore, in order to prevent the damage of the storage area from affecting the accuracy of the processing results, in some embodiments, the storage areas corresponding to the multiple processing results are different. That is, after obtaining multiple processing results, the multiple processing results are respectively stored in different storage areas.

[0079] As an example, the memories where the storage areas corresponding to the multiple processing results are located are different. That is, multiple memories are used to store multiple processing results.

[0080] As an example, the sectors where the storage areas corresponding to the multiple processing results are located are different. That is, the same memory can be used to store multiple processing results, but each processing result is respectively stored in different sectors.

[0081] Among them, the memory can be RAM (Random Access Memory).

[0082] In this way, when a certain storage area is damaged, it affects the processing result in that storage area, but does not affect the processing results in other storage areas. The incorrect processing result can be found through consistency comparison. Obviously, if all processing results are stored in the same storage area, when the storage area is damaged, all processing results will have the same error, resulting in the same incorrect processing result. Then it will be impossible to find the abnormality through consistency comparison.

[0083] Optionally, different processing algorithms can also be respectively stored in different memories; or different processing algorithms are respectively stored in different sectors;

[0084] Optionally, during the process of processing the data to be processed using different processing algorithms, the different intermediate result data obtained are respectively stored in different memories; or different intermediate result data are respectively stored in different sectors.

[0085] It can be seen that in this embodiment, by storing different processing results in different storage areas, the processing result abnormality caused by the damage of the storage area can be identified, thereby improving the accuracy of the processing results and ensuring the system security.

[0086] In addition, based on any of the above embodiments, the multiple processing algorithms may include a first processing algorithm and a second processing algorithm. Correspondingly, the processing results may include a first processing result obtained by processing the data to be processed using the first processing algorithm, and a second processing result obtained by processing the data to be processed using the second processing algorithm. On this basis, the generation process of the target output data in step 230 may include steps 231-step 233 as shown in Figure 4 as follows.

[0087] Step 231: Generate a first check code for the first processing result using a first check algorithm, and obtain a first output data including the first processing result and the first check code;

[0088] Step 232: Generate a second check code for the second processing result using a second check algorithm, and obtain a second output data including the second processing result and the second check code;

[0089] Step 233: Perform a merging process on the first output data and the second output data to obtain the target output data.

[0090] Among them, the first check algorithm and the second check algorithm are different check algorithms.

[0091] Taking the first processing result as the input of the first check algorithm, the output first check code can be obtained. Carrying the first check code with the first processing result can obtain the first output data.

[0092] Taking the second processing result as the input of the second check algorithm, the output second check code can be obtained. Carrying the second check code with the second processing result can obtain the second output data.

[0093] Finally, performing a merging process on the obtained first output data and second output data can obtain the target output data.

[0094] It can be seen that the authenticity and integrity of the data can be verified subsequently through the first check code and the second check code, so as to improve the security of the system from the perspective of preventing data tampering.

[0095] Of course, if there are more than two processing algorithms, then when generating the target output data, any two processing results can be selected from the consistent multiple processing results. The any two processing results are the above-mentioned first processing result and second processing result respectively, and the target output data is generated according to the method provided in this embodiment.

[0096] Based on the above embodiments, in order to distinguish the first output data from the second output data, in some embodiments, corresponding identifiers may also be added to each output data. That is, a first identifier may be added to the first output data; a second identifier may be added to the second output data. In addition, since each channel corresponds to a processing algorithm, each channel will output a kind of output data. For example, the first channel outputs the first output data, and the second channel outputs the second output data. Thus, the identifier may also be referred to as a channel identifier. That is, the first identifier may also be called the first channel identifier, and the second identifier may also be called the second channel identifier. Among them, the first processing result, the second processing result, the first identifier, the second identifier, the first check code, and the second check code are all in binary data form.

[0097] In addition, the check code and the channel identifier may also be specified at the specified positions in the output data. For example, each output data includes a first position and a second position, and the first position in different output data is fixed, and the second position in different output data is also fixed. Of course, the output data may also include other positions, and the relationship between the first position and the second position is not limited in this embodiment.

[0098] In this embodiment, it may be specified that the first check code is located at the first position of the first output data, and the first identifier is located at the second position of the first output data. And it is specified that the second check code is located at the second position of the second output data, and the second identifier is located at the first position of the second output data. Thus, the first check code and the second identifier are in the same first position, and the first check code and the second identifier correspond to each other in the position of the output data. The second check code and the first identifier are in the same second position in the output data, and the second check code and the first identifier correspond to each other in the position of the output data.

[0099] On this basis, the step of merging the first output data and the second output data in step 233 may include steps 2331 - 2333 as Figure 5 shown.

[0100] Step 2331: Perform an AND operation on the first processing result and the second processing result to obtain a target processing result;

[0101] Step 2332: Perform an OR operation on the first check code located at the first position and the second identifier to obtain a third check code; and / or perform an OR operation on the first identifier located at the second position and the second check code to obtain a fourth check code;

[0102] Step 2333: Generate the target output data including the target processing result and the target check code.

[0103] Among them, the target check code includes the third check code and / or the fourth check code.

[0104] When the processing algorithm includes two cases, the passing of the consistency comparison means that the first processing result is consistent with the second processing result. Thus, performing an AND operation on the first processing result and the second processing result, the obtained operation result is consistent with the first processing result and the second processing result.

[0105] The first check code and the second identifier are both in the first position. The first check code and the second identifier in the same first position can be subjected to an OR operation to obtain a third check code.

[0106] Similarly, the second check code and the first identifier are both in the second position in the output data. The second check code and the first identifier in the same second position can be subjected to an OR operation to obtain a fourth check code.

[0107] As an example, the first check code and the second identifier can be subjected to an OR operation to obtain a third check code. And the third check code is determined as the target check code. Thus, the target output data carries the target processing result and the third check code.

[0108] As an example, the second check code and the first identifier can be subjected to an OR operation to obtain a fourth check code. And the fourth check code is determined as the target check code. Thus, the target output data carries the target processing result and the fourth check code.

[0109] As an example, the first check code and the second identifier can be subjected to an OR operation to obtain a third check code, and the second check code and the first identifier can be subjected to an OR operation to obtain a fourth check code. And the third check code and the fourth check code are determined as the target check code. Thus, the target output data carries the target processing result, the third check code and the fourth check code.

[0110] Exemplarily, the target output data also includes a first position and a second position. If the target output data carries both the third check code and the fourth check code at the same time, the third check code can be in the first position and the fourth check code can be in the second position.

[0111] Take Figure 6 as an example to illustrate this embodiment. As Figure 6 shown, the first processing result in the first output data is correspondingly set with the second processing result in the second output data. After performing an AND operation on them bit by bit, the target processing result can be obtained.

[0112] The first check code in the first output data is correspondingly set with the second identifier in the second output data, that is, in the first position. After performing an OR operation on them bit by bit, a third check code can be obtained. The third check code is in the first position of the target output data.

[0113] The first identifier in the first output data is set corresponding to the second check code in the second output data, that is, it is located at the second position. After performing an OR operation on them bit by bit, the fourth check code can be obtained. The fourth check code is located at the second position of the target output data.

[0114] Thus, the target output data including the target processing result, the third check code, and the fourth check code is finally obtained.

[0115] Of course, the target output data may also only include the target processing result and the third check code, or only include the target processing result and the fourth check code. This application does not limit this here.

[0116] It can be known that the third check code is obtained according to the first check code and the second identifier, and the fourth check code is obtained according to the second check code and the first identifier, which can be used to verify the authenticity and integrity of the subsequent data, so as to improve the security of the system from the perspective of preventing data tampering.

[0117] Based on the above embodiments, further, the method may further include the steps of:

[0118] Send the target output data to the receiving end.

[0119] Optionally, the receiving end may include communication device 110. That is, the sending end of the data to be processed and the receiving end of the target output data may be the same device.

[0120] Optionally, the receiving end may include other receiving devices other than communication device 110.

[0121] The receiving end may pre-store a target verification algorithm and a target identifier. In addition, the receiving end may obtain the target check code from the received target output data.

[0122] As an example, the target verification algorithm is the first verification algorithm; the target identifier is the second identifier; the target check code is the third check code. In this way, the receiving end can obtain the target processing result from the received target output data, and use the pre-stored first verification algorithm to generate a fifth check code of the target processing result locally. Subsequently, perform an OR operation on the fifth check code and the second identifier to obtain a sixth check code. And verify the target processing result according to the third check code and the sixth check code.

[0123] It can be understood that if the target processing result is consistent with the first processing result, then the first check code and the fifth check code obtained by using the first verification algorithm respectively are consistent, and then the third check code and the sixth check code obtained by performing an OR operation with the second identifier should also be consistent. Therefore, if the third check code and the sixth check code are consistent, it can be determined that the target processing result is correct.

[0124] As another example, the target verification algorithm is the second verification algorithm; the target identifier is the first identifier; and the target verification code is the fourth verification code. In this way, the receiving end can obtain the target processing result from the received target output data, and use the pre-stored second verification algorithm to locally generate the fifth verification code of the target processing result. Subsequently, the fifth verification code is subjected to an OR operation with the first identifier to obtain the sixth verification code. And the target processing result is verified according to the third verification code and the sixth verification code.

[0125] It can be understood that if the target processing result is consistent with the second processing result, then the second verification code and the fifth verification code obtained by using the second verification algorithm respectively are consistent, and then the fourth verification code and the sixth verification code obtained after the OR operation with the first identifier should also be consistent. Therefore, if the fourth verification code and the sixth verification code are consistent, it can be determined that the target processing result is correct.

[0126] In some possible scenarios, the consistency comparison function of multiple processing results may malfunction. Taking the first processing result and the second processing result as an example, if the first processing result and the second processing result are inconsistent, but due to a malfunction of the consistency comparison function, it will be determined that the first processing result and the second processing result pass the consistency comparison. And subsequently, according to Figure 5 the described embodiment, the first processing result and the second processing result are subjected to an AND operation to obtain the target processing result. Since the first processing result and the second processing result are actually inconsistent, the target processing result obtained after the AND operation is neither consistent with the first processing result nor consistent with the second processing result.

[0127] Subsequently, when the receiving end obtains the wrong target processing result from the received target output data, when generating the fifth verification code of the target processing result by using the target verification algorithm and obtaining the sixth verification code after the OR operation of the fifth verification code and the target identifier, it is found that the sixth verification code is not consistent with the target verification code. From this, it can be determined that the target processing result is wrong, and it can be determined that there is a malfunction in the consistency comparison function in the data processing device, or the target processing result is tampered with during the transmission process.

[0128] It can be seen that in this embodiment, by pre-storing the verification algorithm and the identifier at the receiving end, the receiving end can verify the target processing result, preventing the target processing result from being tampered with during the transmission process. And when the consistency comparison function of the data processing device malfunctions and issues a wrong target processing result, the error can also be identified in time, further improving the system security.

[0129] To better understand the above embodiment, the following is illustrated with a specific example.

[0130] An embodiment of the present application provides a data processing method, which is applied to a secondary control system of a power energy storage product. Among them, the secondary control system is communicatively connected to at least one communication device and at least one controlled device. The controlled device can receive an operation instruction from the secondary control system and execute the operation indicated by the operation instruction.

[0131] See Figure 7 , the secondary control system is equipped with a redundant architecture as Figure 7 shown. The redundant architecture includes a receiving communication module M0, a main logic processing module M1, a redundant logic processing module M2, a comparator M3, and a sending communication module M4.

[0132] Among them, the communication module M0, the main logic processing module M1, the redundant logic processing module M2, the comparator M3, and the sending communication module M4 can run in the same hardware unit. Or, the main logic processing module M1 and the redundant logic processing module M2 can run on two different hardware units respectively, and at the same time, the comparator M3 can be used as an independent hardware unit.

[0133] The receiving communication module M0 is used to receive the data to be processed InData from the communication device, and copy the data to be processed InData twice to obtain the data to be processed InData_1 and the data to be processed InData_2, and provide them to the main logic processing module M1 and the redundant logic processing module M2 respectively.

[0134] Optionally, the data to be processed InData can be a set of operation instructions for instructing a plurality of controlled devices to execute corresponding operations. For example, the set of operation instructions may include a power-on instruction for a part of the controlled devices and a power-off instruction for another part of the controlled devices. In this way, the secondary control device needs to process the set of operation instructions into operation instructions for each controlled device.

[0135] In addition, the data to be processed InData can be as Figure 3 shown, including N data blocks, namely data block 1, data block 2... data block N. The arrangement order of the N data blocks in the data to be processed InData is in the order of 1-N.

[0136] The main logic processing module M1 is responsible for the logic processing function of the secondary control system. Specifically, after receiving the data to be processed InData_1, the integrity of the data to be processed InData_1 can be verified first. If the integrity verification fails, the data to be processed InData_1 is discarded, and no output data is generated in this processing.

[0137] When the integrity check passes, the data to be processed InData_1 can be processed in the target processing order of 1-N. After parsing and processing each data block, the sub-processing results corresponding to the respective data blocks are merged to generate the first processing result AppData_M1.

[0138] Subsequently, using the first verification algorithm configured in the configuration file, the first verification code CRC_1 of the first processing result AppData_M1 is calculated, and combined with the first identifier ID_1 of the channel configured in the configuration file, the first output data OutData_1 is generated. Among them, the first verification code CRC_1 is located at the first position in the first output data OutData_1, and the first identifier ID_1 is located at the second position. The generated first output data OutData_1 can be sent to the comparator M3.

[0139] The redundant logic processing module M2 implements the same logic processing function as the main logic processing module M1. However, in the algorithm design, a processing algorithm different from that of the main logic processing module M1 is adopted. Specifically, after receiving the data to be processed InData_2, the integrity of the data to be processed InData_2 is first checked. If the integrity check fails, the data to be processed InData_2 is discarded, and no output data is generated for this processing.

[0140] When the integrity check passes, the data to be processed InData_2 can be processed in the target processing order of N-1. After parsing and processing each data block, the sub-processing results corresponding to the respective data blocks are merged to generate the second processing result AppData_M2.

[0141] Subsequently, using the second verification algorithm configured in the configuration file, the second verification code CRC_2 of the second processing result AppData_M2 is calculated, and combined with the second identifier ID_2 of the channel configured in the configuration file, the second output data OutData_2 is generated. Among them, the first verification code CRC_2 is located at the second position in the second output data OutData_2, and the second identifier ID_2 is located at the first position. The generated second output data OutData_2 can be sent to the comparator M3.

[0142] The comparator M3 is responsible for performing consistency comparison and merging on the output data generated by the two logic processing modules. Specifically, first, the consistency between the first processing result AppData_M1 and the second processing result AppData_M2 is compared. If the consistency comparison fails, it is determined that the data processing function of the secondary control system fails. No output data is generated for this processing.

[0143] In the case where the consistency comparison passes, perform a bitwise AND operation on the first processing result AppData_M1 and the second processing result AppData_M2 to generate the target processing result AppData. Perform a bitwise OR operation on the first check code CRC_1 located at the first position and the second identifier ID_2 to generate the third check code Checkword_1. Perform a bitwise OR operation on the second check code CRC_2 located at the second position and the first identifier ID_1 to generate the fourth check code Checkword_2. Finally, obtain the target output data OutData including the target processing result AppData, the third check code Checkword_1, and the fourth check code Checkword_2. And the target output data OutData meets the requirements of the IEC60044-8 standard. The generated target output data OutData can be sent to the sending communication module M4. The sending communication module M4 is responsible for sending the target output data OutData to each controlled device.

[0144] It can be seen that a data processing method provided by this embodiment performs redundant data processing on the data to be processed, and then detects the correctness of the processing result through consistency comparison. Thus, the target output data is generated after ensuring the correctness of the processing result, improving the accuracy of the processing result. And it can prevent unexpected operations caused by faults or interferences during the data processing process, improving the system security.

[0145] According to some embodiments of the present application, a second aspect provides a data processing device. As Figure 8 shown, the data processing device 800 includes:

[0146] A receiving module 810, configured to receive the data to be processed;

[0147] A processing module 820, configured to process the data to be processed by using multiple processing algorithms respectively to obtain multiple processing results; wherein, each of the processing algorithms is a different algorithm for implementing the same processing result;

[0148] A comparison module 830, configured to generate the target output data of the data to be processed according to the processing results in the case where the consistency comparison of the multiple processing results passes.

[0149] In some embodiments, the processing module 820 may include multiple processing sub-modules, and each processing sub-module is configured to process the data to be processed by using one processing algorithm to obtain the corresponding processing result; the multiple processing sub-modules may be mounted in different processors.

[0150] In some embodiments, if the processing module includes two processing sub-modules, then the receiving module 810 may be Figure 7The receiving communication module M0 shown. The processing module 820 may include a main logic processing module M1 and a redundant logic processing module M2 as shown in Figure 7 The comparator M3 shown in Figure 7 may be the comparator M3 shown.

[0151] In some embodiments, the comparison module 830 is further configured to:

[0152] Determine a data processing function failure in the case where the consistency comparison fails.

[0153] In some embodiments, the data to be processed includes a plurality of data blocks, and the processing module 820 is specifically configured to: for each of the processing algorithms, process the plurality of data blocks in a target processing order corresponding to the processing algorithm to obtain a processing result.

[0154] In some embodiments, the processing algorithms include redundant operations, and the redundant operations included in different processing algorithms are different, and / or the order of redundant operations in different processing algorithms is different.

[0155] In some embodiments, the storage areas corresponding to the plurality of processing results are in different memories; or

[0156] The storage areas corresponding to the plurality of processing results are in different sectors.

[0157] In some embodiments, the multiple processing algorithms include a first processing algorithm and a second processing algorithm; the processing results include a first processing result obtained by using the first processing algorithm and a second processing result obtained by using the second processing algorithm;

[0158] The comparison module 830 is specifically configured to:

[0159] Generate a first check code for the first processing result by using a first check algorithm to obtain first output data including the first processing result and the first check code;

[0160] Generate a second check code for the second processing result by using a second check algorithm to obtain second output data including the second processing result and the second check code;

[0161] Perform a merging process on the first output data and the second output data to obtain the target output data.

[0162] In some embodiments, the first check code is located at a first position of the first output data, and the first output data further includes a first identifier located at a second position; the second check code is located at a second position of the second output data, and the second output data further includes a second identifier located at the first position;

[0163] The comparison module 830 is specifically configured to:

[0164] Perform an AND operation on the first processing result and the second processing result to obtain a target processing result;

[0165] Perform an OR operation on the first check code at the first position and the second identifier to obtain a third check code; and / or perform an OR operation on the first identifier at the second position and the second check code to obtain a fourth check code;

[0166] Generate the target output data including the target processing result and a target check code; wherein, the target check code includes the third check code and / or the fourth check code.

[0167] In some embodiments, the data processing device 800 further includes:

[0168] A sending module, configured to send the target output data to a receiving end, so that the receiving end generates a fifth check code of the target processing result by using a pre-stored target check algorithm, obtains a sixth check code after performing an OR operation on the fifth check code and a target identifier, and checks the target processing result according to the target check code and the sixth check code.

[0169] For the implementation processes of the functions and roles of each module in the above device, refer to the implementation processes of the corresponding steps in the above method for details, which will not be elaborated here.

[0170] Based on a data processing method according to any of the above embodiments, a third aspect of the present application further provides a structural schematic diagram of a data processing device as Figure 9 shown. As Figure 9 , at the hardware level, the data processing device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement a data processing method according to any of the above embodiments.

[0171] Based on a data processing method according to any of the above embodiments, a fourth aspect of the present application further provides a power energy storage system. The power energy storage system includes a data processing device as Figure 9 shown.

[0172] A fifth aspect of the present application further provides a computer storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute a data processing method according to any of the above embodiments.

[0173] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0174] In addition, each functional module in various embodiments of this application can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.

[0175] If the described functions are implemented in the form of software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs, etc., which can store program codes.

[0176] The above are only embodiments of the present application and are not intended to limit the protection scope of the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application. It should be noted that similar reference numerals and letters indicate similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0177] As described above, these are only the specific implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, and all should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0178] It should be noted that in this text, relative terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the said element.

Claims

1. A data processing method, characterized in that, The method includes: Receiving data to be processed; Processing the data to be processed respectively by using a plurality of processing algorithms to obtain a plurality of processing results; wherein, the plurality of processing algorithms are different algorithms for achieving the same processing result; Generating target output data of the data to be processed according to the processing results in the case that the consistency comparison of the plurality of processing results passes.

2. The method according to claim 1, wherein The method further includes: Determining a data processing function failure in the case that the consistency comparison fails.

3. The method according to claim 1 or 2, characterized in that, The data to be processed includes a plurality of data blocks, and the processing the data to be processed respectively by using a plurality of processing algorithms to obtain a plurality of processing results includes: For each of the processing algorithms, processing the plurality of data blocks according to a target processing order corresponding to the processing algorithm to obtain a processing result.

4. The method according to claim 1 or 2, characterized in that The processing algorithm includes redundant operations, and the redundant operations included in different processing algorithms are different, and / or the order of the redundant operations in different processing algorithms is different.

5. The method according to any one of claims 1-4, wherein The memories where the storage areas corresponding to the plurality of processing results are located are different; or The sectors where the storage areas corresponding to the plurality of processing results are located are different.

6. The method according to any one of claims 1-5, characterized in that The plurality of processing algorithms include a first processing algorithm and a second processing algorithm; the processing results include a first processing result obtained by using the first processing algorithm and a second processing result obtained by using the second processing algorithm; The generating target output data of the data to be processed according to the processing results includes: Generating a first check code of the first processing result by using a first check algorithm to obtain a first output data including the first processing result and the first check code; Generating a second check code of the second processing result by using a second check algorithm to obtain a second output data including the second processing result and the second check code; Performing a merging process on the first output data and the second output data to obtain the target output data.

7. The method according to claim 6, characterized in that, The first check code is located at a first position of the first output data, and the first output data further includes a first identifier located at a second position; the second check code is located at a second position of the second output data, and the second output data further includes a second identifier located at a first position; The performing a merging process on the first output data and the second output data to obtain the target output data includes: Performing an AND operation on the first processing result and the second processing result to obtain a target processing result; Performing an OR operation on the first check code located at the first position and the second identifier to obtain a third check code; and / or performing an OR operation on the first identifier located at the second position and the second check code to obtain a fourth check code; Generating the target output data including the target processing result and a target check code; wherein, the target check code includes the third check code and / or the fourth check code.

8. The method according to claim 7, wherein The method further includes: Send the target output data to the receiving end, so that the receiving end generates the fifth check code of the target processing result by using a pre-stored target verification algorithm, obtains the sixth check code after performing an OR operation on the fifth check code and the target identifier, and verifies the target processing result according to the target check code and the sixth check code.

9. A data processing device, characterized in that, The device includes: A receiving module, configured to receive data to be processed; A processing module, configured to process the data to be processed by using a plurality of processing algorithms respectively to obtain a plurality of processing results; wherein each of the processing algorithms is a different algorithm for implementing the same processing result; A comparison module, configured to generate target output data of the data to be processed according to the processing result when the consistency comparison of the plurality of processing results passes.

10. The device according to claim 9, characterized in that, The processing module includes a plurality of processing sub-modules, each of the processing sub-modules is configured to process the data to be processed by using one processing algorithm to obtain a corresponding processing result; the plurality of processing sub-modules are mounted in different processors.

11. A data processing device, characterized in that, The device includes: A processor; A memory for storing processor-executable instructions; Wherein, when the processor calls the executable instructions, the operations of the method according to any one of claims 1-8 are implemented.

12. A power energy storage system, characterized in that, Including a data processing device as described in claim 11.

13. A computer-readable storage medium, characterized in that, Stored thereon are computer instructions, and when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1-8 are implemented.