A secure database, secure data processing system and method
By designing a secure database that supports network and bus communication in the high-security platform door control system, and adopting centralized processing and 2oo2 architecture, the problems of scattered data processing and poor reliability are solved, achieving high reliability and security, and satisfying multi-node scenarios. needs.
Patent Information
- Application Number
- CN202111623919.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Existing data processing methods have problems such as scattered data processing, poor reliability, and low computing performance in multiple network nodes and CAN node scenarios, making it difficult to meet the needs of high-security platform door control systems.
A secure database is designed to support network and bus communication. It uses two sub-databases, POP_DB and PUSH_DB, to provide network writing, network reading, CAN writing, CAN reading, API writing, and API reading interfaces to centrally process data. , using 2oo2 architecture and combined fail-safe principles to protect data integrity and consistency through CRC and SHA1 algorithms.
It improves the reliability and security of data processing, achieves SIL4 safety integrity, supports users to flexibly configure node mapping, meets different operating modes, and ensures the timeliness and integrity of data processing.
Smart Images

Figure CN114281748B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of safety communication of rail transit, and in particular to a safety database, a safety data processing system and a safety data processing method. Background Art
[0002] The platform door control system is an important part of ensuring the safe and smooth operation of urban rail transit. A new type of high-security platform door control system (PSDC) directly receives the communication control commands of the vehicle-mounted system, which improves the operation efficiency. The PSDC is mainly composed of a safety communication subsystem and a drive acquisition subsystem. The safety communication subsystem communicates safely with external signal equipment through the network. The external signal equipment includes at least the vehicle-mounted system and the interlocking system; the safety communication subsystem interacts with the drive and acquisition subsystem through the CAN bus to drive and collect data of the platform door. For the operation mode of mixed running of long and short marshaling and non-fixed return routes, the number of drive acquisition subsystems is different. Realizing the safe processing of multiple network node data and multiple CAN node data is the core and key to ensure the safety and reliability of the PSDC system.
[0003] Currently common data processing methods such as transparent transmission, simple framing, encoding, etc., cannot meet the scenarios of unified data processing of multiple network nodes and CAN nodes. There are problems such as decentralized data processing, poor reliability, and low computing performance. It is urgent to design a safe, reliable, efficient, and reusable security data processing method. Summary of the invention
[0004] The purpose of the present invention is to provide a secure database and a secure data processing method supporting network and bus communications, so as to achieve the purpose of improving the security and reliability of data processing.
[0005] In order to achieve the above objectives, the present invention is implemented by the following technical solutions:
[0006] A security database includes: an output data processing database POP_DB for storing and processing output data; and a feedback data processing database PUSH_DB for storing and processing feedback data.
[0007] A network write interface and a network read interface, wherein the network write interface is connected to the output data processing database POP_DB and is used to write data from multiple network nodes of an external signal device into the output data processing database POP_DB, and the network read interface is connected to the feedback data processing database PUSH_DB and is used to read data from the feedback data processing database PUSH_DB and send it to the external signal device.
[0008] A CAN write interface and a CAN read interface, wherein the CAN write interface is connected to the feedback data processing database PUSH_DB and is used to write data from multiple CAN nodes of the drive acquisition subsystem into the feedback data processing database PUSH_DB, and the CAN read interface is connected to the output data processing database POP_DB and is used to read data from the output data processing database POP_DB and send it to the drive acquisition subsystem.
[0009] An API write interface and an API read interface, wherein the API write interface and the API read interface are respectively connected to the output data processing database POP_DB, and the API write interface and the API read interface are respectively connected to the feedback data processing database PUSH_DB, wherein the API write interface is used to write data from the application program interface API into the output data processing database POP_DB and / or the feedback data processing database PUSH_DB, and the API read interface is used to read data from the output data processing database POP_DB and / or the feedback data processing database PUSH_DB and send it to the application program interface API.
[0010] Optionally, the output data is network data from an external signal device; the feedback data is bus data from multiple CAN nodes of the drive acquisition subsystem; the network data is the first safe pure data obtained after verification and parsing of the safety protocol header; the bus data is the second safe pure data obtained after verification and parsing of the safety protocol header.
[0011] Optionally, it also includes: a configuration interface, which is connected to the output data processing database POP_DB and the feedback data processing database PUSH_DB respectively, and is used to receive configuration data from an external configuration device.
[0012] Optionally, the configuration data defines the number of network nodes, the number of CAN nodes, the number of mappings, the length of each mapping, the network node corresponding to each mapping, the start bit in the network node message, the corresponding PDO format data and the start bit information in the PDO format data.
[0013] Optionally, the output data processing database POP_DB processes several output data at the same time, and each output data is provided with several driving code positions; the feedback data processing database PUSH_DB processes several feedback data at the same time, and each feedback data is provided with several acquisition code positions.
[0014] On the other hand, the present invention also provides a secure data processing system, comprising: a local CPU and a remote CPU connected to each other, wherein two security databases as described above are respectively set on the local CPU and the remote CPU, wherein one security database serves as an odd-numbered security database, and the other security database serves as an even-numbered security database.
[0015] In yet another aspect, the present invention further provides a safety communication subsystem for use in a high-security platform door control system PSDC, wherein the safety communication subsystem comprises the safety data processing system as described above.
[0016] In other aspects, the present invention also provides a high-security platform door control system including: the security communication subsystem as described above. An application program interface API, which is connected to the security database through the API read interface and the API write interface respectively. An external signal device, which is connected to the network write interface and the network read interface respectively through Ethernet; and a drive acquisition subsystem, which is connected to the CAN write interface and the CAN read interface respectively through a CAN bus. The external signal device exchanges network data with the security database. The drive acquisition subsystem exchanges bus data with the security database. The first safe pure data obtained after the network data is verified and the security protocol header is parsed is submitted to the security database for processing. The second safe pure data obtained after the bus data is verified and the security protocol header is parsed is submitted to the security database for processing. The application program interface API is used to perform logical operations on the data read from the security database and then feed it back to the security database in the format of the first safe pure data.
[0017] Optionally, the external signal device includes several network nodes; the drive acquisition subsystem includes: several CAN nodes.
[0018] Optionally, the first safe pure data output by the external signal device is written into the output data processing database POP_DB through the network write interface; the application program interface API reads the output data processing database POP_DB through the API read interface, and after performing a logical operation on the read first safe pure data, writes it into the output data processing database POP_DB through the API write interface. The CAN read interface reads the first safe pure data in the output data processing database POP_DB; and sends the read first safe pure data to the drive acquisition subsystem accordingly. The second safe pure data fed back by the drive acquisition subsystem is written into the feedback data processing database PUSH_DB through the CAN write interface; the application program interface API reads the second safe pure data in the feedback data processing database PUSH_DB through the API read interface, and after performing a logical operation on the second safe pure data, writes it into the feedback data processing database PUSH_DB through the API write interface. The network read interface reads the second safe pure data from the feedback data processing database PUSH_DB and sends it to the external signal device.
[0019] In other aspects, the present invention also provides a method for processing secure data, which is implemented by the secure data processing system as described above, and the method comprises: inputting the first secure pure data and / or the second secure pure data into the local secure database and the remote secure database respectively through a write interface; the local secure database screens the received first secure pure data and / or the second secure pure data to obtain local representative data, and packages the local representative data according to a preset format to obtain local 2oo2 data. The remote secure database screens the received first secure pure data and / or the second secure pure data to obtain remote representative data, and packages the remote representative data according to a preset format to obtain remote 2oo2 data.
[0020] The remote 2oo2 data is sent to the local security database. The local security database parses the received remote 2oo2 data and performs a 2oo2 consistency comparison with the local 2oo2 data to obtain a comparison result, and performs data mapping and data update on the data to be processed according to the comparison result. And, the local 2oo2 data is sent to the remote security database.
[0021] The remote security database parses the received local 2oo2 data and performs a 2oo2 consistency comparison with the remote 2oo2 data to obtain a comparison result, and performs data mapping and data update on the data to be processed according to the comparison result.
[0022] Optionally, the representative data includes characterization information that can characterize the first safety pure data and / or the second safety pure data and characterization information of a processing result of the safety database in the previous period.
[0023] Optionally, the local 2oo2 data and the remote 2oo2 data have the same format, and the data format of the local 2oo2 data includes a data packet of the following field information:
[0024] DbId: The cycle number of the local active database, which increases by 1 every cycle.
[0025] SHA: 160-bit digest of the local active database, which is a hash value calculated by encrypting the entire local active database using the SHA1 algorithm.
[0026] PDO_RevFlag[n1]: n1-bit binary value, each bit indicates whether a PDO format data is received. There are at most n1 PDO format data.
[0027] PDO_CRC[n1]: CRC value of n1 PDO format data. 16-bit CCITT-CRC16 is calculated for each PDO format data.
[0028] Block_CRC[n2]: One of the first security pure data occupies one Block_Buffer. This field indicates the CRC value of n2 Block_Buffers. n2 is the number of Block_Buffers used. A 32-bit CCITT-CRC32 is calculated for each Block_Buffer. There are at most n2 Block_Buffer data formats.
[0029] Block_Prio[n3]: The thread priority of n3 Block_Buffers, indicating the task priority of the thread that calls the write interface to submit the Block_Buffer.
[0030] Optionally, the step of the local security database comparing the remote 2oo2 data with the local 2oo2 data for consistency includes: when the DbId of the two is consistent, the processing cycle of the local security database and the remote security database is guaranteed to be consistent, and if they are inconsistent, the local CPU will crash. When the SHA of the two is consistent, the hash value of the local security database is guaranteed to be the same as the hash value of the remote security database, and if they are inconsistent, the local CPU will crash. Record the PDO_RevFlag
[42] , PDO_CRC
[42] , Block_CRC[n2] and Block_Prio[n3] field information of the remote 2oo2 data.
[0031] Optionally, the local security database is further used to map a plurality of the first security pure data into the local security database. The local security database is further used to map a plurality of the second security pure data into the local security database.
[0032] Optionally, the step of mapping the plurality of the first security pure data to the local security database includes: determining whether the numbers n2 and n3 of Block_Buffer used in Block_CRC[n2] and Block_Prio[n3] in the remote 2oo2 data are the same, and if they are different, shutting down the local CPU. If they are the same, searching the local 2oo2 data for a Block_Prio that is equal to Block_Prio[x] in the remote 2oo2 data, and then finding the Block_Buffer corresponding to the Block_Prio, wherein x here represents the xth Block_Prio. Determining whether the Block_CRC in the local 2oo2 data corresponding to the Block_Buffer is the same as the Block_CRC in the remote 2oo2 data, and if they are not the same, shutting down the local CPU.
[0033] If they are the same, the local security database maps the first security pure data to PDO format data until all the first security pure data are mapped to PDO format data, and then maps the PDO format data to the local security database, and releases the current Block_Buffer.
[0034] If the local security database cannot find the Block_Prio[x] in the local 2oo2 data that is equal to the Block_Prio[x] in the remote 2oo2 data, the update of this cycle fails, the number of consecutive failures increases by 1, and forgiveness is performed. When the number of consecutive failures reaches the threshold, the local CPU crashes.
[0035] Optionally, the step of mapping the plurality of second security pure data to the local security database comprises: if PDO_RevFlag[x] in the local 2oo2 data and the remote 2oo2 data are both true, comparing PDO_CRC[x] in the local 2oo2 data and the remote 2oo2 data, if the PDO_CRC[x] of the two are the same, wherein x represents the xth PDO format data.
[0036] The second safety pure data is mapped to PDO format data until all the second safety pure data are mapped to PDO format data, and then the PDO format data is mapped into the local safety database. If the PDO_CRC[x] of the two is different, the local CPU crashes. If any of the PDO_RevFlag[x] in the local 2oo2 data and the PDO_RevFlag[x] in the remote 2oo2 data is false, the local safety database considers that the PDO format data has not been received, and the PDO format data is forgiven using the value of the previous cycle, and is set to the value of the safety side after the forgiveness cycle is reached.
[0037] Optionally, the odd-numbered security database or the even-numbered security database is used alternately as the active database according to the cycle number DbId of the local active database. When the cycle number is odd, the odd-numbered security database is used as the local active database, and the even-numbered security database is used as the local standby database; when the cycle number is even, the even-numbered security database is used as the local active database, and the odd-numbered security database is used as the local standby database.
[0038] According to the cycle number DbId of the remote active database, the odd-numbered security database or the even-numbered security database is used alternately as the active database. When the cycle number is odd, the odd-numbered security database is used as the remote active database, and the even-numbered security database is used as the remote standby database; when the cycle number is even, the even-numbered security database is used as the remote active database, and the odd-numbered security database is used as the remote standby database.
[0039] Optionally, it also includes: updating the local security database: updating the period number DbId of the local active database; updating the hash value of the local active database; updating the remote security database: updating the period number DbId of the remote active database of the remote security database; updating the hash value of the remote active database.
[0040] Optionally, it also includes: the local security database determines whether to start a new security data processing cycle; determines whether to wait for the data processing signal, and waits for the data processing signal once every fixed time. If the signal is waited for, the next cycle of security data processing will be started; if not, continue to wait.
[0041] Optionally, it also includes: when the read interface reads the security database: the remote CPU reads the remote active database under the cycle number DbId of the current remote active database; sends the cycle number DbId of the current remote active database to the local CPU, and the local CPU determines whether the cycle number DbId of the received remote active database is the same as the cycle number DbId of the local active database, and if they are the same, reads the local active database. If they are not the same, the local CPU then determines whether the cycle number DbId of the local standby database is the same, and if they are the same, reads the local standby database; if they are not the same, an error is reported.
[0042] The present invention has at least one of the following advantages:
[0043] The first aspect of the present invention provides a secure database that supports network and bus communications, thereby improving the reliability of data processing. The present invention adopts two sub-databases, POP_DB and PUSH_DB, and provides three database read and write modes, clearly defining the read and write permissions and data flow of each interface, and centralizing all data processing processes in the secure database, thereby effectively avoiding the poor reliability and difficult maintenance problems brought about by traditional distributed processing.
[0044] The present invention is also equivalent to providing a mapping method that can be configured by users (i.e., configuring the number of network nodes, the number of CAN nodes, various mapping information, etc.), supporting users to flexibly configure the mapping information of multiple network nodes and CAN nodes to meet different operation modes and scenarios.
[0045] The present invention provides a safety communication subsystem, which has a safety database, thereby enabling a PSDC system based on the safety data processing method to reach the SIL4 safety integrity level.
[0046] The invention provides a secure data processing method supporting network and bus communication, which improves the security of data processing. Its essence is a secure data processing method based on 2oo2 architecture. It adopts the combined fault safety principle to ensure the consistency of the database on two independently running CPUs (local CPU and remote CPU).
[0047] The security data processing method provided by the present invention adopts CRC protection for the data in the mapping from the network and the CAN bus, and adopts SHA1 algorithm protection for the entire security database (local security database and remote security database), so as to ensure the integrity and correctness of the data processing process and processing results.
[0048] The data from the network and CAN bus are processed leniently to ensure the timeliness of the data.
[0049] Filter and package the data for 2oo2 to improve the performance of data synchronization, that is, improve the performance of 2oo2.
[0050] The safety data processing method provided by the present invention performs 2oo2 on the CRC and priority of each data from the network, finds the data correspondence on two CPUs (local CPU and remote CPU) according to the data priority, and compares the consistency of data with the same priority through CRC. Perform 2oo2 on the receiving flag and PDO CRC of each data from CAN, find the data correspondence on the two CPUs according to PDOId and the receiving flag, and compare the data consistency through CRC. Forgiveness processing is performed on the data for which no corresponding relationship can be found, and it is directed to the safety side after the forgiveness cycle expires.
[0051] The SHA1 algorithm is used to calculate the hash value of the entire database, and a 2oo2 consistency comparison is performed on the period number DbId and hash value of the security database every period to ensure data integrity.
[0052] The method of using odd and even databases alternately in cycles is adopted. Taking the time when any one of the two CPUs reads as the benchmark, such as the time when the remote CPU reads as the benchmark, the remote CPU reads its current remote security database and notifies its DbId to the local CPU. The local CPU reads the corresponding odd or even security database according to the DbId to ensure that the dual CPUs read the security database at the same time, thereby ensuring the correctness of the data read on the dual CPUs. That is, the dual database method is used to solve the timing deviation of thread reading and writing under the 2oo2 architecture, and ensure the correctness of the data read on the dual CPUs.
[0053] It supports users to flexibly configure the mapping information of multiple network nodes and CAN nodes, which can meet various operation modes such as mixed running of long and short trains and non-fixed return routes.
[0054] It processes pure safety data and is not restricted by the safety protocols adopted by external signaling equipment. It can not only be used for PSDC, but can also be reused in products with similar architectures such as interlocking and train control. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A schematic diagram of the main structure of a security database provided by an embodiment of the present invention after being applied to a PSDC system;
[0056] Figure 2 A schematic diagram of a secure data processing method supporting network and bus communications provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following is a further detailed description of a security database and security data processing method that supports network and bus communication proposed by the present invention in combination with the accompanying drawings and specific embodiments. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the accompanying drawings are in a very simplified form and use non-precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention. In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, please refer to the accompanying drawings. It should be noted that the structure, proportion, size, etc. illustrated in the accompanying drawings of this specification are only used to match the content disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so they have no technical substantive significance. Any modification of the structure, change of the proportional relationship or adjustment of the size, without affecting the effect that the present invention can produce and the purpose that can be achieved, should still fall within the scope of the technical content disclosed by the present invention.
[0058] Embodiment 1
[0059] like Figure 1 As shown, this embodiment provides a secure database, provides three database read and write methods, clarifies the read and write permissions and data flow of each interface, and concentrates all data processing processes in the secure database. The secure database includes: an output data processing database POP_DB, which is used to store and process output data. A feedback data processing database PUSH_DB, which is used to store and process feedback data.
[0060] A network write interface and a network read interface, wherein the network write interface is connected to the output data processing database POP_DB and is used to write data from multiple network nodes of an external signal device into the output data processing database POP_DB, and the network read interface is connected to the feedback data processing database PUSH_DB and is used to read data from the feedback data processing database PUSH_DB and send it to the external signal device.
[0061] A CAN write interface and a CAN read interface, wherein the CAN write interface is connected to the feedback data processing database PUSH_DB and is used to write data from multiple CAN nodes of the drive acquisition subsystem into the feedback data processing database PUSH_DB, and the CAN read interface is connected to the output data processing database POP_DB and is used to read data from the output data processing database POP_DB and send it to the drive acquisition subsystem.
[0062] An API write interface and an API read interface, wherein the API write interface and the API read interface are respectively connected to the output data processing database POP_DB, and the API write interface and the API read interface are respectively connected to the feedback data processing database PUSH_DB, wherein the API write interface is used to write data from the application program interface API into the output data processing database POP_DB and / or the feedback data processing database PUSH_DB, and the API read interface is used to read data from the output data processing database POP_DB and / or the feedback data processing database PUSH_DB and send it to the application program interface API.
[0063] In this embodiment, the output data processing database POP_DB is used to process the output (driving) data TPDO, and the feedback data processing database PUSH_DB is used to process the feedback (collection) data RPDO.
[0064] The output data TPDO is PDO format data, and the feedback data RPDO is PDO format data.
[0065] The specific mapping process of writing the corresponding PDO format data into the output data processing database POP_DB or the feedback data processing database PUSH_DB refers to the mapping storage process of the first safety pure data and the second safety pure data described below, which will not be repeated here.
[0066] The output data may be network data from the network, that is, for example, the first safe pure data described below, and the feedback data may be bus data from the CAN bus, for example, the second safe pure data described below, but the present invention is not limited thereto.
[0067] In this embodiment, it also includes: a configuration interface, which is connected to the output data processing database POP_DB and the feedback data processing database PUSH_DB respectively, and is used to receive configuration data from an external configuration device. The configuration data defines the number of network nodes, the number of CAN nodes, the number of mappings, the length of each mapping, and the network node corresponding to each mapping, the start bit in the network node message, the corresponding PDO format data and the start bit information in the PDO format data.
[0068] It can be understood that the configuration includes a mapping relationship between network messages and CAN messages. For the specific mapping process, please refer to the content of step S3.4 in the embodiment below.
[0069] For ease of understanding, here is an example: For example, a mapping corresponds to the first network node information, the start bit in the network information is 1, the mapping length is 1, and the corresponding first PDO format data, the start position in the PDO is 2, then according to the mapping, the first bit of the first network node message can be mapped to the second bit of the first PDO format data. CAN messages use CAN_PDO format data, where the PDO format data refers to pure data without the security protection part, the second security pure data.
[0070] The output data processing database POP_DB processes a plurality of output (drive) data TPDO simultaneously, and each output (drive) data TPDO is provided with a plurality of drive code bits.
[0071] The feedback data processing database PUSH_DB processes a plurality of feedback (collection) data RPDO simultaneously, and each feedback (collection) data RPDO is provided with a plurality of collection code bits.
[0072] Therefore, the security database includes: an output data processing database POP_DB for processing output data, and a feedback data processing database PUSH_DB for processing feedback data, providing three data reading and writing interfaces: network, CAN bus, and API, clarifying the read and write permissions and data flow of each interface, and using the security database for centralized data processing, effectively avoiding the poor reliability and difficult maintenance problems brought about by traditional decentralized processing.
[0073] Embodiment 2
[0074] This embodiment provides a secure data processing system, including: a local CPU and a remote CPU connected to each other, wherein two security databases as described above are respectively set on the local CPU and the remote CPU, wherein one security database serves as an odd-numbered security database, and the other security database serves as an even-numbered security database.
[0075] That is, in this embodiment, two security databases as described in Embodiment 1 are set on the local CPU, and two security databases as described in Embodiment 1 are set on the remote CPU.
[0076] In this embodiment, two CPUs with the same structure can be set on the high-security platform door control system PSDC. The two CPUs run independently, and the CPUs exchange data and perform consistency comparison, that is, 2 out of 2 (2oo2). Only when the results of both CPUs are correct, the final result is considered correct. Local and remote are from the perspective of one of the CPUs, the CPU itself is the local CPU, and the other CPU is the remote CPU.
[0077] Embodiment 3
[0078] Please continue to refer to Figure 1 , this embodiment provides a secure communication subsystem, including: the secure data processing system as described in Embodiment 2.
[0079] Embodiment 4
[0080] The present embodiment provides a high-security platform door control system, comprising: a security communication subsystem as described in the third embodiment. API (Application Programming Interface), the application programming interface API is connected to the security database through the API read interface and the API write interface respectively; an external signal device, which is connected to the network write interface and the network read interface respectively through Ethernet; and a drive acquisition subsystem, which is connected to the CAN write interface and the CAN read interface respectively through a CAN bus. The external signal device exchanges network data with the security database. The drive acquisition subsystem exchanges bus data with the security database. The first security pure data (Block_Buffer data) obtained after the network data is verified and the security protocol header is parsed is submitted to the security database for processing.
[0081] After the bus data is verified and the safety protocol header is parsed, the second safety pure data (CAN data) obtained is submitted to the safety database for processing.
[0082] The API is used to perform a logical operation on the data read from the security database and then feed the data back to the security database in a first security pure data format (Block_Buffer data).
[0083] In this embodiment, the external signal device includes several network nodes ( Figure 1 The first network node NET_1, the second network node NET_2 ... the nth network node NET_n); the drive acquisition subsystem includes: a plurality of CAN nodes (see Figure 1 The first CAN node CAN_1, the second CAN node CAN_2…the nth CAN node CAN_n).
[0084] In this embodiment, the first safe pure data output by the external signal device is written into the output data processing database POP_DB through the Net_W write interface.
[0085] The API reads the output data processing database POP_DB through the API read interface, and after performing a logical operation on the read first safe pure data, writes the first output data processing database POP_DB through the API write interface.
[0086] The CAN reading interface reads the first safe pure data in the output data processing database POP_DB; and sends the read first safe pure data to the drive acquisition subsystem accordingly.
[0087] The second safe pure data fed back by the drive acquisition subsystem is written into the feedback data processing database PUSH_DB through the CAN write interface; the API reads the second safe pure data in the feedback data processing database PUSH_DB through the API read interface, performs logical operations on the second safe pure data, and writes the data into the feedback data processing database PUSH_DB through the API write interface; the network read interface reads the second safe pure data from the feedback data processing database PUSH_DB and sends it to the external signal device.
[0088] The network data using the safety protocol (such as RSSPI protocol, FSFB2 protocol) itself has a safety protocol header. The CAN-PDO message using the can-open protocol has a security protection part, which can also be understood as a safety protocol header.
[0089] The communication subsystem where the security database is located exchanges network information with external signal devices through Ethernet, and exchanges drive information with the drive acquisition subsystem through the CAN bus. The network information is protected by standard security protocols such as FSFB2 and RSSPI. The network information will be verified by the security protocol before being written into the security database. After the verification is passed, the first safe pure data obtained after parsing the security protocol header is submitted to the security database for processing. Similarly, the drive information is protected by the safety PDO in the CANopen protocol. Before the drive information is written into the security database, it will be verified by the security protocol. The second safe pure data that passes the verification and parses the security protocol header is submitted to the security database for processing.
[0090] That is, the output data processing database POP_DB in the security database provided in this embodiment is used to process the drive data TPDO received from the network or API and sent to the CAN bus, and the feedback data processing database PUSH_DB is used to process the collection data RPDO received from the CAN bus and sent to the network or API. The three read and write methods of the provided security database include: network read and write, CAN read and write, and API read and write. The network write interface receives the security data itself BSD (excluding the security protocol frame header) from the external signal device, which can be compatible with a variety of different security communication protocols such as RSSPI, FSFB2, etc., finds the corresponding mapping relationship in the configuration according to the network node ID, maps the network data to TPDO data, and finally writes it to the output data processing database POP_DB after security data processing; the network read interface reads the data in the feedback data processing database PUSH_DB, finds the corresponding mapping relationship in the configuration according to the network node ID, maps the RPDO data to network data, and sends it to the external signal device. The CAN write interface receives RPDO from the CAN bus, and after security data processing, it is finally written into the feedback data processing database PUSH_DB; the CAN read interface reads the data of the output data processing database POP_DB and sends it to the CAN bus. The API read interface can read the drive data TPDO written by the network into the output data processing database POP_DB and the feedback data RPDO written by CAN into the feedback data processing database PUSH_DB. After simple logic processing, it is written into the output data processing database POP_DB and sent to the CAN node through the API write interface, or written into the feedback data processing database PUSH_DB and sent to the network node.
[0091] Embodiment 5
[0092] like Figure 2 As shown, this embodiment provides a secure data processing method that supports network and bus communications, based on a 2oo2 architecture, using a combined fail-safe principle to ensure data consistency on two independently running CPUs. CRC protection is used for data in the mapping from the network and CAN bus, and SHA1 algorithm protection is used for the entire secure database to ensure the integrity and correctness of the data processing process and processing results.
[0093] The security data processing method provided in this embodiment is implemented by using the security data processing system as described above, and the method includes:
[0094] The data to be processed are input into the local security database and the remote security database respectively through the corresponding write interface (the network / CAN / API write interface provided by the corresponding security database).
[0095] In this embodiment, the data to be processed is the first security pure data and / or the second security pure data; the representative data includes characterization information that can characterize the first security pure data and / or the second security pure data and the characterization information of the security database processing results of the previous cycle, so as to reduce the amount of data processing and improve the processing speed.
[0096] The local CPU and the remote CPU have exactly the same process for processing data, and the following is a detailed description using the local security database in the local CPU as an example.
[0097] Step S1: The local security database screens the received data to be processed to obtain local representative data, packages the local representative data according to a preset format to obtain local 2oo2 data, and sends the local 2oo2 data to a remote security database. The remote security database parses the received local 2oo2 data and performs a 2oo2 consistency comparison with the remote 2oo2 data to obtain a comparison result, and performs data mapping and data update on the data to be processed according to the comparison result.
[0098] Step S2: The remote security database screens the received data to be processed to obtain remote representative data, and packages the remote representative data according to a preset format to obtain remote 2oo2 data. The remote 2oo2 data is sent to the local security database. The local security database parses the received remote 2oo2 data and performs a 2oo2 consistency comparison with the local 2oo2 data to obtain a comparison result, and performs data mapping and data update on the data to be processed according to the comparison result.
[0099] Among them, the specific process of the local security database parsing the received remote 2oo2 data and performing 2oo2 consistency comparison with the local 2oo2 data is exactly the same as the specific process of the remote security database parsing the received local 2oo2 data and performing 2oo2 consistency comparison with the remote 2oo2 data. The specific process of the local security database parsing the received remote 2oo2 data and performing 2oo2 consistency comparison with the local 2oo2 data is taken as an example to illustrate.
[0100] The local 2oo2 data or remote 2oo2 data has the same structure:
[0101] The local 2oo2 data is a data packet including the following field information in sequence:
[0102] DbId SHA PDO_RevFlag
[42] PDO_CRC
[42] Block_CRC[n2] Block_Prio[n3]
[0103] DbId: The cycle number of the local active database, which increases by 1 every cycle.
[0104] SHA: 160-bit summary of the local active database. The hash value is obtained by encrypting the entire local active database using the SHA1 algorithm.
[0105] PDO_RevFlag[n1]: n1-bit binary value, each bit indicates whether a PDO format data is received, and there are at most n1 PDO format data. In this embodiment, n1 is 42, which is the number of PDO format data currently supported, but the present invention is not limited thereto.
[0106] PDO_CRC[n1]: CRC value of n1 PDO format data. 16-bit CCITT-CRC16 is calculated for each PDO format data.
[0107] Block_CRC[n2]: One of the first security pure data (one network write interface data or one API write interface data) occupies one Block_Buffer. This field represents the CRC value of n2 Block_Buffers. n2 is the number of Block_Buffers used. A 32-bit CCITT-CRC32 is calculated for each Block_Buffer. There are at most n2 data in Block_Buffer data format.
[0108] Block_Prio[n3]: The thread priority of n3 Block_Buffers, indicating the task priority of the thread that calls the write interface to submit the Block_Buffer.
[0109] Specifically, the threads that call the database write interface include network write threads, CAN write threads, and API write threads. These threads have different priorities. The network write thread and API write thread will submit Block_Buffer data, and Block_Prio records the corresponding thread priority.
[0110] In this embodiment, what is written from the network and the API is first-safe pure data, and Block_Buffer refers to the memory occupied by the first-safe pure data.
[0111] Step S3: Perform 2oo2 consistency comparison on the local 2oo2 data and the remote 2oo2 data to obtain a comparison result, and perform data mapping and data update on the data to be processed according to the comparison result.
[0112] Specifically, the step S3 includes: step S3.1, when the DbIds of the two are consistent, the processing cycles of the local security database and the remote security database are guaranteed to be consistent, and if they are inconsistent, the local CPU shuts down.
[0113] Step S3.2: When the SHAs of the two are consistent, it is ensured that the hash value of the local security database is the same as the hash value of the remote security database. If they are inconsistent, the local CPU will shut down.
[0114] Step S3.3, record the PDO_RevFlag
[42] , PDO_CRC
[42] , Block_CRC[n2] and Block_Prio[n3] field information of the remote 2oo2 data.
[0115] The step S3 further comprises:
[0116] Step S3.4: The local security database is also used to map the first plurality of security pure data to the local security database.
[0117] Step S3.5: The local security database is also used to map a plurality of the second security pure data to the local security database.
[0118] Specifically, for each mapping, the following formula is used to map it into PDO format data:
[0119] curMask=MaskList[StartInPdo][Length];
[0120] pdoMask[pdoID]=pdoMask[pdoID]|curMask;
[0121] pdoValue[pdoID]=(pdoValue[pdoID]&(~curMask))|((Value< <StartInPdo)&curMask);
[0122] Where curMask represents the mask value of the current mapping, MaskList[StartInPdo][Length] represents the mask list, StartInPdo represents the starting position in the PDO message corresponding to the current mapping, Length represents the bit length of the PDO corresponding to the current mapping, pdoMask[pdoID] represents the mask value of the pdoID-th PDO message, pdoValue[pdoID] represents the value of the pdoID-th PDO message, and Value represents the corresponding valid information in the Block_Buffer format data corresponding to the current mapping.
[0123] Then map the PDO format data to the local security database:
[0124] DB.data[pdoID]=(pdoValue[pdoID]&pdoMask[pdoID]))|((~pdoMask[pdoID])&(DB.data[pdoID]));
[0125] Wherein, DB.data[pdoID] represents the security database message corresponding to the current pdoID.
[0126] The step S3.4 includes: step S3.4.1, determining whether the numbers n2 and n3 of Block_Buffer used in Block_CRC[n2] and Block_Prio[n3] in the remote 2oo2 data are the same, and if they are different, shutting down the local CPU.
[0127] If they are the same, then find the Block_Prio in the local 2oo2 data that is equal to Block_Prio[x] in the remote 2oo2 data, and then find the Block_Buffer corresponding to the Block_Prio, where x represents the xth Block_Prio.
[0128] Step S3.4.2: Determine whether the Block_CRC in the local 2oo2 data corresponding to the Block_Buffer is the same as the Block_CRC in the remote 2oo2 data. If they are not the same, the local CPU crashes.
[0129] If they are the same, the local security database maps the first security pure data to PDO format data until all the first security pure data are mapped to PDO format data, and then maps the PDO format data to the local security database, and releases the current Block_Buffer.
[0130] Step S3.4.3: If the local security database cannot find the Block_Prio in the local 2oo2 data that is equal to the Block_Prio in the remote 2oo2 data, the update of this cycle fails, the number of consecutive failures increases by 1, and forgiveness is performed. When the number of consecutive failures reaches the threshold, the local CPU crashes.
[0131] Step S3.5 includes: Step S3.5.1, if PDO_RevFlag[x] in the local 2oo2 data and the remote 2oo2 data are both true values (TRUE); proceed to step S3.5.2.
[0132] Step S3.5.2: Compare the PDO_CRC[x] in the local 2oo2 data and the remote 2oo2 data. If the PDO_CRC[x] of the two are the same, where x represents the xth PDO format data, proceed to step S3.5.3. If the PDO_CRC[x] of the two are different, proceed to step S3.5.4.
[0133] Step S3.5.3: Map the second security pure data to PDO format data until all the second security pure data are mapped to PDO format data, and then map the PDO format data into the local security database.
[0134] Step S3.5.4: The local CPU crashes.
[0135] Step S3.5.5: If either the PDO_RevFlag[x] in the local 2oo2 data or the PDO_RevFlag[x] in the remote 2oo2 data is false (FALSE), the local security database considers that the PDO format data has not been received, and the PDO format data is forgiven using the value of the previous cycle and is set to the value of the safety side after the forgiveness cycle is reached.
[0136] Forgiveness specifically means that the system will not shut down temporarily when an update fails in this cycle. If the system shuts down after several consecutive cycles fail, continuing to run without shutting down is called forgiveness.
[0137] This embodiment also includes: executing step S4 after the mapping of this cycle is completed.
[0138] The local security database includes an odd security database and an even security database. The odd security database or the even security database is used alternately as the active database according to the cycle number DbId of the local active database. When the cycle number is odd, the odd security database is used as the local active database and the even security database is used as the local standby database; when the cycle number is even, the even security database is used as the local active database and the odd security database is used as the local standby database.
[0139] The remote security database includes an odd security database and an even security database. The odd security database or the even security database is used alternately as the active database according to the cycle number DbId of the remote active database. When the cycle number is odd, the odd security database is used as the remote active database and the even security database is used as the remote standby database; when the cycle number is even, the even security database is used as the remote active database and the odd security database is used as the remote standby database.
[0140] The step S4 includes: the two CPUs each update their own security database, and update the local security database: specifically, update the cycle number DbId of the local active database; and update the hash value of the local active database.
[0141] Updating the remote security database: specifically, updating the period number DbId of the remote active database; and updating the hash value of the remote active database.
[0142] This embodiment also includes: Step S5, the local security database determines whether to start a new security data processing cycle.
[0143] It is determined whether the data processing signal is received, and the data processing signal is received every fixed time. If the signal is received, the process returns to step S1 to start the next cycle of safety data processing. If the signal is not received, the process returns to step S5 to continue waiting.
[0144] This embodiment also includes: using an even-odd dual database method to solve the timing deviation problem of thread reading and writing under the 2oo2 architecture, and ensuring the correctness of data read on dual CPUs. For example, the reading operations of calling the database read interface locally and calling the database read interface remotely both occur after the security database is updated, or the local reading operation occurs after the database is updated, and the remote reading operation occurs before the database is updated. It can be seen that by setting an active database and a standby database, the consistency of data read on the two CPUs is guaranteed. The design of the active database and the standby database ensures that the same database content can be read on the local CPU and the remote CPU regardless of the time at which the reading operation occurs.
[0145] When the read interface (the interface here has the same meaning as the interface mentioned in the first embodiment above) reads the security database, the remote CPU reads the remote active database under the cycle number DbId of the current remote active database.
[0146] The cycle number DbId of the current remote active database is sent to the local CPU, and the local CPU determines whether the cycle number DbId of the received remote active database is the same as the cycle number DbId of the local active database. If they are the same, the local active database is read.
[0147] If they are not the same, the local CPU determines whether the cycle number DbId is the same as that of the local standby database. If they are the same, the local standby database is read; if they are not the same, an error is reported.
[0148] It can be seen that this embodiment provides a secure data processing method based on a 2oo2 architecture, which adopts a combined fail-safe principle to ensure the consistency of the secure database on two independently running CPUs. At the same time, CRC protection is adopted for the data in the mapping from the network and the CAN bus, and the SHA1 algorithm is adopted for the entire secure database to ensure the integrity and correctness of the data processing process and processing results. This embodiment improves the reliability and security of data processing.
[0149] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0150] It should be noted that the devices and methods disclosed in the embodiments of this article can also be implemented in other ways. The device implementation described above is only schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of this article. In this regard, each box in the flowchart or block diagram can represent a part of a module, program or code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function, and the module, program segment or part of the 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 box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented by a dedicated hardware-based system for performing a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0151] In addition, the functional modules in the various embodiments of this document may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0152] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.
Claims
1. A security database, characterized in that: include: Output data processing database POP_DB, used to store and process output data; Feedback data processing database PUSH_DB, used to store and process feedback data; A network write interface and a network read interface, wherein the network write interface is connected to the output data processing database POP_DB and is used to write data from multiple network nodes of an external signal device into the output data processing database POP_DB, and the network read interface is connected to the feedback data processing database PUSH_DB and is used to read data from the feedback data processing database PUSH_DB and send it to the external signal device; A CAN write interface and a CAN read interface, wherein the CAN write interface is connected to the feedback data processing database PUSH_DB and is used to write data from multiple CAN nodes of the drive acquisition subsystem into the feedback data processing database PUSH_DB, and the CAN read interface is connected to the output data processing database POP_DB and is used to read data from the output data processing database POP_DB and send it to the drive acquisition subsystem; An API write interface and an API read interface, the API write interface and the API read interface are respectively connected to the output data processing database POP_DB, the API write interface and the API read interface are respectively connected to the feedback data processing database PUSH_DB, the API write interface is used to write data from the application program interface API into the output data processing database POP_DB and / or the feedback data processing database PUSH_DB, and the API read interface is used to read data from the output data processing database POP_DB and / or the feedback data processing database PUSH_DB and send it to the application program interface API; The output data is network data from external signal equipment; the feedback data is bus data from multiple CAN nodes of the drive acquisition subsystem; The network data is first safe pure data obtained after verification and parsing out the safety protocol header; the bus data is second safe pure data obtained after verification and parsing out the safety protocol header.
2. The secure database according to claim 1, wherein: It also includes: a configuration interface, which is connected to the output data processing database POP_DB and the feedback data processing database PUSH_DB respectively, and is used to receive configuration data from an external configuration device.
3. The secure database according to claim 2, characterized in that The configuration data defines the number of network nodes, the number of CAN nodes, the number of mappings, the length of each mapping, the network node corresponding to each mapping, the start bit in the network node message, the corresponding PDO format data and the start bit information in the PDO format data.
4. The secure database according to claim 2, characterized in that The output data processing database POP_DB processes a number of output data at the same time, each output data is provided with a number of driving code bits; The feedback data processing database PUSH_DB processes a number of feedback data at the same time, and each feedback data is provided with a number of acquisition code bits.
5. A secure data processing system, characterized in that: include: A local CPU and a remote CPU are connected to each other, and two security databases as described in any one of claims 1 to 4 are respectively set on the local CPU and the remote CPU, one of the security databases is used as an odd-numbered security database, and the other security database is used as an even-numbered security database.
6. A safety communication subsystem for a high-security platform door control system PSDC, characterized in that: The secure communication subsystem comprises the secure data processing system of claim 5.
7. A high-security platform door control system, characterized in that: include: The secure communication subsystem as claimed in claim 6; An application program interface API, which is connected to the security database through the API reading interface and the API writing interface respectively; An external signal device, which is connected to the network write interface and the network read interface respectively via Ethernet; as well as A drive acquisition subsystem, which is connected to the CAN write interface and the CAN read interface respectively through a CAN bus; The external signal device exchanges network data with the security database; The driving acquisition subsystem interacts with the security database to exchange bus data; The first safe pure data obtained after the network data is verified and the safety protocol header is parsed is submitted to the safety database for processing; The second safe pure data obtained after the bus data is verified and the safety protocol header is parsed is submitted to the safety database for processing; The application program interface API is used to perform a logical operation on the data read from the security database and then feed it back to the security database in the format of the first security pure data.
8. The high-security platform door control system according to claim 7, characterized in that: The external signal device includes a plurality of network nodes; The drive acquisition subsystem includes: a plurality of CAN nodes.
9. The high-security platform door control system according to claim 8, characterized in that: The first safe pure data output by the external signal device is written into the output data processing database POP_DB through the network writing interface; The application program interface API reads the output data processing database POP_DB through the API reading interface, and after performing a logical operation on the read first security pure data, writes the first security pure data into the output data processing database POP_DB through the API writing interface; The CAN reading interface reads the first safety pure data in the output data processing database POP_DB; and sending the first safety pure data read to the drive acquisition subsystem accordingly; The second safe pure data fed back by the drive acquisition subsystem is written into the feedback data processing database PUSH_DB through the CAN write interface, the application program interface API reads the second safe pure data in the feedback data processing database PUSH_DB through the API read interface, performs a logical operation on the second safe pure data, and writes the data into the feedback data processing database PUSH_DB through the API write interface; The network reading interface reads the second safe pure data from the feedback data processing database PUSH_DB and sends it to the external signal device.
10. A method for processing secure data, characterized in that: The method is implemented by using the secure data processing system as claimed in claim 5, and the method comprises: Inputting the first security pure data and / or the second security pure data into the local security database and the remote security database respectively through the write interface; The local security database screens the received first security pure data and / or second security pure data to obtain local representative data, and packages the local representative data according to a preset format to obtain local 2oo2 data; The remote security database screens the received first security pure data and / or second security pure data to obtain remote representative data, and packages the remote representative data according to a preset format to obtain remote 2oo2 data; Sending the remote 2oo2 data to the local secure database; The local security database parses the received remote 2oo2 data and performs 2oo2 consistency comparison with the local 2oo2 data to obtain a comparison result, and performs data mapping and data update on the data to be processed according to the comparison result; and, sending the local 2oo2 data to the remote secure database; The remote security database parses the received local 2oo2 data and performs a 2oo2 consistency comparison with the remote 2oo2 data to obtain a comparison result, and performs data mapping and data update on the data to be processed according to the comparison result.
11. The method for processing secure data according to claim 10, wherein: The representative data includes characterization information characterizing the first safety pure data and / or the second safety pure data and characterization information of the safety database processing result of the previous period.
12. The secure data processing method according to claim 11, characterized in that: The local 2oo2 data and the remote 2oo2 data have the same format. The data format of the local 2oo2 data includes a data packet with the following field information: DbId: The cycle number of the local active database, which increases by 1 every cycle; SHA: 160-bit summary of the local active database. The hash value is obtained by encrypting the entire local active database using the SHA1 algorithm. PDO_RevFlag[n1]: n1-bit binary value, each bit indicates whether a PDO format data is received, and there are at most n1 PDO format data; PDO_CRC[n1]: CRC value of n1 PDO format data. Calculate 16-bit CCITT-CRC16 for each PDO format data. Block_CRC[n2]: one first security pure data occupies one Block_Buffer. This field indicates the CRC value of n2 Block_Buffers. n2 is the number of Block_Buffers used. A 32-bit CCITT-CRC32 is calculated for each Block_Buffer. There are at most n2 Block_Buffer data formats. Block_Prio[n3]: The thread priority of n3 Block_Buffers, indicating the task priority of the thread that calls the write interface to submit the Block_Buffer.
13. The secure data processing method according to claim 12, characterized in that: The step of the local security database performing consistency comparison between the remote 2oo2 data and the local 2oo2 data comprises: When the DbIds of the two are consistent, the processing cycles of the local security database and the remote security database are guaranteed to be consistent. If they are inconsistent, the local CPU will shut down. When the SHAs of the two are consistent, it is guaranteed that the hash value of the local security database is the same as the hash value of the remote security database. If they are inconsistent, the local CPU will shut down; Record the PDO_RevFlag[42], PDO_CRC[42], Block_CRC[n2] and Block_Prio[n3] field information of the remote 2oo2 data.
14. The method for processing secure data according to claim 13, wherein: The local security database is also used to map the plurality of the first security pure data into the local security database; The local security database is also used to map a plurality of the second security pure data into the local security database.
15. The secure data processing method according to claim 14, characterized in that: The step of mapping a plurality of the first security pure data to the local security database comprises: Determine whether the numbers n2 and n3 of Block_Buffer used in Block_CRC[n2] and Block_Prio[n3] in the remote 2oo2 data are the same, and if they are different, shut down the local CPU; If they are the same, then find the Block_Prio in the local 2oo2 data that is equal to Block_Prio[x] in the remote 2oo2 data, and then find the Block_Buffer corresponding to the Block_Prio, where x represents the xth Block_Prio; Determine whether the Block_CRC in the local 2oo2 data corresponding to the Block_Buffer is the same as the Block_CRC in the remote 2oo2 data. If they are not the same, the local CPU crashes. If they are the same, the local security database maps the first security pure data to PDO format data until all the first security pure data are mapped to PDO format data, and then maps the PDO format data to the local security database, and releases the current Block_Buffer; If the local security database cannot find the Block_Prio[x] in the local 2oo2 data that is equal to the Block_Prio[x] in the remote 2oo2 data, the update of this cycle fails, the number of consecutive failures increases by 1, and forgiveness is performed. When the number of consecutive failures reaches the threshold, the local CPU crashes.
16. The method for processing secure data according to claim 15, wherein: The step of mapping the plurality of second security pure data to the local security database comprises: If PDO_RevFlag[x] in the local 2oo2 data and the remote 2oo2 data are both true; Compare the PDO_CRC[x] in the local 2oo2 data and the remote 2oo2 data, if the PDO_CRC[x] of the two are the same, where x represents the xth PDO format data; Then the second security pure data is mapped into PDO format data, until all the second security pure data are mapped into PDO format data, and then the PDO format data is mapped into the local security database, If the PDO_CRC[x] of the two are different, the local CPU crashes; If either PDO_RevFlag[x] in the local 2oo2 data or PDO_RevFlag[x] in the remote 2oo2 data is false, the local security database considers that the PDO format data has not been received, and the PDO format data is forgiven using the value of the previous cycle and is set to the value of the security side after the forgiveness cycle is reached.
17. The method for processing secure data according to claim 16, wherein: According to the cycle number DbId of the local active database, the odd-numbered security database or the even-numbered security database is used alternately as the active database. When the cycle number is odd, the odd-numbered security database is used as the local active database, and the even-numbered security database is used as the local standby database; when the cycle number is even, the even-numbered security database is used as the local active database, and the odd-numbered security database is used as the local standby database; According to the cycle number DbId of the remote active database, the odd-numbered security database or the even-numbered security database is used alternately as the active database. When the cycle number is odd, the odd-numbered security database is used as the remote active database, and the even-numbered security database is used as the remote standby database; when the cycle number is even, the even-numbered security database is used as the remote active database, and the odd-numbered security database is used as the remote standby database.
18. The secure data processing method according to claim 17, characterized in that: Also includes: Update the local security database: Update the cycle number DbId of the local active database; Updating the hash value of the local active database; Updating the remote security database: updating the period number DbId of the remote active database of the remote security database; The hash value of the remote active database is updated.
19. The secure data processing method according to claim 18, characterized in that: Also includes: The local security database determines whether to start a new security data processing cycle; Determine whether to wait for the data processing signal. The data processing signal will be waited for once every fixed time. If it is waited for, the next cycle of security data processing will start; If you don't get there, keep waiting.
20. The secure data processing method according to claim 19, characterized in that: Also includes: When the read interface reads the security database: the remote CPU reads the remote active database under the cycle number DbId of the current remote active database; Send the cycle number DbId of the current remote active database to the local CPU, The local CPU determines whether the received period number DbId of the remote active database is the same as the period number DbId of the local active database, and if they are the same, reads the local active database; If they are not the same, the local CPU determines whether the cycle number DbId is the same as that of the local standby database. If they are the same, the local standby database is read; If they are not the same, an error is reported.
