Data interaction method and device between ATO and ATP
By encapsulating the ATO and ATP application core on the same board, and using shared memory and message queues for data interaction, the delay and error problems caused by communication bus failure in data interaction between ATO and ATP are solved, and the stability of data transmission is improved and efficiency ensure the accuracy and safety of train control commands.
Patent Information
- Application Number
- CN202410951935.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-22
AI Technical Summary
The data interaction between ATO and ATP depends on the communication bus, which may lead to delays or error outputs of train control commands in the case of bus failure or high delay, affecting the safe operation of the train.
Encapsulate the ATO application core and the ATP application core on the same board, and realize data interaction through a shared memory mechanism, and use the message queue and receiver ID to store and retrieve data to ensure stable and timely transmission of data.
Through the shared memory data interaction method, the stability and efficiency of communication are improved, the stable interaction between data between ATO and ATP is ensured, the accurate generation and execution of train control commands are ensured, and the safety of train operation is ensured.
Smart Images

Figure CN119003200A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rail transit technology, and in particular to a method and device for data interaction between an ATO and an ATP. Background Art
[0002] With the continuous development of my country's social economy and the increasing demand for railways, the on-board equipment of the Chinese Train Control System (CTCS) has added an Automatic Train Operation (ATO) unit to the original Automatic Train Protection (ATP) unit. Among them, ATP is responsible for the safety control function of train overspeed protection. ATO is used to automatically control the acceleration, deceleration and other operations of the train under the supervision of ATP. Through the data interaction between ATO and ATP, train control commands can be output to control the operation of the train.
[0003] Currently, ATO and ATP exchange data via a communication bus. However, this communication method may cause data transmission interruption in the event of a bus failure or high latency, resulting in the inability to output train control commands, or delay in data transmission, thereby delaying the output of train control commands. In general, as long as there is a problem with the communication bus, it may cause delays or errors in the output of train control commands, thus posing a potential risk to the safe operation of the train. Summary of the invention
[0004] In view of the above problems, the present invention provides a method and device for data interaction between ATO and ATP. The main purpose is to solve the problem that when ATO and ATP currently exchange data through a communication bus, if there is a problem with the communication bus, it may cause delays or errors in the output of train control commands, thereby posing potential risks to the safe operation of the train.
[0005] In order to solve the above technical problems, the present invention proposes the following solutions:
[0006] In a first aspect, the present invention provides a method for data interaction between an ATO and an ATP, the method being applied to an in-vehicle system, the in-vehicle system including an ATO application core and an ATP application core packaged on the same board, the method comprising:
[0007] The first application core among the ATO application core and the ATP application core stores the data to be interacted with in a designated message queue of a shared database, wherein the data to be interacted with has a recipient ID;
[0008] The second application core in the ATO application core and the ATP application core determines whether the recipient ID is consistent with its own second application core ID;
[0009] If they are consistent, the second application core reads the data to be interacted in the designated message queue to complete the data interaction process between ATO and ATP.
[0010] In a second aspect, the present invention provides a data interaction device between an ATO and an ATP, the device being applied to an in-vehicle system, the in-vehicle system including an ATO application core and an ATP application core packaged on the same board, the device comprising:
[0011] A first storage unit, used for the first application core of the ATO application core and the ATP application core to store the data to be interacted with in a designated message queue of a shared database, wherein the data to be interacted with has a recipient ID;
[0012] A judging unit, used for the second application core in the ATO application core and the ATP application core to judge whether the recipient ID stored in the first storage unit is consistent with its own second application core ID;
[0013] The reading unit is used for, if the judgment of the judging unit is consistent, the second application core reads the data to be interacted in the designated message queue to complete the data interaction process between the ATO and the ATP.
[0014] In order to achieve the above-mentioned purpose, according to the third aspect of the present invention, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the data interaction method between the ATO and the ATP of the above-mentioned first aspect.
[0015] In order to achieve the above object, according to a fourth aspect of the present invention, a processor is provided, the processor being used to run a program, wherein the program, when running, executes the data interaction method between the ATO and the ATP according to the first aspect.
[0016] By means of the above technical scheme, the present invention provides a method and device for data interaction between ATO and ATP, which is applied to an on-board system, and the on-board system integrates the ATO application core running the ATO function and the ATP application core running the ATP function on the same board. This layout not only maintains the independence of the ATO and ATP functions, ensuring that the operation of both parties does not affect each other, but also builds a data interaction platform based on shared memory. In this platform, whether the ATO application core or the ATP application core (hereinafter collectively referred to as the "first application core") wants to transmit data to the other party, the data to be interacted containing the recipient ID will be stored in the designated message queue in the shared database. Then, the recipient application core in the ATO application core and the ATP application core (hereinafter collectively referred to as the "second application core") will determine whether the recipient ID is consistent with its own second application core ID. If consistent, the second application core can immediately read the data to be interacted in the designated message queue, thereby completing the data interaction process. Compared with the traditional data interaction mode that relies on the communication bus, the present invention uses the characteristics of shared memory to provide a more stable and efficient communication path. The use of shared memory is like directly storing and retrieving data in a database. Compared with downloading data from the network, it avoids data loss or delay caused by bus instability, and greatly enhances the reliability and real-time performance of communication. In summary, the present invention significantly improves the stability and efficiency of communication by encapsulating the ATO application core and the ATP application core on the same board and relying on shared memory to achieve data interaction, thereby ensuring the stable interaction of data between ATO and ATP, and thus enabling train control commands to be accurately generated and executed, thereby ensuring the safety of train operation.
[0017] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0019] Figure 1 A flow chart of a data interaction method between an ATO and an ATP provided in an embodiment of the present invention is shown;
[0020] Figure 2 Another flow chart of a data interaction method between an ATO and an ATP provided by an embodiment of the present invention is shown;
[0021] Figure 3 A block diagram showing a data interaction device between an ATO and an ATP provided by an embodiment of the present invention is shown;
[0022] Figure 4 A block diagram showing the composition of another data interaction device between an ATO and an ATP provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0024] In view of the problem that when the current ATO and ATP rely on the communication bus for data exchange, bus failures may cause delays or erroneous output of train control commands, thereby posing a potential threat to the safe operation of the train. The inventors have found that the traditional bus transmission method can be abandoned, and the on-board system architecture can be used to encapsulate the ATO application core and the ATP application core on the same board. To achieve the independence and decoupling of the ATO and ATP functions, and introduce a shared memory mechanism as a new bridge for data interaction. Specifically, when either the ATO application core or the ATP application core wants to exchange data with the other party, the data to be exchanged can be written into the designated message queue of the shared database and the recipient ID can be marked. Subsequently, the other can determine whether its own ID is consistent with the recipient ID in the message queue. If consistent, the data to be exchanged in the message queue can be directly accessed and read, thereby completing the data interaction process.
[0025] Compared with the traditional communication bus mode, this interactive mode based on shared memory is more stable and efficient. It is similar to the instant access and copying of information in a database, which greatly improves the stability and efficiency of data transmission. It ensures the stable interaction of data between ATO and ATP, so that train control commands can be generated and executed accurately, ensuring the safety of train operation.
[0026] Next, the in-vehicle system of the execution subject of the present invention is described, and the in-vehicle system has a platform core and an application core. There is no specific limit on the number of platform cores and application cores, and they can be expanded according to actual needs, but they are all packaged on the same board. That is, the platform core and the application core can be regarded as the processor core on the same board, and each core has its specific function.
[0027] Whether it is a function on the platform core or a function running on the application core, they all have their own independent memory area to ensure the independence of their respective logical operations. As for the communication between the platform core and the application core, and between the application cores, they are all realized through the shared memory area between them. This design not only ensures the independence between the cores, but also facilitates information exchange between them.
[0028] The platform core is used to run the platform layer, and the application core is used to run the application layer (i.e., software-level functions).
[0029] The platform layer's responsibilities include communicating with external devices, collecting and driving digital and analog signals, maintaining safety tasks, protecting signals and recording log information, communicating with the application layer, etc. For example, it sends the collected train operation data to the application layer. At the same time, it also provides the application layer with programming language function libraries and mathematical calculation function libraries so that the application layer can call them.
[0030] The responsibilities of the application layer include implementing the logical operations of the train control functions based on the functions provided by the platform layer and the collected train operation data, such as the ATO function and the ATP function.
[0031] In order to decouple the ATO function from the ATP function, the two functions can be run on different application cores. Specifically, the ATO application core and the ATP application core operate independently and have independent memory areas. This design ensures that the two can perform their own software logic operations independently without interfering with each other, thereby improving the reliability and flexibility of the system.
[0032] In addition, since the ATO function and the ATP function run on different application cores respectively, the ATO application core is responsible for the ATO function, and the ATP application core is responsible for the ATP function, the data interaction between them is actually the data interaction performed between the ATO application core and the ATP application core.
[0033] The data interaction between the ATO application core and the ATP application core can be carried out directly when the number of application cores is small, which can improve the efficiency of data interaction. However, when the number of application cores is large, if data interaction is carried out directly between every two application cores, the complexity of the interaction process may increase. Therefore, the data interaction process between the ATO application core and the ATP application core can also be transferred through the platform core, that is, the data interaction process is: the ATO application core and the first application core in the ATP application core interact with the platform core first, and then the platform core interacts with the ATO application core and the second application core in the ATP application core. Such an adjustment makes the data interaction process clearer, and it is only the data interaction between any application core and the platform core.
[0034] The above two data interaction modes between the ATO application core and the ATP application core can be flexibly selected according to actual needs and are not specifically limited here. In addition, regardless of whether the data interaction between the ATO application core and the ATP application core passes through the platform core, the ATO application core and the ATP application core need to be associated with one or more platform cores, because the logical operations of the relevant ATO and ATP functions need to be performed based on the train operation data provided by the platform core.
[0035] In addition, the platform core associated with the ATO application core and the ATP application core can also reserve two other application cores for running other train functions according to actual needs.
[0036] Next, combine Figure 1 The data interaction method between ATO and ATP applied to the above vehicle-mounted system is described, and the specific execution steps are as follows: Figure 1 As shown, including:
[0037] 101. The first application core among the ATO application core and the ATP application core stores the data to be interacted with in a designated message queue of a shared database, wherein the data to be interacted with has a recipient ID.
[0038] When the first application core in the ATO application core and the ATP application core intends to interact with the second application core, two strategies can be selected to execute this process. The first strategy is instant interaction, that is, directly storing the data to be interacted in a specified message queue in a preset shared database in the shared memory area. This method allows data to be sent immediately when needed, improving the immediacy of interaction.
[0039] Another strategy uses a time synchronization mechanism, that is, setting a system clock message in the system as a trigger point in advance. In this mode, only when the ATO application core and the ATP application core receive a system clock message indicating the start of a new cycle, the first application core as the initiator will store the data to be interacted in the shared database specified message queue in the shared memory area. This method ensures the synchronization and periodicity of data interaction, and helps maintain data consistency and processing order in complex systems. The above two strategies can be flexibly selected according to specific application scenarios and requirements to ensure efficient and orderly interaction between the ATO application core and the ATP application core.
[0040] It should be pointed out that in the ATO application core and the ATP application core, the initiator of the task is regarded as the first application core, and the receiver of the task is regarded as the second application core. If the system adopts a time synchronization mechanism, then in a cycle, whether it is a platform core or an application core, it can only serve as an initiator or a receiver, and cannot serve as both roles at the same time. However, this does not mean that when a core acts as an initiator, other cores cannot send data to it as initiators. As long as these data are properly processed in the next cycle when the core acts as a receiver, it will be fine.
[0041] For example, if application core 1 is the initiator in the current cycle, then application core 2 is also the initiator in the current cycle. The receiver of the data to be interacted by application core 2 in the current cycle is application core 1. Then in the next cycle, application core 1 can read the data to be interacted stored by application core 2 in the shared database.
[0042] In addition, the first application core can choose one of two methods to process the data to be interacted and its corresponding recipient ID: the first method is that the first application core directly writes the data to be interacted and its recipient ID into a designated message queue in the shared database; the second method is that the first application core first stores the data to be interacted in the designated message queue of the shared database, and then introduces a soft interrupt mechanism to handle the storage of the recipient ID and message queue ID and the interrupt notification.
[0043] It should be noted that in the above two methods, if the first method is used, since the message queue ID is not specified, the receiver needs to check all message queues in the shared database one by one to compare the receiver ID in each message to find the data to be interacted corresponding to its own ID.
[0044] It should be noted that when the ATO function or the ATP function generates data that needs to be exchanged with the other party in its internal processing logic, they will call their corresponding application cores to perform this data exchange task. This process involves securely transferring the data to be exchanged to the specified message queue in the preset shared database in the shared memory area. In this way, the other party's application core can access this data at the appropriate time, thereby realizing effective data exchange between the ATO function and the ATP function.
[0045] Finally, if the data exchange between the ATO application core and the ATP application core needs to go through the platform core, the recipient ID of the current data to be exchanged should be set to the ID of the platform core. On the contrary, if the data exchange does not need to go through the platform core, the recipient ID of the current data to be exchanged should be set to the ID of the second application core, and continue to execute step 102. Such a process ensures that the data can be correctly processed by the target core.
[0046] 102. The second application core in the ATO application core and the ATP application core determines whether the recipient ID is consistent with its own second application core ID.
[0047] It should be made clear in this step that when the first application core sends data, no matter whether the designated recipient ID is the platform core or the second application core, the second application core will actively check whether the recipient ID of the data to be interacted matches its own second application core ID.
[0048] If the check finds that the receiver ID is inconsistent with its own ID, the second application core will ignore the data without any processing, thereby avoiding unnecessary operations on non-target data. On the contrary, if the receiver ID is consistent with its own ID, it indicates that the data is specially prepared for the current second application core. At this time, the second application core will execute the subsequent data processing steps (i.e., step 103) to ensure the correct reception and processing of the data.
[0049] In addition, the timing at which the second application core actively checks whether the recipient ID of the data to be interacted matches its own ID is determined by the method adopted by the present invention. If the soft interrupt mechanism is not used and the time synchronization mechanism is not adopted, the second application core can check the messages in each message queue in the shared database in real time. This is done to determine whether the recipient ID of each message matches the ID of the second application core itself, including checking whether the recipient ID of the data to be interacted is consistent with its own second application core ID. This method ensures the accuracy and timeliness of data interaction.
[0050] On the contrary, if the time synchronization mechanism and the soft interrupt mechanism are adopted, the second application core can determine whether the recipient ID of the data to be interacted in the soft interrupt mechanism matches its own second application core ID after receiving the system clock message of the start of the current cycle and the interrupt notification. If it matches, the corresponding designated message queue is found in the shared database according to the designated message queue ID. Then, the data to be interacted corresponding to the soft data to be interacted ID is read in the designated message queue.
[0051] 103. If they are consistent, the second application core reads the data to be interacted from the designated message queue to complete the data interaction process.
[0052] In this step, if the soft interrupt mechanism and the time synchronization mechanism are not used, the second application core can directly read the data to be interacted when the data to be interacted with the receiver ID that is consistent with its own second application core ID is found; if the soft interrupt mechanism and the time synchronization mechanism are used, after the current cycle starts and it is determined that the receiver ID of the data to be interacted in the soft interrupt mechanism matches its own second application core ID, the corresponding designated message queue can be found in the shared database according to the designated message queue ID in the soft interrupt mechanism. Then, the data to be interacted corresponding to the soft data ID to be interacted can be read in the designated message queue.
[0053] It should be noted that the above-mentioned soft interrupt mechanism and time synchronization mechanism have different functions and do not conflict with each other. Therefore, in practical applications, according to the specific needs of ATO and ATP functions, you can choose to use the soft interrupt mechanism alone to achieve fast response, or use the time synchronization mechanism to ensure the periodicity and synchronization of data exchange. At the same time, according to the complexity of system design, these two mechanisms can be combined to make full use of their respective advantages and further improve the overall performance and stability of the system.
[0054] Among them, the message queue is a first-in-first-out data structure used to store and deliver messages. The message queue provides a way of asynchronous communication. The sender can put data into the queue, and the receiver can take data out of the queue at any time without waiting directly.
[0055] When the soft interrupt mechanism has data to send, the data identifier can be written into the soft interrupt, and then an interrupt notification can be triggered to notify the receiving core. The receiving core can read the corresponding data according to the data identifier in the soft interrupt. The soft interrupt mechanism can be a Mailbox mechanism.
[0056] Based on the above Figure 1It can be seen from the implementation method that the present invention provides a data interaction method between ATO and ATP, which is applied to an on-board system. The on-board system integrates the ATO application core running the ATO function and the ATP application core running the ATP function on the same board. This layout not only maintains the independence of the ATO and ATP functions, ensuring that the operation of both parties does not affect each other, but also builds a data interaction platform based on shared memory. In this platform, whether the ATO application core or the ATP application core (hereinafter collectively referred to as the "first application core") wants to transmit data to the other party, the data to be interacted containing the recipient ID will be stored in the designated message queue in the shared database. Next, the ATO application core and the recipient application core in the ATP application core (hereinafter collectively referred to as the "second application core") will determine whether the recipient ID is consistent with its own second application core ID. If consistent, the second application core can immediately read the data to be interacted in the designated message queue, thereby completing the data interaction process. Compared with the traditional data interaction mode that relies on the communication bus, the present invention uses the characteristics of shared memory to provide a more stable and efficient communication path. The use of shared memory is like directly storing and retrieving data in a database. Compared with downloading data from the network, it avoids data loss or delay caused by bus instability, and greatly enhances the reliability and real-time performance of communication. In summary, the present invention significantly improves the stability and efficiency of communication by encapsulating the ATO application core and the ATP application core on the same board and relying on shared memory to achieve data interaction, thereby ensuring the stable interaction of data between ATO and ATP, and thus enabling train control commands to be accurately generated and executed, thereby ensuring the safety of train operation.
[0057] Furthermore, as a Figure 1 The embodiment shown in the figure is refined and expanded. The embodiment of the present invention also provides another data interaction method between ATO and ATP, such as Figure 2 As shown, the specific steps are as follows:
[0058] 201. The first application core stores the data to be interacted with in a designated message queue of a shared database, and uses a soft interrupt mechanism to specify a recipient ID of the data to be interacted with, a designated message queue ID, and an interrupt notification.
[0059] In step 201, the data interaction process is preferably performed by combining the soft interrupt mechanism and the time synchronization mechanism. That is, the first application core stores the data to be interacted in the designated message queue of the shared database, and uses the soft interrupt mechanism to specify the recipient ID of the data to be interacted, the designated message queue ID and the interrupt notification.
[0060] 202. If the platform core in the vehicle system receives an interrupt notification, it detects whether the receiver ID specified in the soft interrupt mechanism is consistent with its own platform ID.
[0061] In this embodiment, the platform core is preferentially selected as the data interaction bridge between the ATO application core and the ATP application core. That is to say, the receiver ID mentioned in step 201 can be the ID of the platform core. However, since the present invention may involve multiple platform cores, each platform core has its own unique ID, which means that the platform core needs to check whether the receiver ID specified in the soft interrupt mechanism matches the ID of its own platform core after receiving the system clock message and interrupt notification of the current cycle. Only when the IDs are consistent, the platform core will make corresponding adjustments and processing, that is, execute step 203. If they are inconsistent, no processing is required.
[0062] When we talk about "platform core", we mean any available platform core in the system. Although ATO application core and ATP application core may be associated with multiple platform cores at the same time, in the shared database, the recipient ID of the data to be interacted can correspond to one of the multiple platform cores to ensure the accuracy and orderliness of data interaction.
[0063] 203. If they are consistent, read the data to be interacted from the specified message queue of the shared database according to the specified message queue ID in the soft interrupt mechanism.
[0064] 204. The platform verifies whether the data to be interacted with is correct.
[0065] 205. If it is incorrect, the platform core processes the interaction data to obtain target interaction data.
[0066] In steps 203 to 205, the platform core checks whether the recipient ID in the soft interrupt mechanism matches its own platform ID. If they match, the platform core retrieves the corresponding designated message queue in the shared database according to the designated message queue ID of the soft interrupt mechanism. Subsequently, the platform core reads the data to be interacted in the designated message queue according to the recipient ID.
[0067] In addition, in order to ensure that the data format received by the second application core is correct, the platform core should verify the data according to the pre-defined standard data format after obtaining the data to be interacted. If it is found that the format of the data to be interacted is incorrect, the platform core should take corresponding processing measures to generate the correct target interaction data. If the format is correct, no processing is required. At this time, the target interaction data in the following steps is still the data to be interacted.
[0068] 206. The platform core stores the target interactive data in a designated message queue of the shared database, and uses a soft interrupt mechanism to specify a recipient ID of the target interactive data, a designated message queue ID, and an interrupt notification.
[0069] 207. After receiving the interrupt notification, the second application core determines whether the receiver ID in the soft interrupt mechanism is consistent with its own second application core ID.
[0070] 208. If they are consistent, read the target interaction data from the specified message queue of the shared database according to the specified message queue ID in the soft interrupt mechanism.
[0071] In steps 206-208, the platform core obtains the designated message queue that stores the target interactive data in the shared database, and uses the soft interrupt mechanism to specify the recipient ID of the target interactive data, the designated message queue ID, and the interrupt notification. The recipient ID at this time should be the ID of the second application core. After receiving the interrupt notification, the second application core can determine whether the recipient ID in the soft interrupt mechanism is consistent with its own second application core ID. If consistent, the corresponding designated message queue can be retrieved in the shared database based on the designated message queue ID of the soft interrupt mechanism. Subsequently, the platform core reads the data to be interacted in the designated message queue according to the recipient ID.
[0072] Of course, in step 208, after the second application core reads the target interactive data, it can parse the target interactive data to obtain the messages and message identifiers in the target interactive data. Then, according to the message identifier, it is determined whether the messages in the target interactive data are divided into periodic messages and non-periodic messages. If they are divided into periodic messages and non-periodic messages, the message identifier corresponding to the non-periodic message can be written into the reply message. Then, the second application core stores the reply message in the designated message queue of the shared database, and uses the soft interrupt mechanism to specify the recipient ID of the reply message, the designated message queue ID, and the interrupt notification.
[0073] The receiver ID at this time is the platform core ID. After receiving the interrupt notification, the platform core can determine whether the receiver ID of the reply message in the soft interrupt mechanism is consistent with its own platform ID. If consistent, the platform core can determine the corresponding designated message queue in the shared database according to the designated message queue ID in the soft interrupt mechanism, and then read the reply message in the designated message queue according to the receiver ID.
[0074] After reading the reply message, the platform core can store the reply message in the specified message queue of the shared database, and use the soft interrupt mechanism to specify the recipient ID of the reply message, the specified message queue ID, and the interrupt notification. No verification is required at this time, because the message identifier does not have many data format restrictions compared to the message body. And the recipient ID at this time should be the ID of the first application core that exchanges data with the second application core.
[0075] Afterwards, if the first application core receives the interrupt notification, it determines whether the recipient ID of the reply message in the soft interrupt mechanism is consistent with its own first application core ID. If consistent, the first application core can determine the corresponding designated message queue in the shared database according to the designated message queue ID in the soft interrupt mechanism, and read the reply message in the designated message queue.
[0076] After reading, the first application core can determine whether the message identifier corresponding to the non-periodic message in the reply message is missing compared to the message identifier of the non-periodic message in the data to be exchanged that it has previously sent. If it is missing, it proves that there is a problem in the data exchange process. In the next clock cycle (that is, after receiving the next system clock message), the above interaction process can be re-executed for the non-periodic message corresponding to the missing message identifier.
[0077] For example, the ATP application core acts as the data sender in this cycle. In addition to the message corresponding to the cycle message identifier 0x01 in the interactive data, it also needs to send additional messages corresponding to the curve message identifier 0x03 and the slope message identifier 0x05. Before sending the message, the ATP application core will record 0x03 and 0x05.
[0078] For some reasons, the ATO application core, as the data receiver of this cycle, only received the messages corresponding to the cycle message identifier 0x01 and the curve message identifier 0x03, but did not receive the message corresponding to the slope message identifier 0x05.
[0079] Therefore, the ATO application core fills the message identifier 0x03 of the curve message into the message corresponding to its own periodic message identifier 0x02, and sends it to the ATP application core. After receiving the message corresponding to the periodic message identifier 0x02, the ATP application core compares the identifier 0x03 in the message with the 0x03 and 0x05 previously recorded by itself, and finds that the message corresponding to 0x05 is missing, indicating that the ATO application core has not received the message corresponding to the slope message identifier 0x05 sent by the ATP application core in the previous cycle. In this case, the ATP application core will resend the slope message 0x05 in this cycle.
[0080] Among them, in the above data interaction process, the designated message queue involved each time can be the same queue. Of course, if there are other situations, it can also be a different message queue. And the receiver ID of Da Ao involved each time must be different. For example, in the process of ATP application core-platform core, the receiver ID is the platform ID of the platform core. And in the process of platform core-ATO application core, the receiver ID is the ID of -ATO application core.
[0081] Furthermore, as a response to the above Figure 1 In order to realize the method shown in the figure, the embodiment of the present invention also provides a data interaction device between ATO and ATP, which is used to Figure 1 The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Figure 3 As shown, the device comprises:
[0082] The first storage unit 301 is used for the first application core of the ATO application core and the ATP application core to store the data to be interacted with in a designated message queue of a shared database, wherein the data to be interacted with has a recipient ID;
[0083] A judging unit 302, configured for the second application core in the ATO application core and the ATP application core to judge whether the recipient ID stored in the first storage unit 301 is consistent with its own second application core ID;
[0084] The reading unit 303 is used for, if the judgment of the judging unit 302 is consistent, the second application core reads the data to be interacted in the designated message queue to complete the data interaction process between the ATO and the ATP.
[0085] Furthermore, as a response to the above Figure 2 In order to realize the method shown in the figure, the embodiment of the present invention also provides another data interaction device between ATO and ATP, which is used for Figure 2 The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Figure 4 As shown, the device comprises:
[0086] The first storage unit 301 is used for the first application core of the ATO application core and the ATP application core to store the data to be interacted with in a designated message queue of a shared database, wherein the data to be interacted with has a recipient ID;
[0087] A judging unit 302, configured for the second application core in the ATO application core and the ATP application core to judge whether the recipient ID stored in the first storage unit 301 is consistent with its own second application core ID;
[0088] The reading unit 303 is used for, if the judgment of the judging unit 302 is consistent, the second application core reads the data to be interacted in the designated message queue to complete the data interaction process between the ATO and the ATP.
[0089] In an optional implementation manner, the first storage unit 301 is specifically used for:
[0090] The first application core stores the data to be interacted with in a designated message queue of a shared database, and uses a soft interrupt mechanism to specify a recipient ID of the data to be interacted with, a designated message queue ID, and an interrupt notification.
[0091] In an optional implementation, after the first application core in the ATO application core and the ATP application core in the first storage unit 301 stores the data to be interacted in a designated message queue of the shared database, the device further includes a verification unit 304, and the verification unit 304 includes:
[0092] The first judgment module 3041 is used to detect whether the receiver ID specified in the soft interrupt mechanism is consistent with its own platform ID if the platform core in the vehicle system receives the interrupt notification;
[0093] A first reading module 3042 is configured to read the to-be-interacted data from a designated message queue in a shared database according to a designated message queue ID in a soft interrupt mechanism if the first judging module 3041 makes a consistent judgment;
[0094] A verification module 3043, configured to verify whether the data to be interacted with is correct after the first reading module 3042 reads the data to be interacted with.
[0095] The processing module 3044 is used for, if the verification result of the verification module 3043 is incorrect, the platform checks the data to be interacted with and processes it to obtain target interaction data.
[0096] In an optional implementation, after the platform checks the data to be interacted with in the processing module 3044 and obtains the target interaction data, the device further includes a second storage unit 305, and the second storage unit 305 includes:
[0097] The first storage module 3051 is used for the platform core to store the target interactive data in a designated message queue of a shared database, and to specify the recipient ID of the target interactive data, the designated message queue ID and the interrupt notification by using a soft interrupt mechanism;
[0098] A second judgment module 3052 is used for the second application core to judge whether the recipient ID in the soft interrupt mechanism is consistent with its own second application core ID after receiving the interrupt notification triggered by the first storage module 3051;
[0099] The second reading module 3053 is used for, if the judgment result of the second judging module 3052 is consistent, the second application core reads the target interaction data from the specified message queue of the shared database according to the specified message queue ID in the soft interrupt mechanism.
[0100] In an optional implementation, after the second application core reads the target interaction data from the specified message queue of the shared database according to the specified message queue ID in the soft interrupt mechanism in the second reading module 3053, the device further includes a third storage unit 306, and the third storage unit 306 includes:
[0101] A parsing module 3061, configured for the second application core to parse the target interaction data to obtain messages and corresponding message identifiers in the target interaction data;
[0102] A message determination module 3062, configured to determine whether the messages in the target interaction data are divided into periodic messages and non-periodic messages according to the message identifiers obtained by parsing the parsing module 3061;
[0103] The message writing module 3063 is used to write the message identifier corresponding to the non-periodic message into the reply message if the message determination module 3062 determines that it is yes;
[0104] The second storage module 3064 is used for the second application core to store the reply message written by the message writing module 3063 into the specified message queue of the shared database, and use the soft interrupt mechanism to specify the recipient ID of the reply message, the specified message queue ID and the interrupt notification.
[0105] In an optional implementation, after the second application core in the second storage module 3064 stores the reply message in a designated message queue of the shared database, the device further includes a fourth storage unit 307, and the fourth storage unit 307 includes:
[0106] The third judgment module 3071 is used to judge whether the recipient ID of the reply message in the soft interrupt mechanism is consistent with its own platform ID if the platform core receives the interrupt notification;
[0107] A third reading module 3072 is configured to read the reply message from the designated message queue of the shared database according to the designated message queue ID in the soft interrupt mechanism if the determination result of the third determination module 3071 is consistent;
[0108] The third storage module 3073 is used for the platform core to store the reply message read by the third reading module 3072 into the specified message queue of the shared database, and use the soft interrupt mechanism to specify the recipient ID of the reply message, the specified message queue ID and the interrupt notification.
[0109] In an optional implementation, after the platform core in the third storage module 3073 stores the reply message in a designated message queue of the shared database, the device further includes a data retransmission unit 308, and the data retransmission unit 308 includes:
[0110] The fourth judgment module 3081 is used to judge whether the recipient ID of the reply message in the soft interrupt mechanism is consistent with the first application core ID of the first application core if the first application core receives the interrupt notification;
[0111] The fourth reading module 3082 is configured to read the reply message from the designated message queue of the shared database according to the designated message queue ID in the soft interrupt mechanism if the determination result of the fourth determining module 3081 is consistent;
[0112] A message comparison module 3083, configured for the first application core to determine whether the message identifier corresponding to the non-periodic message in the reply message read in the fourth reading module 3082 is missing compared to the message identifier of the non-periodic message in the to-be-interacted data;
[0113] The message resending module 3084 is used to re-execute the interaction process for the non-periodic message corresponding to the missing message identifier if the comparison result of the message comparison module 3083 is missing.
[0114] Furthermore, an embodiment of the present invention further provides a storage medium, wherein the storage medium is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the above Figure 1-2 The data interaction method between ATO and ATP described in.
[0115] Furthermore, an embodiment of the present invention further provides a processor, the processor is used to run a program, wherein the program executes the above Figure 1-2 The data interaction method between ATO and ATP described in.
[0116] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0117] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.
[0118] 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.
[0119] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0120] In addition, the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0121] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0122] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0123] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0125] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0126] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0127] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0128] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0129] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0130] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A data interaction method between ATO and ATP, characterized in that: The method is applied to an in-vehicle system, wherein the in-vehicle system includes an ATO application core and an ATP application core packaged on the same board, and the method includes: The first application core among the ATO application core and the ATP application core stores the data to be interacted with in a designated message queue of a shared database, wherein the data to be interacted with has a recipient ID; The second application core in the ATO application core and the ATP application core determines whether the recipient ID is consistent with its own second application core ID; If they are consistent, the second application core reads the data to be interacted in the designated message queue to complete the data interaction process between ATO and ATP.
2. The method according to claim 1, characterized in that: The first application core in the ATO application core and the ATP application core stores the data to be interacted with in a designated message queue of a shared database, including: The first application core stores the data to be interacted with in a designated message queue of a shared database, and uses a soft interrupt mechanism to specify a recipient ID of the data to be interacted with, a designated message queue ID, and an interrupt notification.
3. The method according to claim 2, characterized in that After the first application core among the ATO application core and the ATP application core stores the data to be interacted with in a designated message queue of a shared database, the method further includes: If the platform core in the vehicle system receives the interrupt notification, it detects whether the receiver ID specified in the soft interrupt mechanism is consistent with its own platform ID; If they are consistent, the to-be-interacted data is read from the designated message queue of the shared database according to the designated message queue ID in the soft interrupt mechanism; After reading the data to be interacted with, the platform verifies whether the data to be interacted with is correct; If it is incorrect, the platform checks and processes the data to be interacted with to obtain target interaction data.
4. The method according to claim 3, characterized in that: After the platform processes the data to be interacted with and obtains target interaction data, the method further includes: The platform core stores the target interactive data in a designated message queue of a shared database, and uses a soft interrupt mechanism to specify a recipient ID of the target interactive data, a designated message queue ID, and an interrupt notification; After receiving the interrupt notification, the second application core determines whether the receiver ID in the soft interrupt mechanism is consistent with its own second application core ID; If they are consistent, the second application core reads the target interaction data from the designated message queue of the shared database according to the designated message queue ID in the soft interrupt mechanism.
5. The method according to claim 4, characterized in that After the second application core reads the target interaction data from the specified message queue of the shared database according to the specified message queue ID in the soft interrupt mechanism, the method further includes: The second application core parses the target interaction data to obtain a message and a corresponding message identifier in the target interaction data; Determining whether the messages in the target interactive data are divided into periodic messages and non-periodic messages according to the message identifier; If yes, write the message identifier corresponding to the non-periodic message into the reply message; The second application core stores the reply message in a designated message queue of a shared database, and uses a soft interrupt mechanism to specify a recipient ID of the reply message, a designated message queue ID, and an interrupt notification.
6. The method according to claim 5, characterized in that After the second application core stores the reply message in a designated message queue of the shared database, the method further includes: If the platform core receives the interrupt notification, it determines whether the recipient ID of the reply message in the soft interrupt mechanism is consistent with its own platform ID; If they are consistent, the platform core reads the reply message from the designated message queue of the shared database according to the designated message queue ID in the soft interrupt mechanism; The platform core stores the reply message in a designated message queue of a shared database, and uses a soft interrupt mechanism to specify a recipient ID of the reply message, a designated message queue ID, and an interrupt notification.
7. The method according to claim 6, characterized in that After the platform core stores the reply message in a designated message queue of the shared database, the method further includes: If the first application core receives the interrupt notification, it determines whether the recipient ID of the reply message in the soft interrupt mechanism is consistent with its own first application core ID; If they are consistent, the first application core reads the reply message from the designated message queue of the shared database according to the designated message queue ID in the soft interrupt mechanism; The first application core determines whether the message identifier corresponding to the aperiodic message in the reply message is missing compared to the message identifier of the aperiodic message in the to-be-interacted data; If it is missing, the interaction process is re-executed for the non-periodic message corresponding to the missing message identifier.
8. A data interaction device between ATO and ATP, characterized in that: The device is applied to a vehicle-mounted system, wherein the vehicle-mounted system includes an ATO application core and an ATP application core packaged on the same board, and the device includes: A first storage unit, used for the first application core of the ATO application core and the ATP application core to store the data to be interacted with in a designated message queue of a shared database, wherein the data to be interacted with has a recipient ID; A judging unit, used for the second application core in the ATO application core and the ATP application core to judge whether the recipient ID stored in the first storage unit is consistent with its own second application core ID; The reading unit is used for, if the judgment of the judging unit is consistent, the second application core reads the data to be interacted in the designated message queue to complete the data interaction process between the ATO and the ATP.
9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the data interaction method between the ATO and the ATP as described in any one of claims 1 to 7.
10. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the data interaction method between the ATO and the ATP as described in any one of claims 1 to 7.
