A method and system for updating a routing table
Through the inter-core communication IPCF method of multi-core heterogeneous processors, self-updating of the gateway controller routing table is achieved, and the applicability problems between different stages and between vehicles are solved, and multiple communication methods are supported, which achieves fully automatic and correct data transmission and wide applicability.
Patent Information
- Application Number
- CN202211520493.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-11-30
AI Technical Summary
The prior art cannot realize the general update of the routing table of the gateway controller at different stages and between different models, resulting in the inability to apply when the communication data is changed during the vehicle control development and experiment, and the routing table update scope of the multi-core processor is limited to traditional CAN communication.
It adopts a multi-core heterogeneous processor, uses the IPCF method of inter-core communication between the Cortex-M core and the Cortex-A core, and realizes the self-update function of the routing table through master-slave question-and-answer Q&A interaction, supports CAN, ETH, T-BOX and cloud remote updates, and is suitable for a variety of external communication methods.
It realizes the applicability of the gateway controller to update the routing table between different stages and models, supports a variety of mainstream automobile buses, has a wider scope of application, adapts to the new generation of electronic and electrical architectures, and realizes fully automatic and correct data transmission.
Smart Images

Figure CN115776462B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gateway controllers, and particularly to a method and system for updating a routing table. Background Art
[0002] The gateway controller is a core component in the vehicle's electronic and electrical architecture. As the data interaction hub of the vehicle network, it can route network data such as CAN, LIN, and MOST in different networks. In addition, due to the existence of an independent gateway controller, the design of the vehicle's electronic and electrical architecture can be more optimized. Vehicle manufacturers can use it to improve the scalability of the vehicle's topology structure, the safety of the vehicle, and the confidentiality of the vehicle network data. Therefore, the gateway controller has increasingly become an indispensable and important component in the vehicle's electronic and electrical architecture. However, during the vehicle control development and experimental process, the communication data between in-vehicle electronic control units at different stages will change with the different network segments, and different vehicle models require different gateway controllers, making it impossible to achieve the generality of gateway controllers between different vehicle models. This makes it necessary to update the routing table of the gateway controller so that the gateway controller can be used in scenarios of different stages and different vehicle models.
[0003] To improve the processing speed of the processor, multi-core processors have emerged. Multi-core processors are further divided into homogeneous multi-core processors and heterogeneous multi-core processors according to different architectures. The CPU of a homogeneous multi-core processor only has a CPU operation module, while a heterogeneous multi-core processor integrates the CPU and other modules to work together.
[0004] The prior art CN201611197082.9 discloses a method for updating data, but it mainly completes the update of the routing table based on traditional CAN communication, can only be updated online through a diagnostic instrument, and is only applicable to controllers equipped with a real-time operating system, with a relatively limited scope of use. Summary of the Invention
[0005] In order to solve the above technical problems, the present invention aims to provide a method and system for updating a routing table. This method realizes the self-update function of the routing table based on a multi-core heterogeneous processor, enriching the means for updating the routing table in the gateway controller.
[0006] The present invention adopts the following technical solutions:
[0007] A routing table update system, which adopts a multi-core heterogeneous processor including a Cortex-M core and a Cortex-A core. The Cortex-M core is equipped with an Autosar operating system, and the Cortex-A core is equipped with a Linux operating system. Information interaction between the Cortex-M core and the Cortex-A core is carried out through the inter-core communication IPCF method. The inter-core communication IPCF mainly includes service identification, baud rate, channel enable, number of routing relationships, and routing relationship information, etc. The service identification is mainly used to identify whether the packet is used for routing table update and the counting of multi-packet messages; the baud rate is mainly used to configure the baud rate of each channel; the channel enable is mainly used to turn on and off each channel; the number and information of routing relationships are used to describe the detailed information of the routing table.
[0008] Further, the Cortex-M core conducts CAN communication interaction, and the Cortex-A core conducts ETH communication or T-BOX communication interaction. When conducting T-BOX communication, the T-BOX first forwards the routing table information through ETH and then transmits it to the Cortex-A core. The information interaction is carried out in the master-slave question-and-answer interaction mode.
[0009] Further, the master-slave question-and-answer interaction includes request for update, data transmission, data verification, data reception, etc. After the interaction process, correct information transmission can be completed.
[0010] The present invention also provides another technical solution:
[0011] A routing table update method is carried out in the above-mentioned routing table update system. The routing table is stored in the Cortex-M core. The update method includes the following steps:
[0012] S1: When the system is started, start the Cortex-M core and the Cortex-A core;
[0013] S2: The Cortex-M core judges whether the routing table is updated; if there is an update, read the update information and enter the next step; if there is no update, the system directly starts to run;
[0014] S3: Judge the update method of external devices, receive update data packets and judge the data;
[0015] S4: After the judgment is completed, update the routing table and reset the system.
[0016] Preferably, in S3, the data judgment adopts master-slave question-and-answer for data information interaction, which specifically includes the following steps:
[0017] S31: The external device sends a routing table update request. The system determines whether an update data packet is received. If an update data packet is received, it replies with an affirmative answer and enters S32. If no update data packet is received, it replies with a negative answer and the system stops running;
[0018] S32: After receiving the update data packet, it determines whether the data format is incorrect or timed out. If it is correct and not timed out, it replies with a negative response and enters S33. If it is incorrect or timed out, it replies with an affirmative response and re-executes receiving the update data packet;
[0019] S33: When the data format is correct and not timed out, the system determines whether the data packet is completely received. If it is completely received, it replies with an affirmative response and enters S34. If the reception is not complete, it replies with a negative response and re-executes receiving the update data packet;
[0020] S34: After the data is completely received, the system verifies the data and determines whether the data verification passes. If the data verification passes, it replies with an affirmative response and enters S4. If the data verification fails, it replies with a negative response and re-determines whether an updated data packet is received.
[0021] Further, S3 is executed in the Cortex-M core or the Cortex-A core.
[0022] When executed in the Cortex-M core, the update method of the external device in S3 is CAN communication, and the update data packet is a CAN update data packet;
[0023] When executed in the Cortex-A core, the update method of the external device in S3 is ETH communication or T-BOX communication, the update data packet is an ETH or T-BOX update data packet, and the update of the routing table needs to be transmitted from the Cortex-A core to the Cortex-M core through the inter-core communication IPCF.
[0024] Further, when executed in the Cortex-A core, S4 further includes transmitting the updated data packet information to the Cortex-M core through the inter-core communication IPCF, which specifically includes the following steps:
[0025] S41: After the data verification in the Cortex-A core is determined to pass, the Cortex-A core sends the received routing table update data information to the inter-core communication IPCF. The system determines whether the data in the sending process is correct. If the data is correct, it replies with an affirmative response and enters S42. If the data is abnormal, it replies with a negative response and exits the sending process and returns to S31 to re-determine whether an update data packet of ETH communication or T-BOX communication is received;
[0026] S42: After the sent data is correct, the system determines whether the data sending is completed. If the data sending is completed, a positive response is returned and it enters S43. If the data sending is not completed, a negative response is returned and the data sending continues;
[0027] S43: After the data sending is completed, the Cortex-M core determines whether the Cortex-A core has started up completely. If it has started up completely, a positive response is returned and it starts to receive the data packets of the inter-core communication IPCF and enters S44. If the startup is not completed, a negative response is returned and no data packets of the inter-core communication IPCF are received;
[0028] S44: After the Cortex-M core starts to receive the data packets of the inter-core communication IPCF, it determines whether the data format is incorrect or times out. If it is correct and does not time out, a negative response is returned and it enters S45. If it is incorrect or times out, a positive response is returned and the process of receiving the data packets of the inter-core communication IPCF is executed again;
[0029] S45: When the data format is correct and does not time out, it determines whether the data of the inter-core communication IPCF has been received completely. If it has been received completely, a positive response is returned and it enters S46. If the reception is not completed, a negative response is returned and the process of receiving the data packets of the inter-core communication IPCF is executed again;
[0030] S46: After the data reception is completed, the data is verified and it is determined whether the data verification passes. If the data verification passes, a positive response is returned and the routing table update is completed to reset the system. If the data verification does not pass, a negative response is returned and it is determined again whether the data packets of the inter-core communication IPCF have been received;
[0031] It can be seen that when the update method of the external update device is ETH communication or T-BOX communication, it is executed in the Cortex-A core. However, since the routing table is stored in the Cortex-M core, it is necessary to transmit the updated data packet information to the Cortex-M core by means of the inter-core communication IPCF. Therefore, this method needs to execute the master-slave question-and-answer interaction related to request update, data transmission, data verification, data reception, etc. once in each of the Cortex-A core and the Cortex-M core to transmit the updated data information.
[0032] The present invention has at least the following beneficial effects:
[0033] 1. A routing table update method and system provided by the present invention are executed in a heterogeneous multi-core processor, enabling it to be applicable to various external update methods such as CAN communication, ETH communication, and T-BOX communication, enabling the gateway controller to be used in scenarios of different stages and different vehicle models, being applicable to a variety of automotive mainstream buses, having a wider application range, and being able to match the application of the new generation of electronic and electrical architectures;
[0034] 2. A method and system for updating a routing table provided by the present invention transmits the updated packet information within the system through an interactive manner of master-slave interrogation and answer, realizing fully automatic and correct data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is the overall flowchart of a method for updating a routing table provided by the present invention;
[0036] Figure 2 It is a schematic diagram of the information transmission direction of a routing table update system provided by the present invention;
[0037] Figure 3 It is the specific flowchart of a method for updating a routing table provided by the present invention;
[0038] Figure 4 It is the flowchart of a method for updating the packet information transmitted from the Cortex-A core to the Cortex-M core provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0040] Embodiment 1
[0041] Combined with Figure 2 As shown, the present invention discloses a routing table update system. The update system adopts a heterogeneous multi-core processor, including a Cortex-M core and a Cortex-A core. The Cortex-M core is equipped with an Autosar operating system, and the Cortex-A core is equipped with a Linux operating system. Information interaction between the Cortex-M core and the Cortex-A core is carried out through the inter-core communication IPCF method. The inter-core communication IPCF mainly includes service identification, baud rate, channel enable, number of routing relationships, and routing relationship information, etc. The service identification is mainly used to identify whether the packet is used for routing table update and the counting of multi-packet messages; the baud rate is mainly used to configure the baud rate of each channel; the channel enable is mainly used to turn on and off each channel; the number and information of routing relationships are used to describe the detailed information of the routing table.
[0042] Among them, the Cortex-M core conducts CAN communication interactions, and the Cortex-A core conducts ETH communication or T-BOX communication interactions. When conducting T-BOX communication, the T-BOX first forwards the routing table information through ETH and then transmits it to the Cortex-A core. In the above process, the information interaction is carried out in the master-slave question-and-answer interaction mode for information transmission. The master-slave question-and-answer interaction includes request update, data transmission, data verification, data reception, etc. After the interaction process, correct information transmission can be completed.
[0043] Embodiment 2
[0044] Combined with Figure 1 、 Figure 2 and Figure 3 As shown, the present invention discloses a method for updating a routing table. The routing table is stored in the Cortex-M core, and the external updating device uses the CAN communication method. The specific updating steps are as follows:
[0045] S1: When the system is started, the Cortex-M core and the Cortex-A core are started;
[0046] S2: The Cortex-M core judges whether there is an update in the routing table; if there is an update, read the update information and enter the next step; if there is no update, the system directly starts to run;
[0047] S31: The external device CAN communication sends a routing table update request. The system judges whether a CAN update data packet is received. If a CAN update data packet is received, a positive reply is given and S32 is entered. If a CAN update data packet is not received, a negative reply is given and the system stops running;
[0048] S32: After receiving the CAN communication update data packet, judge whether the data format is incorrect or timed out. If it is correct and not timed out, a negative reply is given and S33 is entered. If it is incorrect or timed out, a positive reply is given and the reception of the CAN communication update data packet is re-executed;
[0049] S33: When the data format is correct and not timed out, the system judges whether the data packet has been received completely. If it has been received completely, a positive reply is given and S34 is entered. If the reception is not completed, a negative reply is given and the reception of the CAN communication update data packet is re-executed;
[0050] S34: After the data is received completely, the system verifies the data and judges whether the data verification passes. If the data verification passes, a positive reply is given and S4 is entered. If the data verification does not pass, a negative reply is given and it is re-judged whether an updated data packet is received.
[0051] S4: After the judgment, the routing table is updated and the system is reset.
[0052] Embodiment III
[0053] Combined Figures 1-4 As shown in the figure, the present invention discloses a method for updating a routing table. The routing table is stored in the Cortex-M core. The difference from Embodiment II is that the update method of the external update device is ETH communication. The specific update steps are as follows:
[0054] S1: When the system is started, start the Cortex-M core and the Cortex-A core;
[0055] S2: The Cortex-M core determines whether there is an update to the routing table; if there is an update, read the update information and proceed to the next step; if there is no update, the system directly starts running;
[0056] S31: Performed in the Cortex-A core. The external device sends a routing table update request. The system determines whether an ETH update data packet is received. If an ETH update data packet is received, a positive response is returned and S32 is entered. If no update data packet is received, a negative response is returned and the system stops running;
[0057] S32: After receiving the ETH update data packet, determine whether the data format is incorrect or timed out. If it is correct and not timed out, a negative response is returned and S33 is entered. If it is incorrect or timed out, a positive response is returned and the process of receiving the ETH update data packet is restarted;
[0058] S33: When the data format is correct and not timed out, the system determines whether the data packet has been completely received. If it has been completely received, a positive response is returned and S34 is entered. If the reception is not complete, a negative response is returned and the process of receiving the ETH update data packet is restarted;
[0059] S34: After the data is completely received, the system verifies the data and determines whether the data verification passes. If the data verification passes, a positive response is returned and S4 is entered. If the data verification fails, a negative response is returned and it is re-determined whether an ETH update data packet has been received.
[0060] ]>S41: After the data verification in the Cortex-A core is passed, the Cortex-A core sends the received routing table update data information to the inter-core communication IPCF, and determines whether the data is correct during the sending process. If the data is correct, a positive response is returned and S42 is entered. If the data is abnormal, a negative response is returned and the sending process is exited and returned to S31 to re-determine whether an ETH communication update data packet has been received;
[0061] S42: After the sent data is correct, determine whether the data sending is completed. If the data sending is completed, reply with a positive acknowledgment and proceed to S43. If the data sending is not completed, reply with a negative acknowledgment and continue data sending;
[0062] S43: After the data sending is completed, the Cortex-M core determines whether the Cortex-A core has completed startup. If the startup is completed, reply with a positive answer and start receiving packets of the inter-core communication IPCF and proceed to S44. If the startup is not completed, reply with a negative acknowledgment and do not receive any packets of the inter-core communication IPCF;
[0063] S44: After the Cortex-M starts receiving packets of the inter-core communication IPCF, determine whether the data format is incorrect or a timeout occurs. If it is correct and there is no timeout, reply with a negative acknowledgment and proceed to S45. If it is incorrect or a timeout occurs, reply with a positive acknowledgment and re-execute receiving packets of the inter-core communication IPCF;
[0064] S45: When the data format is correct and there is no timeout, determine whether the data of the inter-core communication IPCF has been received completely. If it has been received completely, reply with a positive acknowledgment and proceed to S46. If it has not been received completely, reply with a negative acknowledgment and re-execute receiving packets of the inter-core communication IPCF;
[0065] S46: After the data is received completely, perform data verification and determine whether the data verification passes. If the data verification passes, reply with a positive acknowledgment and complete the routing table update to reset the system. If the data verification fails, reply with a negative acknowledgment and re-determine whether packets of the inter-core communication IPCF have been received.
[0066] In this embodiment, since the external update device is for ETH communication, it starts through the Cortex-A core. And since the routing table is stored inside the Cortex-M core, the updated packet information needs to be transmitted from the Cortex-A core to the Cortex-M core. Therefore, the inter-core communication IPCF is needed. Thus, the entire update process is as follows: First, the Cortex-A core executes the reception and verification of the updated packet information, etc. Then, the Cortex-A core sends the updated packet information to the inter-core communication IPCF. The inter-core communication IPCF transmits the updated packet information to the Cortex-M core to complete the update of the routing table and reset the system.
[0067] Embodiment Four
[0068] The present invention discloses a method for updating a routing table. The routing table is stored in the Cortex-M core. If the update method of the external update device is cloud remote update, then 4G / 5G communication interaction is performed between the cloud and the gateway controller to transmit the routing table update information into the Cortex-A core system. The subsequent specific update steps are as described in Embodiment Three.
[0069] Embodiment Five
[0070] The present invention discloses a method for updating a routing table. The routing table is stored in the Cortex-M core, and the update method of the external update device is remote update from the cloud. However, the gateway controller does not have 4G / 5G communication function. Then the cloud interacts with the T-BOX, and the T-BOX transmits the routing table update information to the Cortex-A core system through ETH. Subsequently, the specific update steps are as described in Embodiment Three.
[0071] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present invention.
Claims
1. A method for updating a routing table, characterized in that, The update method is carried out in an update system based on a routing table. The update system uses a multi-core heterogeneous processor, including a Cortex-M core and a Cortex-A core. The Cortex-M core is equipped with an Autosar operating system, and the Cortex-A core is equipped with a Linux operating system. The routing table is stored in the Cortex-M core; Information interaction between the Cortex-M core and the Cortex-A core is carried out through the inter-core communication IPCF method. The Cortex-M core conducts CAN communication interaction, and the Cortex-A core conducts ETH communication or T-BOX communication interaction; The update method includes the following steps: S1: When the system is started, the Cortex-M core and the Cortex-A core are started; S2: The Cortex-M core judges whether the routing table is updated; if there is an update, read the update information and proceed to the next step; if there is no update, the system directly starts to run; S3: Judge the update method of the external device, receive the update data packet and judge the data: When the update method of the external device is CAN communication, the update data packet is a CAN update data packet and is executed in the Cortex-M core; When the update method of the external device is ETH communication or T-BOX communication, the update data packet is an ETH or T-BOX update data packet and is executed in the Cortex-A core; S4: After the judgment is completed, update the routing table and reset the system.
2. The method for updating a routing table according to claim 1, characterized in that The interaction is carried out in a master-slave question-and-answer interaction method for information transmission.
3. The method for updating a routing table according to claim 2, wherein The master-slave question-and-answer interaction includes request for update, data transmission, data verification, and data reception.
4. The method for updating a routing table according to claim 1, wherein The specific content of S3 includes: S31: The external device sends a routing table update request. The system judges whether an update data packet is received. If an update data packet is received, a positive reply is sent and S32 is entered. If no update data packet is received, a negative reply is sent and the system stops running; S32: After receiving the update data packet, judge whether the data format is incorrect or timed out. If it is correct and not timed out, send a negative response and enter S33. If it is incorrect or timed out, send a positive response and re-execute receiving the update data packet; S33: When the data format is correct and not timed out, the system judges whether the data packet has been completely received. If it has been completely received, send a positive response and enter S34. If the reception is not complete, send a negative response and re-execute receiving the update data packet; S34: After the data reception is completed, the system verifies the data and judges whether the data verification passes. If the data verification passes, send a positive response and enter S4. If the data verification fails, send a negative response and re-judge whether an updated data packet has been received.
5. The method for updating a routing table according to claim 4, wherein When the update method of the external device is ETH communication or T-BOX communication, the update of the routing table needs to be transmitted from the Cortex-A core to the Cortex-M core through the inter-core communication IPCF.
6. The method for updating a routing table according to claim 5, wherein The specific content of S4 also includes: S41: After the data verification in the Cortex-A core passes, the Cortex-A core sends the received routing table update data information to the inter-core communication IPCF. The system determines whether the data is correct during the sending process. If the data is correct, it replies with a positive response and enters S42. If the data is abnormal, it replies with a negative response and exits the sending process back to S31 to re-determine whether the ETH communication or T-BOX communication update data packet is received; S42: After the data sent is correct, the system determines whether the data sending is complete. If the data sending is complete, the system replies with a positive response and enters S43. If the data sending is not complete, the system replies with a negative response and continues to send data. S43: After the data transmission is completed, the Cortex-M core determines whether the Cortex-A core has completed startup. If the startup is completed, the Cortex-M core replies with an affirmative answer and starts receiving data packets of the inter-core communication IPCF and enters S44. If the startup is not completed, the Cortex-M core replies with a negative answer and does not receive any data packets of the inter-core communication IPCF. S44: After the Cortex-M core starts receiving the data packet of the inter-core communication IPCF, it determines whether the data format is incorrect or timed out. If it is correct and within the timeout, it replies with a negative response and enters S45. If it is incorrect or timed out, it replies with a positive response and re-executes the reception of the inter-core communication IPCF data packet; S45: If the data format is correct and the timeout is not reached, determine whether the data of the inter-core communication IPCF is received. If the data is received, reply with a positive response and proceed to S46. If the data is received, reply with a negative response and re-execute the reception of the data packet of the inter-core communication IPCF. S46: After the data is received, the data is verified and whether the data verification is passed is determined. If the data verification is passed, a positive response is returned and the routing table update and reset system are completed. If the data verification is not passed, a negative response is returned and it is re-determined whether the data packet of the inter-core communication IPCF is received.
Citation Information
Patent Citations
A data update method and apparatus
CN106444568B
Vehicle electric control system and vehicle
CN216434735U