Communication method and device of train network control system
By using domestic communication encryption algorithms for key negotiation and data encryption in the train network control system, the problem of existing systems not protecting communication data is solved, and the confidentiality and integrity of communication data is guaranteed, and the attack is resisted. threaten.
Patent Information
- Application Number
- CN202311006331.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2025-02-18
AI Technical Summary
The existing train network control system does not consider the security of communication data, which makes the system susceptible to eavesdropping, tampering and forgery attacks, threatening the service operation of the train network.
The domestic communication encryption algorithm is used to negotiate the key between the central control device and the sub-control device, form a communication status table, determine the communication status, and use the SM4 encryption algorithm to encrypt and decrypt the data in the encryptable communication state, and perform integrity verification at the same time Test.
Protect the confidentiality and integrity of the communication data of the train network control system through encrypted communication, resist eavesdropping and tampering attacks, and ensure the security and reliability of the system.
Smart Images

Figure CN119483988A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of railway vehicle network security, and in particular to a communication method and device for a train network control system. Background Art
[0002] With the rapid development of information technology, digitalization, informatization and intelligence have become the general trend of urban rail transit development, and the information security issues of urban rail transit onboard equipment are becoming increasingly complex and severe. In the past, the train network control system was relatively closed, and the security requirements of train communication data were not considered. The system operating environment adopted a plain text transmission method. Once criminals successfully invaded the train network control system, they might launch attacks such as eavesdropping, tampering or forgery on the train, posing a great threat to the business operation of the train network control system. Therefore, it is necessary to use secure encryption technology to verify the confidentiality and integrity of the train network control system communication data. Summary of the invention
[0003] The present invention provides a communication method and device for a train network control system, which are used to protect the confidentiality and integrity of communication data of the train network control system.
[0004] In a first aspect, the present invention provides a communication method of a train network control system, wherein the train network control system comprises: a central control device and a sub-control device, and the method comprises:
[0005] After the train network control system is started, a domestic communication encryption algorithm is used to perform key negotiation between the central control device and the sub-control device to form a communication status table;
[0006] When the sub-control devices communicate with each other, determining the communication status of the control device through the communication status table;
[0007] If the communication state is unencrypted communication, the sub-control devices use plain text transmission to achieve data interaction;
[0008] If the communication status is encrypted communication, the sending terminal control device encrypts the original data packet to be sent using the domestic communication encryption algorithm, the receiving terminal control device splits the encrypted data, and decrypts the encrypted data using the domestic communication encryption algorithm.
[0009] Optionally, if the communication state is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by using the domestic communication encryption algorithm, and the receiving terminal control device splits the encrypted data and decrypts the encrypted data by using the domestic communication encryption algorithm, further comprising:
[0010] The receiving terminal control device performs integrity check on the decrypted data.
[0011] Optionally, after the train network control system is started, a domestic communication encryption algorithm is used to perform key negotiation between the central control device and the sub-control device to form a communication status table, including:
[0012] S1, the sub-control device obtains the random number seed generated by the central control device, combines the device information of the sub-control device, and generates an SM4 encryption key through a key generation algorithm;
[0013] S2, the sub-control device verifies whether the SM4 encryption key is consistent with the stored encryption key; if not, executing step S3; if consistent, determining that the communication state of the sub-control device is encrypted communication;
[0014] S3, the central control device verifies through an encryption key whether the verification data message sent by the sub-control device is consistent; if inconsistent, the communication state of the sub-control device is determined to be unencrypted communication; if consistent, the communication state of the sub-control device is determined to be encrypted communication.
[0015] Optionally, if the communication state is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by using the domestic communication encryption algorithm, the receiving terminal control device splits the encrypted data, and decrypts the encrypted data by using the domestic communication encryption algorithm, including:
[0016] The sending terminal control device encrypts the original data packet using the SM4 symmetric encryption algorithm to obtain encrypted data, and generates a check code using the SM3 hash algorithm;
[0017] The sending terminal control device combines the message header, the encrypted data and the check code to obtain the encrypted data;
[0018] The receiving terminal control device splits the encrypted data and decrypts the encrypted data using the SM4 symmetric encryption algorithm.
[0019] Optionally, the receiving terminal control device performs integrity check on the decrypted data, including:
[0020] The receiving terminal control device generates a new check code based on the decrypted data through the SM3 hash algorithm;
[0021] Whether the decrypted data is complete is verified based on the consistency between the new verification code and the verification code.
[0022] In a second aspect, the present invention provides a communication device for a train network control system, the train network control system comprising: a central control device and a sub-control device, the device comprising:
[0023] A communication status table forming module, used to use a domestic communication encryption algorithm to perform key negotiation between the central control device and the sub-control device to form a communication status table after the train network control system is started;
[0024] a communication status determination module, configured to determine the communication status of the control device through the communication status table when the sub-control devices communicate with each other;
[0025] A first communication module, configured to implement data interaction between the sub-control devices by using plain text transmission if the communication state is unencrypted communication;
[0026] The second communication module is used for, if the communication state is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by using the domestic communication encryption algorithm, the receiving terminal control device splits the encrypted data, and decrypts the encrypted data by using the domestic communication encryption algorithm.
[0027] Optionally, it also includes:
[0028] The verification module is used to perform integrity verification on the decrypted data through the receiving terminal control device.
[0029] Optionally, the communication status table forming module includes:
[0030] A key generation submodule, used to obtain the random number seed generated by the central control device through the sub-control device, and combine the device information of the sub-control device to generate an SM4 encryption key through a key generation algorithm;
[0031] A first verification submodule, used to verify whether the SM4 encryption key is consistent with the stored encryption key through the sub-control device; if not, executing the second verification submodule; if consistent, determining that the communication state of the sub-control device is encrypted communication;
[0032] The second verification submodule is used to verify whether the verification data message sent by the sub-control device is consistent with the encryption key through the central control device; if inconsistent, determine that the communication state of the sub-control device is unencrypted communication; if consistent, determine that the communication state of the sub-control device is encrypted communication.
[0033] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are performed.
[0034] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps in the method provided in the first aspect are performed.
[0035] It can be seen from the above technical solutions that the present invention has the following advantages:
[0036] The present invention provides a communication method and device for a train network control system, the train network control system includes: a central control device and a sub-control device, the method includes: after the train network control system is started, a domestic communication encryption algorithm is used to negotiate the key between the central control device and the sub-control device to form a communication status table; when the sub-control devices communicate, the communication status of the control device is determined by the communication status table; if the communication status is unencrypted communication, the sub-control devices use plain text transmission to achieve data interaction; if the communication status is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by the domestic communication encryption algorithm, the receiving terminal control device splits the encrypted data, and decrypts the encrypted data by the domestic communication encryption algorithm. By performing domestic communication encryption on the train network control system, the problem that the previous train network control system did not protect the communication data is solved, and the purpose of resisting eavesdropping and tampering attacks on the communication data is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 A flow chart of a communication method for a train network control system according to a first embodiment of the present invention;
[0039] Figure 2 A flow chart of a second embodiment of a communication method for a train network control system of the present invention;
[0040] Figure 3 This is a schematic diagram of key negotiation;
[0041] Figure 4This is a schematic diagram of encrypted communication;
[0042] Figure 5 The present invention is a structural block diagram of an embodiment of a communication device for a train network control system according to the present invention. DETAILED DESCRIPTION
[0043] The embodiments of the present invention provide a communication method and device for a train network control system, which are used to protect the confidentiality and integrity of communication data of the train network control system.
[0044] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] For example, see Figure 1 , Figure 1 The present invention is a flow chart of a communication method for a train network control system according to a first embodiment of the present invention. The train network control system includes: a central control device and a sub-control device. The method includes:
[0046] Step S101, after the train network control system is started, a domestic communication encryption algorithm is used to perform key negotiation between the central control device and the sub-control device to form a communication status table;
[0047] In an embodiment of the present invention, after the train network control system equipment is started, a random number seed is generated by the central control device and transmitted to the remaining sub-control devices via Ethernet. After receiving the random number seed, the sub-control device generates an encryption key through the key generation algorithm in the domestic communication encryption algorithm, and negotiates the key with the central control device. After the negotiation is completed, the sub-control device forms a communication status table.
[0048] Step S102, when the sub-control devices communicate with each other, determining the communication status of the control device through the communication status table;
[0049] Step S103, if the communication state is unencrypted communication, the sub-control devices use plain text transmission to achieve data interaction;
[0050] Step S104, if the communication state is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by using the domestic communication encryption algorithm, and the receiving terminal control device splits the encrypted data and decrypts the encrypted data by using the domestic communication encryption algorithm;
[0051] In the embodiment of the present invention, when the sub-control device communicates, the communication status is determined by the communication status table of the sub-control device. If the communication status is encrypted communication, the sending terminal control device adds an encrypted communication message header and encrypted data on the basis of the original data packet, including: using the domestic symmetric encryption algorithm SM4 to encrypt the data, and using the domestic hash algorithm SM3 to generate a data check code; if the communication status is non-encrypted communication, the sub-control devices maintain plain text transmission.
[0052] In an optional embodiment, if the communication state is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by the domestic communication encryption algorithm, and the receiving terminal control device splits the encrypted data and decrypts the encrypted data by the domestic communication encryption algorithm, and further includes:
[0053] The receiving terminal control device performs integrity check on the decrypted data.
[0054] In an embodiment of the present invention, when the sub-control device receives a message, it will split the encrypted data and the check code for the encrypted message header, decrypt the encrypted data using the domestic symmetric encryption algorithm SM4, and perform integrity check on the decrypted message.
[0055] In a communication method of a train network control system provided in an embodiment of the present invention, the train network control system includes: a central control device and a sub-control device, and the method includes: after the train network control system is started, a domestic communication encryption algorithm is used to negotiate the key between the central control device and the sub-control device to form a communication status table; when communicating between the sub-control devices, the communication status of the control device is determined by the communication status table; if the communication status is unencrypted communication, the sub-control devices use plain text transmission to achieve data interaction; if the communication status is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by the domestic communication encryption algorithm, and the receiving terminal control device splits the encrypted data and decrypts the encrypted data by the domestic communication encryption algorithm. By performing domestic communication encryption on the train network control system, the problem that the previous train network control system did not protect the communication data is solved, and the purpose of resisting eavesdropping and tampering attacks on the communication data is achieved.
[0056] For example 2, please refer to Figure 2 , Figure 2 The present invention is a flow chart of a second embodiment of a communication method for a train network control system, wherein the train network control system comprises: a central control device and a sub-control device, and the method comprises:
[0057] Step S201, the sub-control device obtains the random number seed generated by the central control device, combines the device information of the sub-control device, and generates an SM4 encryption key through a key generation algorithm;
[0058] Step S202, the sub-control device verifies whether the SM4 encryption key is consistent with the stored encryption key; if not, executing step S3; if consistent, determining that the communication state of the sub-control device is encrypted communication;
[0059] Step S203, the central control device verifies whether the verification data message sent by the sub-control device is consistent with the encryption key; if not, the communication state of the sub-control device is determined to be unencrypted communication; if consistent, the communication state of the sub-control device is determined to be encrypted communication;
[0060] See also Figure 3 , Figure 3 It is a schematic diagram of key negotiation. First, a random number seed is generated by the central control device and periodically sent to the sub-control device through the TRDP protocol; after the sub-control device receives the random number seed, the random number seed and the device information of the self-control device (including project type and device type, etc.) are combined, and the SM4 encryption key is generated by the key generation algorithm, and the generated encryption key is verified to be consistent with the encryption key stored in the device. If they are consistent, no processing is performed; if they are inconsistent, the generated encryption key is saved in a temporary storage area, and sent to the central control device key verification status information and verification data message. After the central control device receives the sub-control device message, it uses its own encryption key to verify whether the verification data message is consistent (wherein, 1 represents consistency and 0 represents inconsistency). If they are inconsistent, the communication status information of the sub-control device is sent as an encryption key error, and the communication is not encrypted. If they are consistent, the communication status information of the sub-control device is sent as the encryption key is correct, and the communication is encrypted; after the sub-control device receives the encrypted communication status information of the central control device, the encryption key and its own encrypted communication status in the temporary storage area are updated before (wherein, 1 represents encrypted communication and 0 represents unencrypted communication).
[0061] Step S204, when the sub-control devices communicate with each other, determining the communication status of the control device through the communication status table;
[0062] Step S205, if the communication state is unencrypted communication, the sub-control devices use plain text transmission to achieve data interaction;
[0063] Step S206, if the communication state is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by using the domestic communication encryption algorithm, the receiving terminal control device splits the encrypted data, and decrypts the encrypted data by using the domestic communication encryption algorithm; specifically includes:
[0064] The sending terminal control device encrypts the original data packet using the SM4 symmetric encryption algorithm to obtain encrypted data, and generates a check code using the SM3 hash algorithm;
[0065] The sending terminal control device combines the message header, the encrypted data and the check code to obtain the encrypted data;
[0066] The receiving terminal control device splits the encrypted data and decrypts the encrypted data using the SM4 symmetric encryption algorithm.
[0067] Step S207, the receiving terminal control device generates a new check code based on the decrypted data by using the SM3 hash algorithm;
[0068] Step S208: Verify whether the decrypted data is complete based on the consistency between the new verification code and the verification code.
[0069] See also Figure 4 , Figure 4 For encrypted communication schematic diagram, in an embodiment of the present invention, when encrypted communication is controlled between devices, the control data is encrypted using SM4 symmetric encryption algorithm by the sending terminal control device (control device ②), and a check code is generated using SM3 hash algorithm, and the encrypted data and the check code are combined into an encrypted message. The receiving terminal control device (control device ②) is transmitted to the receiving terminal control device by Ethernet TRDP protocol, and the receiving terminal control device splits the encrypted message, decrypts the encrypted data using SM4 symmetric encryption algorithm, generates a new check code by SM3 hash algorithm for the decrypted data, and the new check code and the check code in the message are checked for consistency, and if they are consistent, the decrypted data is uploaded to the upper layer application; if they are inconsistent, the data is discarded.
[0070] In a communication method and device of a train network control system provided in an embodiment of the present invention, the train network control system includes: a central control device and a sub-control device, and the method includes: after the train network control system is started, a domestic communication encryption algorithm is used to negotiate the key between the central control device and the sub-control device to form a communication status table; when communicating between the sub-control devices, the communication status of the control device is determined by the communication status table; if the communication status is unencrypted communication, the sub-control devices use plain text transmission to achieve data interaction; if the communication status is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by the domestic communication encryption algorithm, and the receiving terminal control device splits the encrypted data and decrypts the encrypted data by the domestic communication encryption algorithm. By using the domestic symmetric encryption algorithm SM2 and the hash algorithm SM3 to protect the confidentiality and integrity of the communication data, the problem of the previous train network control system not protecting the communication data is solved, and the purpose of resisting eavesdropping and tampering attacks on the communication data is achieved.
[0071] For example 3, please refer to Figure 5 , Figure 5 The present invention is a structural block diagram of a communication device embodiment of a train network control system, wherein the train network control system comprises: a central control device and a sub-control device, and the device comprises:
[0072] The communication status table forming module 301 is used to perform key negotiation between the central control device and the sub-control device using a domestic communication encryption algorithm after the train network control system is started, so as to form a communication status table;
[0073] A communication status determination module 302, configured to determine the communication status of the control device through the communication status table when the sub-control devices communicate with each other;
[0074] A first communication module 303, configured to implement data interaction between the sub-control devices by using plain text transmission if the communication state is unencrypted communication;
[0075] The second communication module 304 is used to, if the communication state is encrypted communication, cause the sending terminal control device to encrypt the original data packet to be sent by using the domestic communication encryption algorithm, and the receiving terminal control device to split the encrypted data and decrypt the encrypted data by using the domestic communication encryption algorithm.
[0076] In an optional embodiment, it also includes:
[0077] The verification module is used to perform integrity verification on the decrypted data through the receiving terminal control device.
[0078] In an optional embodiment, the communication status table forming module 301 includes:
[0079] A key generation submodule, used to obtain the random number seed generated by the central control device through the sub-control device, and combine the device information of the sub-control device to generate an SM4 encryption key through a key generation algorithm;
[0080] A first verification submodule, used to verify whether the SM4 encryption key is consistent with the stored encryption key through the sub-control device; if not, executing the second verification submodule; if consistent, determining that the communication state of the sub-control device is encrypted communication;
[0081] The second verification submodule is used to verify whether the verification data message sent by the sub-control device is consistent with the encryption key through the central control device; if inconsistent, determine that the communication state of the sub-control device is unencrypted communication; if consistent, determine that the communication state of the sub-control device is encrypted communication.
[0082] In an optional embodiment, the second communication module 304 includes:
[0083] A first check code generation submodule, configured to encrypt the original data packet using an SM4 symmetric encryption algorithm through the sending terminal control device to obtain encrypted data, and to generate a check code using an SM3 hash algorithm;
[0084] An encrypted data generation submodule, used for combining a message header, the encrypted data and the check code through the sending terminal control device to obtain the encrypted data;
[0085] The decryption submodule is used to split the encrypted data through the receiving terminal control device and decrypt the encrypted data using the SM4 symmetric encryption algorithm.
[0086] In an optional embodiment, the verification module includes:
[0087] A second check code generation submodule, used for the receiving terminal control device to generate a new check code based on the decrypted data through the SM3 hash algorithm;
[0088] The check submodule is used to check whether the decrypted data is complete based on the consistency between the new check code and the check code.
[0089] An embodiment of the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a communication method for a train network control system as described in any of the above embodiments.
[0090] An embodiment of the present invention further provides a computer storage medium on which a computer program is stored. When the computer program is executed by the processor, the steps of a communication method for a train network control system as described in any of the above embodiments are implemented.
[0091] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0092] In the several embodiments provided in the present application, it should be understood that the methods, devices, electronic devices and storage media disclosed in the present invention can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0093] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0094] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0095] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a readable storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0096] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A communication method for a train network control system, the train network control system comprising: The central control device and the sub-control device are characterized in that the method comprises: After the train network control system is started, a domestic communication encryption algorithm is used to perform key negotiation between the central control device and the sub-control device to form a communication status table; When the sub-control devices communicate with each other, determining the communication status of the control device through the communication status table; If the communication state is unencrypted communication, the sub-control devices use plain text transmission to achieve data interaction; If the communication status is encrypted communication, the sending terminal control device encrypts the original data packet to be sent using the domestic communication encryption algorithm, the receiving terminal control device splits the encrypted data, and decrypts the encrypted data using the domestic communication encryption algorithm.
2. The communication method of the train network control system according to claim 1, characterized in that: If the communication state is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by using the domestic communication encryption algorithm, and the receiving terminal control device splits the encrypted data and decrypts the encrypted data by using the domestic communication encryption algorithm, and further includes: The receiving terminal control device performs integrity check on the decrypted data.
3. The communication method of the train network control system according to claim 1 or 2, characterized in that: After the train network control system is started, a domestic communication encryption algorithm is used to perform key negotiation between the central control device and the sub-control device to form a communication status table, including: S1, the sub-control device obtains the random number seed generated by the central control device, combines the device information of the sub-control device, and generates an SM4 encryption key through a key generation algorithm; S2, the sub-control device verifies whether the SM4 encryption key is consistent with the stored encryption key; if not, executing step S3; if consistent, determining that the communication state of the sub-control device is encrypted communication; S3, the central control device verifies through an encryption key whether the verification data message sent by the sub-control device is consistent; if inconsistent, the communication state of the sub-control device is determined to be unencrypted communication; if consistent, the communication state of the sub-control device is determined to be encrypted communication.
4. The communication method of the train network control system according to claim 2, characterized in that: If the communication state is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by using the domestic communication encryption algorithm, and the receiving terminal control device splits the encrypted data and decrypts the encrypted data by using the domestic communication encryption algorithm, including: The sending terminal control device encrypts the original data packet using the SM4 symmetric encryption algorithm to obtain encrypted data, and generates a check code using the SM3 hash algorithm; The sending terminal control device combines the message header, the encrypted data and the check code to obtain the encrypted data; The receiving terminal control device splits the encrypted data and decrypts the encrypted data using the SM4 symmetric encryption algorithm.
5. The communication method of the train network control system according to claim 4, characterized in that: The receiving terminal control device performs integrity check on the decrypted data, including: The receiving terminal control device generates a new check code based on the decrypted data through the SM3 hash algorithm; Whether the decrypted data is complete is verified based on the consistency between the new verification code and the verification code.
6. A communication device for a train network control system, the train network control system comprising: The central control device and the sub-control device are characterized in that the device comprises: A communication status table forming module, used to use a domestic communication encryption algorithm to perform key negotiation between the central control device and the sub-control device to form a communication status table after the train network control system is started; a communication status determination module, configured to determine the communication status of the control device through the communication status table when the sub-control devices communicate with each other; A first communication module, configured to implement data interaction between the sub-control devices by using plain text transmission if the communication state is unencrypted communication; The second communication module is used for, if the communication state is encrypted communication, the sending terminal control device encrypts the original data packet to be sent by using the domestic communication encryption algorithm, the receiving terminal control device splits the encrypted data, and decrypts the encrypted data by using the domestic communication encryption algorithm.
7. The communication device for a train network control system according to claim 6, characterized in that: Also includes: The verification module is used to perform integrity verification on the decrypted data through the receiving terminal control device.
8. The communication device of the train network control system according to claim 6 or 7, characterized in that: The communication status table forming module comprises: A key generation submodule, used to obtain the random number seed generated by the central control device through the sub-control device, and combine the device information of the sub-control device to generate an SM4 encryption key through a key generation algorithm; A first verification submodule, used to verify whether the SM4 encryption key is consistent with the stored encryption key through the sub-control device; if not, executing the second verification submodule; if consistent, determining that the communication state of the sub-control device is encrypted communication; The second verification submodule is used to verify whether the verification data message sent by the sub-control device is consistent with the encryption key through the central control device; if inconsistent, determine that the communication state of the sub-control device is unencrypted communication; if consistent, determine that the communication state of the sub-control device is encrypted communication.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 5 is executed.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is performed.