Routing table generation method and device, equipment and medium

By verifying and establishing the routing table between the controller's local area network and the local Internet network, the communication reliability problem of different bus networks is solved, intelligent routing table generation is realized, and communication fluency and reliability are improved.

CN120416129APending Publication Date: 2025-08-01VOYAH AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510718200.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The prior art is difficult to automatically generate a routing table between the controller's local area network and the local Internet network, which makes it difficult to ensure the reliability of communications on different bus networks.

Method used

By verifying the accuracy of each information in the controller LAN matrix table based on preset rules, a conversion routing table between the controller LAN protocol and the local Internet protocol is established, including verifying the controller LAN message name, identifier, gateway node information, etc., to ensure information consistency.

Benefits of technology

It realizes the smoothness and reliability of cross-network communication, improves the accuracy and intelligence of routing table generation, and facilitates gateway nodes to make routing strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416129A_ABST
    Figure CN120416129A_ABST
Patent Text Reader

Abstract

The invention provides a routing table generation method and device, equipment and a medium, and relates to the technical field of communication. The method comprises the following steps: verifying the accuracy of each piece of information in a controller area network matrix table based on a preset rule to obtain a verification result; the controller local area network matrix table comprises communication matrix node information, the communication matrix node information comprises a controller local area network message name and a signal description of a communication matrix node, and the suffix of the controller local area network message name is a local internet message identifier needing to be converted; the signal description comprises a local internet network segment to which the local internet network message identifier belongs, and the local internet network segment is contained in the name of the target local internet network matrix file; and if the verification result is successful verification, establishing a target routing table based on the controller area network matrix table and the target local internet matrix file. According to the routing table generation method and device, the equipment and the medium provided by the invention, the fluency of network communication of different buses can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a method, apparatus, device, and medium for generating a routing table. Background Art

[0002] The routing tables of Controller Area Network (CAN) and Local Interconnect Network (LIN) play a crucial role in in-vehicle networks. The CAN bus, as the backbone network of automotive electronic systems, features high reliability (transmission rate of 1 Mbps) and real-time performance, while the LIN bus, as a low-cost auxiliary bus (up to 20 kbps), is mainly used to connect non-critical low-speed devices such as windows and seats.

[0003] Currently, it is difficult to automatically generate the routing table for the conversion between CAN and LIN, and it is difficult to ensure the reliability of communication between different bus networks. Summary of the Invention

[0004] This application provides a method, apparatus, device, and medium for generating a routing table to solve the defect in the prior art that it is difficult to ensure the reliability of communication between different bus networks and to ensure the smoothness of communication between different bus networks.

[0005] In a first aspect, this application provides a method for generating a routing table, including:

[0006] Verifying the accuracy of each piece of information in the CAN matrix table based on a preset rule to obtain a verification result; the CAN matrix table includes communication matrix node information, and the communication matrix node information includes the CAN message name and signal description of the communication matrix node. The suffix of the CAN message name is the LIN message identifier to be converted, and the signal description includes the LIN network segment to which the LIN message identifier belongs. The LIN network segment is included in the name of the target LIN matrix file;

[0007] If the verification result is successful, based on the CAN matrix table and the target LIN matrix file, establish a target routing table for the conversion between the CAN protocol and the LIN protocol.

[0008] Optionally, the communication matrix node information further includes the CAN message identifier of the communication matrix node, and the CAN matrix table further includes the gateway node information corresponding to the CAN message identifier and the network segment information to which the communication matrix node belongs.

[0009] Optionally, verifying the accuracy of each piece of information in the Controller Area Network matrix table according to a preset rule to obtain a verification result, including:

[0010] Verifying whether the suffix of the Controller Area Network message name is within the identifier range of the local interconnection network protocol;

[0011] Verifying whether the transceiver relationship corresponding to the Controller Area Network message identifier involves the target gateway node; the target gateway node is the gateway node in the gateway node information;

[0012] Verifying whether the local interconnection network message identifier exists in the target local interconnection network matrix file;

[0013] Verifying whether the transceiver relationships of the target gateway node are consistent;

[0014] If the suffix of the Controller Area Network message name is within the identifier range of the local interconnection network, the transceiver relationship corresponding to the Controller Area Network message identifier involves the target gateway node, the local interconnection network message identifier exists in the target local interconnection network matrix file, and the transceiver relationships of the target gateway node are consistent, the verification result is successful verification.

[0015] Optionally, the communication matrix node information further includes the Controller Area Network message length and the Controller Area Network message period;

[0016] If the transceiver relationship of the target gateway node is sending, establishing a target routing table for the conversion between the Controller Area Network protocol and the local interconnection network protocol based on the Controller Area Network matrix table and the target local interconnection network matrix file, including:

[0017] Determining the target network segment to which the target gateway node belongs based on the network segment information to which the communication matrix node belongs;

[0018] Taking the Controller Area Network message identifier, the Controller Area Network message length, the Controller Area Network message period, the target network segment, and the receiving node of the target network segment as the target network segment information of the target routing table;

[0019] Obtaining the local interconnection network message length and the local interconnection network message period corresponding to the local interconnection network message identifier from the target local interconnection network matrix file;

[0020] Taking the local interconnection network message identifier, the local interconnection network message length, the local interconnection network message period, the local interconnection network segment, and the sending node of the local interconnection network segment as the source network segment information of the target routing table.

[0021] Optionally, the communication matrix node information further includes the Controller Area Network (CAN) message length and the CAN message period;

[0022] If the transceiver relationship of the target gateway node is reception, establishing a target routing table for the conversion between the CAN protocol and the local interconnect network protocol based on the CAN matrix table and the target local interconnect network matrix file includes:

[0023] Determine the target network segment to which the target gateway node belongs based on the network segment information to which the communication matrix node belongs;

[0024] Use the CAN message identifier, the CAN message length, the CAN message period, the target network segment, and the sending node of the target network segment as the source network segment information of the target routing table;

[0025] Obtain the local interconnect network message length and the local interconnect network message period corresponding to the local interconnect network message identifier from the target local interconnect network matrix file;

[0026] Use the local interconnect network message identifier, the local interconnect network message length, the local interconnect network message period, the local interconnect network segment, and the receiving node of the local interconnect network segment as the target network segment information of the target routing table.

[0027] Optionally, the routing table generation method further includes:

[0028] If the verification result is verification failure, re - establish the CAN matrix table;

[0029] Based on the re - established CAN matrix table, re - establish the target routing table.

[0030] Optionally, the routing table generation method further includes:

[0031] Verify whether the CAN message length in the target routing table is consistent with the local interconnect network message length to obtain a first consistency verification result;

[0032] Verify whether the CAN message period in the target routing table is consistent with the local interconnect network message period to obtain a second consistency verification result;

[0033] If the first consistency verification result and / or the second consistency verification result is verification inconsistent, re - establish the target routing table.

[0034] In a second aspect, the present application further provides a routing table generation device, including:

[0035] A verification module is configured to verify the accuracy of each piece of information in a Controller Area Network (CAN) matrix table based on a preset rule, and obtain a verification result. The CAN matrix table includes communication matrix node information, and the communication matrix node information includes the CAN message name and signal description of a communication matrix node. The suffix of the CAN message name is a local interconnect network (LIN) message identifier to be converted. The signal description includes the LIN network segment to which the LIN message identifier belongs, and the LIN network segment is included in the name of a target LIN matrix file.

[0036] A construction module is configured to, if the verification result is successful verification, establish a target routing table for the conversion between the CAN protocol and the LIN protocol based on the CAN matrix table and the target LIN matrix file.

[0037] In a third aspect, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method described in the first aspect is implemented.

[0038] In a fourth aspect, the present application further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect is implemented.

[0039] In a fifth aspect, the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the method described in the first aspect is implemented.

[0040] The routing table generation method, apparatus, device, and medium provided by the present application can intelligently generate a target routing table by establishing a CAN matrix table related to a LIN matrix file, and based on the CAN matrix table and the target LIN matrix file when verifying that the information in the CAN matrix table is accurate, so as to facilitate the gateway node to make routing strategies, and improve the fluency and reliability of cross-network communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1It is a schematic flowchart of the routing table generation method provided by an embodiment of the present application;

[0043] Figure 2 It is a schematic structural diagram of the routing table generation device provided by an embodiment of the present application;

[0044] Figure 3 It is a schematic structural diagram of the electronic device provided by an embodiment of the present application. Detailed implementation manners

[0045] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the accompanying drawings in the present application. Apparently, the described embodiments are some, rather than all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without making creative efforts shall fall within the protection scope of the present application.

[0046] An embodiment of the present application provides a routing table generation method, and the execution subject thereof may be an electronic device. For example, it may be a controller. The following takes the execution subject of this method being a controller as an example for description. Figure 1 It is a schematic flowchart of the routing table generation method provided by an embodiment of the present application. Refer to Figure 1 , this method may include:

[0047] Step 110: Verify the accuracy of each piece of information in the controller area network matrix table based on a preset rule to obtain a verification result; the controller area network matrix table includes communication matrix node (English: Matrix node) information, and the communication matrix node information includes the controller area network message name and signal description of the communication matrix node. The suffix of the controller area network message name is the local interconnect network message identifier to be converted, and the signal description includes the local interconnect network segment to which the local interconnect network message identifier belongs. The local interconnect network segment is included in the name of the target local interconnect network matrix file;

[0048] Step 120: If the verification result is successful verification, establish a target routing table for the conversion between the controller area network protocol and the local interconnect network protocol based on the controller area network matrix table and the target local interconnect network matrix file.

[0049] In step 110, the controller may establish a vehicle model controller area network matrix table, which may include communication matrix node information. The communication matrix node information may include the controller area network message name and signal description of the communication matrix node. The purpose of creating the controller area network matrix master table is to better maintain the sending and receiving relationships of messages and signals between each network segment and each node of the vehicle model. In particular, the suffix of the controller area network message name is the local interconnect network message identifier to be converted, and the local interconnect network message identifier is determined based on the predefined mapping relationship between the controller area network and the local interconnect network identifiers. The signal description may include the local interconnect network segment to which the local interconnect network message identifier belongs, and the local interconnect network segment is included in the name of the target local interconnect network matrix file, so as to associate the mutually convertible controller area network and local interconnect network protocols, and then extract the message controller area network and local interconnect network links. It should be noted that if the controller area network message needs to be routed to multiple local interconnect networks, the corresponding local interconnect network segment names are added to the signal description column of the message row, separated by " / ".

[0050] The controller may verify the accuracy of each piece of information in the controller area network matrix table based on a preset rule to obtain a verification result. Specifically, the accuracy of the controller area network matrix table may be judged by verifying the correspondence between the local interconnect network messages and the controller area network messages involved in the controller area network matrix table.

[0051] In step 120, if the accuracy verification of each piece of information in the controller area network matrix table is successful, the controller may establish a target routing table for the conversion between the controller area network protocol and the local interconnect network protocol based on the controller area network matrix table and the target local interconnect network matrix file. Specifically, according to the conversion requirement (controller area network to local interconnect network or local interconnect network to controller area network), the source network segment information and the target network segment information may be respectively extracted from the controller area network matrix table and the target local interconnect network matrix file to form a target routing table.

[0052] The routing table generation method provided by the embodiments of the present application can intelligently generate a target routing table by establishing a controller area network matrix table related to the local interconnect network matrix file, and based on the controller area network matrix table and the target local interconnect network matrix file when verifying the accuracy of each piece of information in the controller area network matrix table, which is convenient for the gateway node to make routing strategies and improves the fluency and reliability of cross-network communication.

[0053] In some embodiments, the communication matrix node information further includes the CAN (Controller Area Network) message identifier of the communication matrix node, and the CAN matrix table further includes the gateway node information corresponding to the CAN message identifier and the network segment information to which the communication matrix node belongs.

[0054] The CAN message identifier serves as the identifier of the message and has a mapping relationship with the LIN (Local Interconnect Network) message identifier. The gateway node information includes all controller names. The network segment information to which the communication matrix node belongs is the network segment to which all communication matrix nodes belong. In addition to the communication matrix node page, the CAN matrix table creates "routing list" and "vehicle model information list" pages, as shown in the following table:

[0055]

[0056] The communication matrix node information in the communication matrix node page of the CAN matrix table is shown in the following table:

[0057]

[0058]

[0059] The gateway node information is in the "routing list" page of the CAN matrix table. The network segment information to which the communication matrix node belongs is in the "vehicle model information list" page of the CAN matrix table, as shown in the following table:

[0060]

[0061]

[0062] In the routing table generation method provided by the embodiments of the present application, the CAN matrix table includes communication matrix node information, gateway node information, and the network segment information to which the communication matrix node belongs, thereby providing data preparation for the generation of the target routing table.

[0063] In some embodiments, based on a preset rule, verify the accuracy of each piece of information in the CAN matrix table to obtain a verification result, including: verifying whether the suffix of the CAN message name is within the identifier range of the LIN protocol; verifying whether the sending and receiving relationship corresponding to the CAN message identifier involves the target gateway node, where the target gateway node is the gateway node in the gateway node information; verifying whether there is a LIN message identifier in the target LIN matrix file; verifying whether the sending and receiving relationship of the target gateway node is consistent; if the suffix of the CAN message name is within the identifier range of the LIN, the sending and receiving relationship corresponding to the CAN message identifier involves the target gateway node, there is a LIN message identifier in the target LIN matrix file, and the sending and receiving relationship of the target gateway node is consistent, the verification result is verification success.

[0064] When the controller verifies the accuracy of each piece of information in the controller area network matrix table based on a preset rule, it can verify whether the controller area network message name carries the _0x suffix and whether the suffix is ≤ 0x3F (the identifier range of the local interconnect network protocol), verify whether the transceiver relationship corresponding to the controller area network message identifier involves the target gateway node, the target gateway node has cross-network communication capabilities and is included in the gateway node information, verify whether there is a local interconnect network message identifier in the target local interconnect network matrix file, so as to judge the correctness of the target local interconnect network matrix file, and verify whether the transceiver relationship of the target gateway node is consistent, so as to ensure the smooth progress of cross-network communication. When all the above verifications pass, the verification result is verification success.

[0065] The routing table generation method provided by the embodiments of the present application can ensure the accuracy of the generation of the target routing table by verifying the accuracy of each piece of information in the controller area network matrix table and generating the target routing table when the verification is successful, which is convenient for the gateway node to make routing policies and improves the fluency and reliability of cross-network communication.

[0066] In some embodiments, the communication matrix node information further includes the controller area network message length and the controller area network message period; if the transceiver relationship of the target gateway node is sending, based on the controller area network matrix table and the target local interconnect network matrix file, a target routing table for converting the controller area network protocol and the local interconnect network protocol is established, including: determining the target network segment to which the target gateway node belongs based on the network segment information to which the communication matrix node belongs; taking the controller area network message identifier, the controller area network message length, the controller area network message period, the target network segment, and the receiving node of the target network segment as the target network segment information of the target routing table; obtaining the local interconnect network message length and the local interconnect network message period corresponding to the local interconnect network message identifier from the target local interconnect network matrix file; taking the local interconnect network message identifier, the local interconnect network message length, the local interconnect network message period, the local interconnect network segment, and the sending node of the local interconnect network segment as the source network segment information of the target routing table.

[0067] Further, in some embodiments, the communication matrix node information further includes the Controller Area Network (CAN) message length and the CAN message period; if the transceiver relationship of the target gateway node is reception, based on the CAN matrix table and the target local interconnect network matrix file, a target routing table for converting the CAN protocol and the local interconnect network protocol is established, including: determining the target network segment to which the target gateway node belongs based on the network segment information to which the communication matrix node belongs; using the CAN message identifier, the CAN message length, the CAN message period, the target network segment, and the sending node of the target network segment as the source network segment information of the target routing table; obtaining the local interconnect network message length and the local interconnect network message period corresponding to the local interconnect network message identifier from the target local interconnect network matrix file; using the local interconnect network message identifier, the local interconnect network message length, the local interconnect network message period, the local interconnect network segment, and the receiving node of the local interconnect network segment as the target network segment information of the target routing table.

[0068] The target routing table is shown in the following table:

[0069]

[0070] When the transceiver relationship of the target gateway node is transmission, fill in the CAN message identifier, the CAN message length, and the CAN message period at the corresponding positions of Target-Message ID, Target-DLC, and Target-cycle(ms) in the target routing table, fill in the target network segment in the Target-Target Network column of the target routing table, and fill in the sending node of the target network segment in the Target-Target ECU / OIB Core column of the target routing table. Fill in the local interconnect network message identifier, the local interconnect network message length, and the local interconnect network message period at the corresponding positions of Source-Message ID, Source-DLC, and Source-cycle(ms) in the target routing table, fill in the local interconnect network segment in the Source-Source Network column of the target routing table, and fill in the sending node of the local interconnect network segment in the Source-Source ECU / OIB Core column of the target routing table. Fill in the gateway node in the Target / Source-Domain controler column of the target routing table.

[0071] When the transceiver relationship of the target gateway node is reception, do the same as above, except that the source network segment and the target network segment are swapped.

[0072] The routing table generation method provided by the embodiments of the present application can intelligently generate a target routing table by establishing a Controller Area Network (CAN) matrix table related to a local interconnected network matrix file, and based on the CAN matrix table and the target local interconnected network matrix file when verifying that the information in the CAN matrix table is accurate, to establish a target routing table for the conversion between the CAN protocol and the local interconnected network protocol. This is convenient for the gateway node to make routing policies, improving the fluency and reliability of cross-network communication.

[0073] In some embodiments, the routing table generation method further includes: if the verification result is a verification failure, re-establishing the CAN matrix table; and based on the re-established CAN matrix table, re-establishing the target routing table.

[0074] When the controller verifies the accuracy of the information in the CAN matrix table, if the verification fails, it can locate the cause of the failure, and re-establish the CAN matrix table based on the error data corresponding to the cause of the failure, and then re-establish the target routing table based on the re-established CAN matrix table.

[0075] The routing table generation method provided by the embodiments of the present application can intelligently generate a target routing table by establishing a CAN matrix table related to a local interconnected network matrix file, verifying the accuracy of the information in the CAN matrix table, re-establishing a correct CAN matrix table when the verification fails, and based on the re-established CAN matrix table and the target local interconnected network matrix file, establishing a target routing table for the conversion between the CAN protocol and the local interconnected network protocol. This is convenient for the gateway node to make routing policies, further improving the fluency and reliability of cross-network communication.

[0076] In some embodiments, the routing table generation method further includes: verifying whether the CAN message length in the target routing table is consistent with the local interconnected network message length to obtain a first consistency verification result; verifying whether the CAN message period in the target routing table is consistent with the local interconnected network message period to obtain a second consistency verification result; if the first consistency verification result and / or the second consistency verification result is a verification inconsistency, re-establishing the target routing table.

[0077] After generating the target routing table, the controller can further verify the target routing table to fully ensure the accuracy of the target routing table. For example, the controller can check whether the CAN message length in the target routing table is consistent with the local interconnected network message length, and whether the CAN message period is consistent with the local interconnected network message period. Only when both are consistent can cross-network communication be achieved.

[0078] The routing table generation method provided by the embodiments of the present application establishes a Controller Area Network (CAN) matrix table related to the local interconnected network matrix file. When verifying that the information in the CAN matrix table is accurate, a target routing table for the conversion between the CAN protocol and the local interconnected network protocol is established based on the CAN matrix table and the target local interconnected network matrix file. Further verification of the target routing table can fully ensure the accuracy of the target routing table, facilitate the gateway node to make routing policies, and improve the fluency and reliability of cross-network communication.

[0079] The routing table generation device provided by the present application will be described below. The routing table generation device described below can be correspondingly referred to the routing table generation method described above.

[0080] Figure 2 It is a schematic structural diagram of the routing table generation device provided by the embodiments of the present application. Referring to Figure 3 , the routing table generation device provided by the embodiments of the present application may include:

[0081] A verification module 210, configured to verify the accuracy of each piece of information in the CAN matrix table based on a preset rule to obtain a verification result; the CAN matrix table includes communication matrix node information, and the communication matrix node information includes the CAN message name and signal description of the communication matrix node. The suffix of the CAN message name is the local interconnected network message identifier to be converted, and the signal description includes the local interconnected network segment to which the local interconnected network message identifier belongs. The local interconnected network segment is included in the name of the target local interconnected network matrix file;

[0082] A construction module 220, configured to, if the verification result is successful verification, establish a target routing table for the conversion between the CAN protocol and the local interconnected network protocol based on the CAN matrix table and the target local interconnected network matrix file.

[0083] The routing table generation device provided by the embodiments of the present application establishes a CAN matrix table related to the local interconnected network matrix file. When verifying that the information in the CAN matrix table is accurate, a target routing table for the conversion between the CAN protocol and the local interconnected network protocol is established based on the CAN matrix table and the target local interconnected network matrix file. It can intelligently generate a target routing table, facilitate the gateway node to make routing policies, and improve the fluency and reliability of cross-network communication.

[0084] In some embodiments, the communication matrix node information further includes the CAN message identifier of the communication matrix node, and the CAN matrix table further includes the gateway node information corresponding to the CAN message identifier and the network segment information to which the communication matrix node belongs.

[0085] In some embodiments, the verification module is configured to:

[0086] Verify whether the suffix of the Controller Area Network (CAN) message name is within the range of the identifiers of the local internetworking protocol;

[0087] Verify whether the sending and receiving relationship corresponding to the CAN message identifier involves the target gateway node; the target gateway node is the gateway node in the gateway node information;

[0088] Verify whether the local internetworking message identifier exists in the target local internetworking matrix file;

[0089] Verify whether the sending and receiving relationships of the target gateway node are consistent;

[0090] If the suffix of the CAN message name is within the range of the identifiers of the local internetworking, the sending and receiving relationship corresponding to the CAN message identifier involves the target gateway node, the local internetworking message identifier exists in the target local internetworking matrix file, and the sending and receiving relationships of the target gateway node are consistent, the verification result is successful verification.

[0091] In some embodiments, the communication matrix node information further includes the CAN message length and the CAN message period;

[0092] If the sending and receiving relationship of the target gateway node is sending, the construction module is configured to:

[0093] Determine the target network segment to which the target gateway node belongs based on the network segment information to which the communication matrix node belongs;

[0094] Use the CAN message identifier, the CAN message length, the CAN message period, the target network segment, and the receiving nodes of the target network segment as the target network segment information of the target routing table;

[0095] Obtain the local internetworking message length and the local internetworking message period corresponding to the local internetworking message identifier from the target local internetworking matrix file;

[0096] Use the local internetworking message identifier, the local internetworking message length, the local internetworking message period, the local internetworking network segment, and the sending nodes of the local internetworking network segment as the source network segment information of the target routing table.

[0097] In some embodiments, the communication matrix node information further includes the CAN message length and the CAN message period;

[0098] If the transceiver relationship of the target gateway node is reception, the building module is configured to:

[0099] Determine the target network segment to which the target gateway node belongs based on the network segment information to which the communication matrix node belongs;

[0100] Use the controller area network message identifier, the controller area network message length, the controller area network message period, the target network segment, and the sending node of the target network segment as the source network segment information of the target routing table;

[0101] Obtain the local interconnection network message length and the local interconnection network message period corresponding to the local interconnection network message identifier from the target local interconnection network matrix file;

[0102] Use the local interconnection network message identifier, the local interconnection network message length, the local interconnection network message period, the local interconnection network segment, and the receiving node of the local interconnection network segment as the target network segment information of the target routing table.

[0103] In some embodiments, the building module is further configured to:

[0104] If the verification result is verification failure, re - establish the controller area network matrix table;

[0105] Based on the re - established controller area network matrix table, re - establish the target routing table.

[0106] In some embodiments, the building module is further configured to:

[0107] Verify whether the controller area network message length in the target routing table is consistent with the local interconnection network message length to obtain a first consistency verification result;

[0108] Verify whether the controller area network message period in the target routing table is consistent with the local interconnection network message period to obtain a second consistency verification result;

[0109] If the first consistency verification result and / or the second consistency verification result is verification inconsistent, re - establish the target routing table.

[0110] Specifically, the above - mentioned routing table generation device provided by the embodiments of the present application can implement all the method steps implemented by the method embodiments with the controller as the execution subject, and can achieve the same technical effects. Here, the same parts and beneficial effects as those in the method embodiments are not specifically described again.

[0111] Figure 3This is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 3 shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340. Among them, the processor 310, the communications interface 320, and the memory 330 complete mutual communication through the communication bus 340. The processor 310 may call logic instructions in the memory 330 to execute a routing table generation method, for example, including:

[0112] Verify the accuracy of each piece of information in the controller area network matrix table based on a preset rule to obtain a verification result; the controller area network matrix table includes communication matrix node information, and the communication matrix node information includes the controller area network message name and signal description of the communication matrix node. The suffix of the controller area network message name is the local interconnect network message identifier to be converted, and the signal description includes the local interconnect network segment to which the local interconnect network message identifier belongs. The local interconnect network segment is included in the name of the target local interconnect network matrix file;

[0113] If the verification result is successful verification, based on the controller area network matrix table and the target local interconnect network matrix file, establish a target routing table for the conversion between the controller area network protocol and the local interconnect network protocol.

[0114] In addition, when the logic instructions in the above-mentioned memory 330 are implemented in the form of software functional units and sold or used as an independent product, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0115] On the other hand, the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the steps of the routing table generation method provided by the above-mentioned various methods, for example, including:

[0116] Verify the accuracy of each piece of information in the Controller Area Network (CAN) matrix table based on preset rules to obtain a verification result; the CAN matrix table includes communication matrix node information, and the communication matrix node information includes the CAN message name and signal description of the communication matrix node. The suffix of the CAN message name is the local interconnect network (LIN) message identifier to be converted, and the signal description includes the LIN network segment to which the LIN message identifier belongs. The LIN network segment is included in the name of the target LIN matrix file.

[0117] If the verification result is successful, based on the CAN matrix table and the target LIN matrix file, establish a target routing table for the conversion between the CAN protocol and the LIN protocol.

[0118] On the other hand, the present application also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the steps of the routing table generation method provided by the above-mentioned various methods, for example, including:

[0119] Verify the accuracy of each piece of information in the CAN matrix table based on preset rules to obtain a verification result; the CAN matrix table includes communication matrix node information, and the communication matrix node information includes the CAN message name and signal description of the communication matrix node. The suffix of the CAN message name is the LIN message identifier to be converted, and the signal description includes the LIN network segment to which the LIN message identifier belongs. The LIN network segment is included in the name of the target LIN matrix file.

[0120] If the verification result is successful, based on the CAN matrix table and the target LIN matrix file, establish a target routing table for the conversion between the CAN protocol and the LIN protocol.

[0121] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative efforts.

[0122] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0123] In addition, it should be noted that in the embodiments of the present application, the terms "first", "second", etc. are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are usually of the same type, and the number of objects is not limited. For example, the first object can be one or multiple.

[0124] In the embodiments of the present application, the term "and / or" describes the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0125] In the embodiments of the present application, "determining B based on A" means that the factor A should be considered when determining B. It is not limited to "determining B only based on A", but also includes: "determining B based on A and C", "determining B based on A, C, and E", "determining C based on A, and further determining B based on C", etc. In addition, it can also include using A as a condition for determining B. For example, "when A meets the first condition, use the first method to determine B"; for another example, "when A meets the second condition, determine B"; for another example, "when A meets the third condition, determine B based on the first parameter", etc. Of course, it can also be a condition for using A as a factor for determining B. For example, "when A meets the first condition, use the first method to determine C, and further determine B based on C", etc.

[0126] In the embodiments of the present application, the term "multiple" means two or more, and other quantifiers are similar.

[0127] In the embodiments of the present application, the orientation or positional relationship indicated by terms such as "center", "longitudinal", "lateral", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the embodiments of the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the embodiments of the present application.

[0128] In the embodiments of the present application, unless otherwise clearly specified and defined, the terms "connected" and "coupled" shall be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.

[0129] In the embodiments of the present application, unless otherwise clearly specified and defined, the first feature being "on" or "under" the second feature may be that the first and second features are in direct contact, or the first and second features are indirectly in contact through an intermediate medium. Moreover, the first feature being "above", "over" and "on top of" the second feature may be that the first feature is directly above or obliquely above the second feature, or merely indicates that the first feature has a higher horizontal height than the second feature. The first feature being "under", "beneath" and "underneath" the second feature may be that the first feature is directly below or obliquely below the second feature, or merely indicates that the first feature has a lower horizontal height than the second feature.

[0130] In the embodiments of the present application, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the embodiments of the present application. In the embodiments of the present application, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims

1. A method for generating a routing table, characterized in that Including: Verifying the accuracy of each piece of information in the Controller Area Network (CAN) matrix table based on preset rules to obtain a verification result; The CAN matrix table includes communication matrix node information. The communication matrix node information includes the CAN message name and signal description of the communication matrix node. The suffix of the CAN message name is the local interconnect network (LIN) message identifier to be converted. The signal description includes the LIN message identifier's corresponding LIN network segment, and the LIN network segment is included in the name of the target LIN matrix file; If the verification result is successful, based on the CAN matrix table and the target LIN matrix file, establishing a target routing table for the conversion between the CAN protocol and the LIN protocol.

2. The routing table generation method according to claim 1, wherein The communication matrix node information further includes the CAN message identifier of the communication matrix node. The CAN matrix table further includes the gateway node information corresponding to the CAN message identifier and the network segment information to which the communication matrix node belongs.

3. The routing table generation method according to claim 2, wherein The verifying the accuracy of each piece of information in the CAN matrix table based on preset rules to obtain a verification result includes: Verifying whether the suffix of the CAN message name is within the identifier range of the LIN protocol; Verifying whether the sending and receiving relationship corresponding to the CAN message identifier involves the target gateway node; the target gateway node is the gateway node in the gateway node information; Verifying whether the LIN message identifier exists in the target LIN matrix file; Verifying whether the sending and receiving relationships of the target gateway node are consistent; If the suffix of the CAN message name is within the identifier range of the LIN protocol, the sending and receiving relationship corresponding to the CAN message identifier involves the target gateway node, the LIN message identifier exists in the target LIN matrix file, and the sending and receiving relationships of the target gateway node are consistent, the verification result is successful.

4. The method for generating a routing table according to claim 3, wherein, The communication matrix node information further includes the CAN message length and the CAN message period; If the sending and receiving relationship of the target gateway node is sending, the establishing a target routing table for the conversion between the CAN protocol and the LIN protocol based on the CAN matrix table and the target LIN matrix file includes: Based on the network segment information to which the communication matrix node belongs, determining the target network segment to which the target gateway node belongs; Taking the CAN message identifier, the CAN message length, the CAN message period, the target network segment, and the receiving node of the target network segment as the target network segment information of the target routing table; Obtaining the LIN message length and the LIN message period corresponding to the LIN message identifier from the target LIN matrix file; Take the local interconnect network message identifier, the local interconnect network message length, the local interconnect network message period, the local interconnect network network segment, and the sending node of the local interconnect network network segment as the source network segment information of the target routing table.

5. The routing table generation method according to claim 3, characterized in that, The communication matrix node information further includes the controller area network message length and the controller area network message period; If the transceiver relationship of the target gateway node is reception, establishing a target routing table for the conversion between the controller area network protocol and the local interconnect network protocol based on the controller area network matrix table and the target local interconnect network matrix file includes: Determine the target network segment to which the target gateway node belongs based on the network segment information to which the communication matrix node belongs; Take the controller area network message identifier, the controller area network message length, the controller area network message period, the target network segment, and the sending node of the target network segment as the source network segment information of the target routing table; Obtain the local interconnect network message length and the local interconnect network message period corresponding to the local interconnect network message identifier from the target local interconnect network matrix file; Take the local interconnect network message identifier, the local interconnect network message length, the local interconnect network message period, the local interconnect network network segment, and the receiving node of the local interconnect network network segment as the target network segment information of the target routing table.

6. The routing table generation method according to claim 1, wherein Further includes: If the verification result is verification failure, re - establish the controller area network matrix table; Based on the re - established controller area network matrix table, re - establish the target routing table.

7. The routing table generation method according to claim 1, characterized in that Further includes: Verify whether the controller area network message length in the target routing table is consistent with the local interconnect network message length to obtain a first consistency verification result; Verify whether the controller area network message period in the target routing table is consistent with the local interconnect network message period to obtain a second consistency verification result; If the first consistency verification result and / or the second consistency verification result is verification inconsistent, re - establish the target routing table.

8. A routing table generation device, characterized in that Includes: A verification module, configured to verify the accuracy of each piece of information in the controller area network matrix table based on a preset rule to obtain a verification result; The controller area network matrix table includes communication matrix node information, and the communication matrix node information includes the controller area network message name and signal description of the communication matrix node. The suffix of the controller area network message name is the local interconnect network message identifier to be converted. The signal description includes the local interconnect network network segment to which the local interconnect network message identifier belongs, and the local interconnect network network segment is included in the name of the target local interconnect network matrix file; A construction module, configured to, if the verification result is verification success, establish a target routing table for the conversion between the controller area network protocol and the local interconnect network protocol based on the controller area network matrix table and the target local interconnect network matrix file.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the routing table generation method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the routing table generation method according to any one of claims 1 to 7.