State machine-based data remote update system and method

Through the session state management and session ID mechanism based on state machine, network packet loss and out of order in railway signal systems are solved, the success rate and flexibility of data updates are improved, and efficient data updates are achieved under low bandwidth conditions.

CN115589413BActive Publication Date: 2025-08-29CASCO SIGNAL LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211241723.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-11
Publication Date
2025-08-29
Estimated Expiration
2042-10-11

AI Technical Summary

Technical Problem

In the railway signal system, the existing remote batch update tool has a serious problem of network packet loss during data transmission due to the small network bandwidth. The retransmission mechanism of the existing tool increases the risk of data out of order and reduces the update success rate.

Method used

The remote data update system based on state machine is adopted, and the session state is updated in real time through session state management and session ID mechanisms. Different forgiveness mechanisms are adopted according to different states to reduce the number of data retransmissions, and the consistency of the data update process is ensured through session ID, reducing the risk of out-of-order data transmission.

Benefits of technology

It improves the success rate of data updates with small network bandwidth, reduces the risk of out-of-order data transmission, and enhances the flexibility and consistency of data updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115589413B_ABST
    Figure CN115589413B_ABST
Patent Text Reader

Abstract

The present invention discloses a state machine-based remote data update system and method. The system comprises a data update module and a secure computer platform. The data update module is configured to send a create session request instruction. The secure computer platform is connected to the data update module and configured to establish a session between the secure computer platform and the data update module in accordance with the create session request instruction. During the session, the secure computer platform sends the session status to the data update module so that the data update module can perform corresponding data update operations based on the session status. The present invention can reduce the risk of data transmission disorder and improve the success rate of data updates when network bandwidth is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of remote data update, and in particular to a state machine-based remote data update system and method. Background Art

[0002] The safety computer platform is a general-purpose SIL4 (Safety Integrity Level 4) safety computer system used by rail transit safety signaling equipment. During daily use, these rail transit safety signaling devices often experience data version changes, requiring updates within a limited time window. To prevent cyberattacks, railway signaling systems often have a small bandwidth, resulting in network packet loss during large amounts of data updates. Existing remote batch update tools lack high adaptability, and their fixed retransmission mechanisms can further increase network burdens and the risk of data disorder, resulting in a low update success rate for remote batch update tools. Summary of the Invention

[0003] The present invention aims to at least partially address one of the technical problems in the related art. To this end, a first object of the present invention is to provide a state machine-based remote data update system that reduces the risk of out-of-order data transmission and improves the success rate of data updates when network bandwidth is low.

[0004] To achieve the above object, the present invention is implemented through the following technical solutions:

[0005] A data remote update system based on a state machine, comprising:

[0006] A data update module is used to send a create session request instruction;

[0007] A secure computer platform is connected to the data update module. The secure computer platform is used to create a session between the secure computer platform and the data update module according to the create session request instruction, and during the data update process, send the session status to the data update module so that the data update module can perform corresponding data update operations according to the session status.

[0008] Optionally, the session has session attributes, and the session attributes include at least one of a session ID, a session number, and the session state.

[0009] Optionally, the session state includes at least one of an initialization state, an occupied state, an available state and an error state, wherein the initialization state indicates the initial state of creating a session, the occupied state indicates the state in which the process corresponding to the current data update command has not yet been executed, the available state indicates the state in which the process corresponding to the previous data update command has been executed, and the error state indicates the state in which an error occurs in the execution of the process corresponding to the previous data update command.

[0010] Optionally, the session ID is used to identify the consistency of the data update process between the secure computer platform and the data update module.

[0011] Optionally, the number of sessions is determined according to the number of data updates and is greater than or equal to 2.

[0012] Optionally, the secure computer platform is further configured to set the session state of the previous session to an initialization state when creating a new session.

[0013] Optionally, the data update module is also used to send a request command to the secure computer platform to obtain a session ID, and after receiving the session ID, add the session ID to the data update command, and send the data update command with the session ID added to the secure computer platform. The secure computer platform is also used to check the session ID in the data update command.

[0014] Optionally, the secure computer platform is further configured to update the current session state in real time according to the execution phase of the data update command, and return the updated session state to the data update module.

[0015] Optionally, the session IDs obtained by the secure computer platform twice consecutively are different.

[0016] Optionally, the secure computer platform is further configured to perform data transmission with the data update module via a TFTP protocol.

[0017] Optionally, the secure computer platform and the data update module are further configured to pre-set the format and type of the request command.

[0018] Optionally, the secure computer platform is further configured to check the format and type of the request command sent by the data update module, and after the check is correct, return the corresponding request data in the request command.

[0019] Optionally, after receiving the request data, the data update module is further configured to return an ACK confirmation frame to the secure computer platform.

[0020] Optionally, when the data update module performs a corresponding data update operation according to the session state, it is specifically configured to:

[0021] When the session status received by the data update module is an available status, the data update module continues to send a data update command with the session ID added;

[0022] When the session status received by the data update module is occupied, the data update module resends the obtain session status command until the received session status is available, then continues to send the data update command with the session ID added, or terminates the current data update process when the session status received for a preset number of consecutive times is occupied.

[0023] When the session status received by the data update module is an error status, the data update module resends the Get Session ID command after a preset time, and adds the session ID to the data update command previously run in the error status, and resends it.

[0024] To achieve the above object, the second aspect of the present invention provides a data remote update method based on a state machine, comprising:

[0025] The data update module sends a create session request instruction;

[0026] The secure computer platform creates a session between the secure computer platform and the data update module according to the session creation request instruction, and during the session, sends the session status to the data update module so that the data update module performs corresponding data update operations according to the session status.

[0027] The present invention has at least the following technical effects:

[0028] The data update module in the present invention obtains the session status in real time and performs corresponding data update operations according to the session status. Specifically, when performing corresponding data update operations according to the session status, when the received session status is in the available state, the data update module continues to send the data update command with the session ID added thereto. When the received session status is in the occupied state, the data update module resends the obtain session status command until the received session status is in the available state, and continues to send the data update command with the session ID added thereto. Or, when the session status received for a preset number of consecutive times is all in the occupied state, the current data update process is terminated. Moreover, when the received session status is in the error state, the data update module resends the obtain session ID command after a preset time and adds the session ID to the data update command previously running in the error state. , and resends. Therefore, the present invention can adopt different forgiveness mechanisms according to different session states, thereby reducing the number of data retransmissions and improving the update success rate when the network bandwidth is small; in addition, the present invention also identifies the consistency of the data update process between the security computer platform and the data update module through the session ID, checks the format and type of the request command sent by the data update module through the security computer platform, returns an ACK confirmation frame to the security computer platform through the data update module after receiving the request data, and obtains different session IDs when obtaining the session ID twice in succession, thereby effectively reducing the risk of data transmission disorder; in addition, when the security computer platform creates a new session, it also sets the session state of the previous session to the initialization state, which is convenient for the recycling of the previous session, thereby improving the flexibility of data update.

[0029] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A structural block diagram of a state machine-based data remote update system provided in one embodiment of the present invention;

[0031] Figure 2 A diagram illustrating the working principle of session status update provided by one embodiment of the present invention;

[0032] Figure 3 A flow chart of a state machine-based data remote update method provided in one embodiment of the present invention;

[0033] Figure 4 The flowchart of a state machine-based data remote update method provided as a specific example of the present invention. DETAILED DESCRIPTION

[0034] The present embodiment is described in detail below. Examples of the embodiment are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present invention, but are not to be construed as limiting the present invention.

[0035] Because the current railway signaling system has a relatively small network bandwidth, a large amount of data will be lost during the transmission process. The current data transmission method results in the transmission tool's lack of ability to determine data packet loss. The update tool will continue to execute subsequent processes, but the security computer platform will time out waiting for confirmation and disconnect the data connection, resulting in the ultimate update failure.

[0036] To this end, the present invention provides a state machine-based remote data update system and method. The data remote update system in this embodiment adds a session command attribute to the data update command, wherein the secure computer platform is capable of executing the session state update process, and wherein the data update module is capable of executing the session state acquisition and judgment process. Thus, the present invention provides a state machine-based remote data update system and method, and the data update module in the present invention can obtain the execution result of the previous step data update command and perform corresponding data update operations based on the execution result of the previous step data update command, thereby reducing the possibility of data transmission disorder. Furthermore, the present invention provides a forgiveness mechanism for different session states, which can effectively reduce the number of data retransmissions and improve the data update success rate when the network bandwidth is small.

[0037] The state machine-based remote data update system and method of this embodiment will be described below with reference to the accompanying drawings.

[0038] Figure 1 This is a structural block diagram of a data remote update system based on a state machine according to an embodiment of the present invention. Figure 1 As shown, the state machine-based remote data update system 10 includes a data update module 11 and a secure computer platform 12. The data update module 11 is configured to send a session creation request instruction; the secure computer platform 12 is connected to the data update module 11 and is configured to establish a session between the secure computer platform 12 and the data update module 11 in response to the session creation request instruction. During the data update process, the secure computer platform 12 sends the session state to the data update module 11 so that the data update module 11 can perform corresponding data update operations based on the session state.

[0039] Specifically, the session creation request instruction in this embodiment may include information such as the number of data updates, and the secure computer platform 12 may create a corresponding number of sessions based on the number of data updates. It should be noted that the number of sessions in this embodiment is greater than or equal to two to increase the data update rate and to enable data updates to be performed using other sessions if a current session fails or is interrupted.

[0040] The session created in this embodiment has at least one session attribute, which includes at least one of a session ID (Identity document, identification number), a session quantity, and a session state.

[0041] Among them, the session state includes at least one of the initialization state, occupied state, available state and error state, among which the initialization state indicates the initial state of creating a session, the occupied state indicates the state in which the process corresponding to the current data update command has not yet been completed, the available state indicates the state in which the process corresponding to the previous data update command has been completed, and the error state indicates the state in which an error occurs in the execution of the process corresponding to the previous data update command.

[0042] The session ID in this embodiment serves as an identifier of the corresponding relationship between the secure computer platform 12 and the data update module 11 , and is used to identify the consistency of the data update process between the secure computer platform 12 and the data update module 11 .

[0043] It should be noted that after the session is successfully created, the secure computer platform 12 will activate the session, and after the session is successfully created, the secure computer platform 12 will also return the session ID of the created session to the data update module 11.

[0044] In one embodiment of the present invention, the secure computer platform 12 is further configured to set the session state of the previous session to an initialized state when creating a new session, thereby allowing the sessions created by the secure computer platform 12 to be recycled, thereby resolving the problem of being unable to update data due to uncontrollable network status and a limited number of sessions, and the recycling of sessions can improve the flexibility of data updates.

[0045] In one embodiment of the present invention, the data update module 11 is also used to send a request command for obtaining a session ID to the secure computer platform 12, and after receiving the session ID, add the session ID to the data update command, and send the data update command with the added session ID to the secure computer platform 12. The secure computer platform 12 is also used to check the session ID in the data update command, thereby ensuring the consistency of the data update process, thereby effectively reducing the risk of disordered data transmission.

[0046] In one embodiment of the present invention, the secure computer platform 12 is further configured to update the current session state in real time according to the execution phase of the data update command, and return the updated session state to the data update module 11 .

[0047] Specifically, after checking the session ID and confirming its consistency, the secure computer platform 12 can parse the data update command and update the data version based on the content of the parsed data update command. During this process, the secure computer platform 12 can update the current session state in real time according to the execution stage of the data update command and return the updated session state to the data update module 11.

[0048] like Figure 2 As shown, assuming that the session state of the current session ID is in the initialized state, when a data update command is executed, the session state can be updated to the occupied state. When the current data update command is executed, the session state can be updated from the occupied state to the available state. After the data update module 11 obtains that the session state is in the available state, it will continue to send data update commands. When the secure computer platform 12 receives the data update command and executes it again, it can update the session state from the available state to the occupied state. When a problem occurs in the session state, it can be updated from the available state or the occupied state to the error state. For example, when an error occurs when executing the data update command, the current session state can be updated from the occupied state to the error state. The secure computer platform 12 will return the updated session state to the data update module 11 in real time so that the data update module 11 can perform corresponding data update operations based on the current session state.

[0049] In one embodiment of the present invention, the session IDs obtained by the secure computer platform 12 twice consecutively are different.

[0050] Specifically, the next time the secure computer platform 12 obtains a session ID according to the session ID request instruction sent by the data update module 11, the session ID it obtains is different from the session ID obtained this time, thereby further reducing the risk of disordered data transmission.

[0051] In one embodiment of the present invention, the secure computer platform 12 is further configured to transmit data via TFTP (Trivial File Transfer Protocol) to the data update module 11. In this embodiment, the secure computer platform 12 and the data update module 11 are further configured to pre-set the format and type of the request command.

[0052] The secure computer platform 12 is further configured to check the format and type of the request command sent by the data update module 11 and, if the check is correct, return the corresponding request data in the request command. Upon receiving the request data, the data update module 11 is further configured to return an ACK frame (message confirmation frame) to the secure computer platform 12.

[0053] As an example, the data update module 11 can send a request command for obtaining a session ID in a preset command format and type to the secure computer platform 12 through the TFTP protocol. After receiving the request command, the secure computer platform 12 checks its format and type, and returns the session ID after the check is correct. After receiving the session ID, the data update module 11 also returns an ACK confirmation frame to the secure computer platform to confirm the end of the request process.

[0054] As another example, the data update module 11 can send a read request command and a write request command. Taking the read request command as an example, the data update module 11 sends a read request command to obtain information such as the board identification, mode and status. After receiving the request, the secure computer platform 12 replies with corresponding data. After the data update module 11 receives the data replied by the secure computer platform 12, it can reply with an ACK confirmation frame. After receiving the ACK confirmation frame, the secure computer platform 12 can determine that the current process is completed.

[0055] In one embodiment of the present invention, when the data update module 11 performs corresponding data update operations according to the session status, it is specifically used to: when the session status received by the data update module 11 is an available state, the data update module 11 continues to send the data update command with the session ID added; when the session status received by the data update module 11 is an occupied state, the data update module 11 resends the obtain session status command until the received session status is an available state, and continues to send the data update command with the session ID added, or when the session status received for a preset number of consecutive times is an occupied state, terminate the current data update process; when the session status received by the data update module 11 is an error state, the data update module 11 resends the obtain session ID command after a preset time, and adds the session ID to the data update command previously running in the error state, and resends it.

[0056] Specifically, the data update module 11 sends a command to obtain the session ID and adds the received session ID to each subsequent data update command. After each subsequent data update command is executed, the data update module 11 sends a command to obtain the session status to determine the execution result of the previous data update command based on the session status. When the data update module 11 receives that the session status is available, it continues to execute the subsequent process. When the data update module 11 receives that the session status is occupied, it resends the command and terminates the subsequent process when the occupied status is continuously obtained. When the data update module 11 receives that the session status is an error status, it is considered that the transmission is interrupted, and the data update module 11 re-executes the acquisition of the session ID, adds the session ID to the subsequent commands, and resends the previous error command. Among them, the entire data update process can allow multiple transmission interruptions according to the length of the skylight time.

[0057] Figure 3 Flowchart of a data remote update method based on a state machine provided by an embodiment of the present invention. Figure 3 As shown, the method includes:

[0058] Step S1: The data update module sends a create session request instruction;

[0059] Step S2: The secure computer platform creates a session between the secure computer platform and the data update module according to the session creation request instruction, and during the session, sends the session status to the data update module so that the data update module performs corresponding data update operations according to the session status.

[0060] Among them, when the session status received by the data update module is an available state, the data update module continues to send the data update command with the session ID added; when the session status received by the data update module is an occupied state, the data update module resends the obtain session status command until the received session status is an available state, and continues to send the data update command with the session ID added, or when the session status received for a preset number of consecutive times is the occupied state, the current data update process is terminated; when the session status received by the data update module is an error state, the data update module resends the obtain session ID command after a preset time, and adds the session ID to the data update command previously running in the error state, and resends it.

[0061] The following is a detailed description of the state machine-based data remote update method of this embodiment using a specific example. Figure 4 As shown, the execution steps are as follows:

[0062] Step 1: The data update module sends a Get Session ID command. The secure computer platform checks the format of the Get Session ID command to ensure it is correct. It then retrieves an unused session, returns the session ID to the data update module, and sets the session to the initialized state. The data update module receives the session ID and appends it to the end of subsequent data update commands.

[0063] Step 2: The data update module continues to send subsequent data update commands, and the secure computer platform checks that the format of the command is correct and that the session ID in the command is consistent with the currently used session ID.

[0064] Step 3: The secure computer platform checks the current session status. If it is in the Initialization or Available state, it sets the session status to Occupied and continues executing the current command. If an error occurs during subsequent execution of the current command, the session status is set to Error; otherwise, it is set to Available. The Data Update Module continues to send Get Session Status commands to determine the result of the previous step.

[0065] Step 3.1: When the session status received by the data update module is in the available state, the data update module determines that the previous command has been executed and continues to execute the subsequent process. For details, please refer to step 2.

[0066] Step 3.2: When the session status received by the data update module is occupied, it is determined that the previous step command is being executed, and the Get Session Status command is resent until the received session status is available and continues to be executed, or the occupied status is obtained for 6 consecutive times, then the data update process of this stage is terminated.

[0067] Step 3.3: When the session status received by the data update module is an error status, it is determined that the previous command execution error occurred and the transmission was interrupted. The data update module resends the Get Session ID command after 3 seconds. For details, please refer to Step 1. Then, the session ID is reassembled to the end of the subsequent command and the previous error command is resent. The entire data update process allows 3 transmission interruptions.

[0068] Step 4: The data update module continues to send subsequent data update commands and obtain session status commands until the end.

[0069] It should be noted that the specific implementation of the state machine-based data remote update method of this embodiment can refer to the specific implementation of the state machine-based data remote update system described above, and will not be repeated here to avoid redundancy.

[0070] In summary, the data update module in the present invention obtains the session status in real time and performs corresponding data update operations according to the session status, wherein when performing corresponding data update operations according to the session status, when the received session status is an available state, the data update module continues to send the data update command with the session ID added thereto; when the received session status is an occupied state, the data update module resends the obtain session status command until the received session status is an available state, and continues to send the data update command with the session ID added thereto; or when the session status received for a preset number of consecutive times is all occupied, the current data update process is terminated; and when the received session status is an error state, the data update module resends the obtain session ID command after a preset time, and adds the session ID to the data update command previously running in the error state. In the command, resending is performed, so the present invention can adopt different forgiveness mechanisms according to different session states, thereby reducing the number of data retransmissions and improving the update success rate when the network bandwidth is small; in addition, the present invention also identifies the consistency of the data update process between the security computer platform and the data update module through the session ID, checks the format and type of the request command sent by the data update module through the security computer platform, returns an ACK confirmation frame to the security computer platform through the data update module after receiving the request data, and obtains different session IDs when obtaining the session ID twice in succession, thereby effectively reducing the risk of data transmission disorder; in addition, when the security computer platform creates a new session, it also sets the session state of the previous session to the initialization state, which is convenient for the recycling of the previous session, thereby improving the flexibility of data update.

[0071] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0072] Although the present invention has been described in detail through the above preferred embodiments, it should be understood that the above description is not intended to limit the present invention. After reading the above description, various modifications and substitutions of the present invention will become apparent to those skilled in the art. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A data remote update system based on a state machine, characterized in that: include: A data update module is used to send a create session request instruction; a secure computer platform connected to the data update module, the secure computer platform being configured to establish a session between the secure computer platform and the data update module according to the session creation request instruction, and to send a session status to the data update module during the data update process so that the data update module can perform corresponding data update operations according to the session status; The session has session attributes, which include: a session ID, a number of sessions, and at least one of the session status; the session status includes at least one of an initialization status, an occupied status, an available status, and an error status; The data updating module performs corresponding data updating operations according to the session state, including: When the session status received by the data update module is an available status, the data update module continues to send a data update command with the session ID added; When the session status received by the data update module is occupied, the data update module resends the obtain session status command until the received session status is available, then continues to send the data update command with the session ID added, or terminates the current data update process when the session status received for a preset number of consecutive times is occupied. When the session status received by the data update module is an error status, the data update module resends the Get Session ID command after a preset time, and adds the session ID to the data update command previously run in the error status, and resends it.

2. The data remote update system based on the state machine according to claim 1, characterized in that: The initialization state indicates the initial state of creating a session, the occupied state indicates the state in which the process corresponding to the current data update command has not yet been completed, the available state indicates the state in which the process corresponding to the previous data update command has been completed, and the error state indicates the state in which an error occurs in the execution of the process corresponding to the previous data update command.

3. The data remote update system based on the state machine according to claim 2, characterized in that: The session ID is used to identify the consistency of the data update process between the secure computer platform and the data update module.

4. The data remote update system based on the state machine according to claim 3, characterized in that: The number of sessions is determined according to the number of data updates and is greater than or equal to 2.

5. The data remote update system based on the state machine according to claim 4, characterized in that: The secure computer platform is further configured to set the session state of the previous session to an initialization state when creating a new session.

6. The data remote update system based on the state machine according to claim 5, characterized in that: The data update module is further configured to send a request command to the secure computer platform for obtaining a session ID, and after receiving the session ID, add the session ID to the data update command, and send the data update command with the session ID added to the secure computer platform. The secure computer platform is further configured to check the session ID in the data update command.

7. The data remote update system based on the state machine according to claim 6, characterized in that: The secure computer platform is further configured to update the current session state in real time according to the execution phase of the data update command, and return the updated session state to the data update module.

8. The data remote update system based on the state machine according to claim 7, characterized in that: The session IDs obtained twice consecutively by the secure computer platform are different.

9. The data remote update system based on the state machine according to claim 8, characterized in that: The secure computer platform is also used to perform data transmission with the data update module via the TFTP protocol.

10. The data remote update system based on the state machine according to claim 9, characterized in that: The secure computer platform and the data update module are further used to pre-set the format and type of the request command.

11. The data remote update system based on the state machine according to claim 10, characterized in that: The secure computer platform is further configured to check the format and type of the request command sent by the data update module, and return the corresponding request data in the request command after the check is correct.

12. The data remote update system based on the state machine according to claim 11, characterized in that: After receiving the request data, the data update module is further configured to return an ACK confirmation frame to the secure computer platform.

13. A data remote update method based on a state machine, characterized in that: include: The data update module sends a create session request instruction; The secure computer platform creates a session between the secure computer platform and the data update module according to the session creation request instruction, and during the session, sends the session status to the data update module so that the data update module performs corresponding data update operations according to the session status; The session has session attributes, which include: a session ID, a number of sessions, and at least one of the session status; the session status includes at least one of an initialization status, an occupied status, an available status, and an error status; The data updating module performs corresponding data updating operations according to the session state, including: When the session status received by the data update module is an available status, the data update module continues to send a data update command with the session ID added; When the session status received by the data update module is occupied, the data update module resends the obtain session status command until the received session status is available, then continues to send the data update command with the session ID added, or terminates the current data update process when the session status received for a preset number of consecutive times is occupied. When the session status received by the data update module is an error status, the data update module resends the Get Session ID command after a preset time, and adds the session ID to the data update command previously run in the error status, and resends it.

Citation Information

Patent Citations

  • Session correspondence management method and terminal equipment

    CN110784912A