Message information management method and device, electronic equipment and storage medium

By receiving and matching the target message identification information, the position information in the CAN communication rule list is obtained, and the rapid management of the message information in the CAN communication rule file is realized, which solves the problems of cumbersome manual management and high error rate in the existing technology. , improve management efficiency.

CN118590342APending Publication Date: 2024-09-03CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410679555.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In the existing technology, manual management of message information in CAN communication rule files is cumbersome and error-prone, and each CAN communication rule file needs to be queried one by one, resulting in low efficiency.

Method used

By receiving the target message identification information and matching it with the CAN communication rule list, the target message information and its location information are obtained, and management is performed based on this information to achieve rapid management of the message information in the CAN communication rule file.

Benefits of technology

It simplifies the message information management process, reduces the possibility of operational errors, improves the management efficiency of CAN communication rule files, avoids tedious operations caused by manual search for message information, and supports the simultaneous management of multiple CAN communication rule files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590342A
    Figure CN118590342A
Patent Text Reader

Abstract

The invention relates to the technical field of message processing, and provides a message information management method and device, electronic equipment and a storage medium. The method comprises the following steps: receiving target message identification information, matching the target message identification information with message information contained in at least two controller area network (CAN) bus communication rule lists, and obtaining target message information corresponding to the target message identification information; in response to a management instruction for the target message information, determining position information corresponding to the target message information based on the CAN communication rule list; the message information in the CAN communication rule file is managed according to the management instruction and the position information, and after the target position of the message information corresponding to the target message information in the CAN communication rule file is obtained and determined through the position information, the message information of the target position can be directly modified based on the management instruction. Therefore, the message information in the CAN communication rule file can be managed quickly through the management instruction and the position information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of message processing, and in particular to a message information management method, device, electronic device and storage medium. Background Art

[0002] With the increasing number of vehicles and the continuous development of computer technology and network technology, people have higher and higher requirements for vehicle intelligence and safety, and vehicles are becoming more and more intelligent and multimedia. In order to meet the requirements of intelligence and multimedia, various electronic control units (ECUs) are often deployed in current vehicles. Each ECU communicates based on the Controller Area Network (CAN) communication rule file. During the project development process, if the project requirements involving CAN routing are changed, it is necessary to query each CAN communication rule file separately, and then manually manage the message information in each CAN communication rule file involved, which makes the process cumbersome and prone to errors. Summary of the invention

[0003] In view of this, an embodiment of the present application provides a message information management method, device, electronic device and storage medium to solve the problem in the prior art that messages in CAN communication rule files are manually managed, resulting in a cumbersome process and prone to errors.

[0004] According to a first aspect of an embodiment of the present application, a message information management method is provided, the method comprising: receiving target message identification information, matching the target message identification information with message information contained in at least two controller area network bus CAN communication rule lists, obtaining target message information corresponding to the target message identification information, the CAN communication rule list being determined based on a corresponding CAN communication rule file; in response to a management instruction for the target message information, determining position information corresponding to the target message information based on the CAN communication rule list, the position information being used to characterize the position of the target message information in the CAN communication rule list; and managing the message information in the CAN communication rule file according to the management instruction and the position information.

[0005] According to a second aspect of an embodiment of the present application, a message information management device is provided, which includes: a matching module for receiving target message identification information, matching the target message identification information with message information contained in at least two controller area network bus CAN communication rule lists, and obtaining target message information corresponding to the target message identification information, wherein the CAN communication rule list is determined based on a corresponding CAN communication rule file; a position module for responding to a management instruction for the target message information, determining position information corresponding to the target message information based on the CAN communication rule list, wherein the position information is used to characterize the position of the target message information in the CAN communication rule list; and a management module for managing the message information in the CAN communication rule file according to the management instruction and the position information.

[0006] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0007] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0008] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the method in the embodiments of the present application receives target message identification information, matches the target message identification information with the message information contained in the CAN communication rule list of at least two controller area network buses, and obtains the target message information corresponding to the target message identification information; in response to a management instruction for the target message information, determines the position information corresponding to the target message information based on the CAN communication rule list; manages the message information in the CAN communication rule file according to the management instruction and the position information, obtains and determines the target position of the message information corresponding to the target message information in the CAN communication rule file through the position information, and then can directly determine the target position of the message information corresponding to the target message information in the CAN communication rule file based on the management instruction The message information of the target location is modified, thereby realizing rapid management of the message information in the CAN communication rule file through management instructions and location information. The operation steps are simple, which reduces the possibility of operation errors and improves the management efficiency of the CAN communication rule file. When there are at least two target message information, by obtaining the location information corresponding to each target message information, the message information in the corresponding CAN communication rule file is managed based on each location information, thereby realizing management of the message information in at least two CAN communication rule files, avoiding the problem in the related technology that the user needs to manually search for the corresponding message information in the CAN communication rule file, resulting in a cumbersome operation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0010] Figure 1 It is a flowchart of a message information management method provided by an embodiment of the present application;

[0011] Figure 2 It is a flowchart of another message information management method provided in an embodiment of the present application;

[0012] Figure 3 It is a flowchart of another message information management method provided in an embodiment of the present application;

[0013] Figure 4 It is a flowchart of another message information management method provided in an embodiment of the present application;

[0014] Figure 5 It is a flowchart of another message information management method provided in an embodiment of the present application;

[0015] Figure 6 It is a flowchart of another optional message information management method provided in an embodiment of the present application;

[0016] Figure 7 It is a flowchart of another optional message information management method provided in an embodiment of the present application;

[0017] Figure 8 It is a basic schematic diagram of an interactive interface for executing a message information management method provided in an embodiment of the present application;

[0018] Fig. 9 This is a basic schematic diagram of an interactive interface after clicking on new message information provided in an embodiment of the present application;

[0019] Fig.10 This is a basic schematic diagram of an interactive interface after clicking a new signal provided in an embodiment of the present application;

[0020] Fig.11 It is a structural diagram of a message information management device provided in an embodiment of the present application;

[0021] Fig.12 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0023] A message information management method and device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0024] Figure 1 A message information management method provided by an embodiment of the present application is as follows: Figure 1 As shown, the method includes:

[0025] S101, receiving target message identification information, matching the target message identification information with message information contained in at least two controller area network bus CAN communication rule lists, and acquiring target message information corresponding to the target message identification information, wherein the CAN communication rule list is determined based on a corresponding CAN communication rule file;

[0026] S102, in response to a management instruction for target message information, determining location information corresponding to the target message information based on a CAN communication rule list;

[0027] S103: Manage the message information in the CAN communication rule file according to the management instruction and the location information.

[0028] It can be understood that the above-mentioned message information management method provided in this example is applied to vehicles, and the above-mentioned vehicles include vehicles with automatic driving or intelligent driving (including vehicles with manned functions (such as cars, buses, large buses, minibuses, etc.), cargo vehicles (such as ordinary trucks, vans, trailers, closed trucks, tank trucks, flatbed trucks, container trucks, dump trucks, special structure trucks), special vehicles (such as logistics distribution vehicles, automatic guided transport vehicles AGV, patrol cars, cranes, cranes, excavators, bulldozers, forklifts, rollers, loaders, off-road engineering vehicles, armored engineering vehicles, sewage treatment vehicles, sanitation vehicles, vacuum trucks, floor washing vehicles, sprinkler trucks, sweeping robots, food delivery robots, shopping guide robots, lawn mowers, golf carts, etc.), vehicles with entertainment functions (such as entertainment vehicles, amusement park automatic driving devices, balance cars, etc.), rescue vehicles (such as fire trucks, ambulances, power repair vehicles, engineering rescue vehicles, etc.)), etc.

[0029] Among them, this example provides an interactive interface, through which the user can input the target message identification information that needs to be queried or managed, and the above target message identification information includes but is not limited to: target message name, target message code (ID).

[0030] In some examples, the target message identification information is matched with the message information contained in at least two CAN communication rule lists to obtain the target message information corresponding to the target message identification information, wherein the CAN communication rule list is determined based on the corresponding CAN communication rule file, and the message information contained in the CAN communication rule list can correspond one-to-one with the message information in the CAN communication rule file; for example, the CAN communication rule file includes: a CAN communication matrix file, a DBC file, and a CAN routing table file, and the CAN communication rule list includes: a CAN communication matrix rule list, a DBC (Data The CAN communication matrix rule list is determined based on the CAN communication matrix file, and the message information in the CAN communication matrix rule list corresponds to the message information in the CAN communication matrix file, and the DBC rule list is determined based on the DBC file, and the message information in the DBC rule list corresponds to the message information in the DBC file, and the CAN routing table rule list is determined based on the CAN routing table file, and the message information in the CAN routing table rule list corresponds to the message information in the CAN routing table file; wherein, different CAN communication rule files may adopt different file formats, and different CAN communication rule files may also adopt the same file format. How to determine the CAN communication rule list based on the CAN communication rule file will be described in detail later and will not be repeated here.

[0031] It can be understood that each message information in the CAN communication rule list contains message identification information, which includes: message name and message code (ID), and the above message name and message ID are unique, that is, different message information corresponds to different message names and message IDs. Therefore, based on the target message identification information, the unique corresponding message information in each CAN communication rule list can be matched, and the message information uniquely corresponding to the target message identification information is used as the target message information.

[0032] Exemplarily, taking the CAN communication rule list as the CAN communication matrix rule list as an example, the CAN communication matrix rule list contains message information such as A, B, C...N, wherein the message identification information of the A message information is A1, the message identification information of the B message information is B1...and so on. Then, when the received target message identification information is A1, A1 is matched with the message information in the CAN communication matrix rule list, and it can be concluded that the A message information in the CAN communication matrix rule list is used as the target message information; when the received target message identification information is B1, B1 is matched with the message information in the CAN communication matrix rule list, and it can be concluded that the B message information in the CAN communication matrix rule list is used as the target message information...and so on.

[0033] Among them, by matching the target message identifier with the message information contained in at least two CAN communication rule lists, it is possible to search the message information in the two CAN communication rule lists at one time, and then quickly determine the target message information corresponding to the at least two CAN communication rule lists, and automatically search for the corresponding message information in at least each CAN communication rule list based on the matching rule and the target message identifier, thereby avoiding manually searching for the corresponding message information in each CAN communication rule list, which results in a cumbersome process and prone to errors.

[0034] Exemplarily, at least two CAN communication rule lists include: a CAN communication matrix rule list and a CAN routing table rule list, matching the target message identification information with the message information contained in the CAN communication matrix rule list, and obtaining the CAN communication matrix target message information corresponding to the target message identification information in the CAN communication matrix rule list; matching the target message identification information with the message information contained in the CAN routing table rule list, and obtaining the CAN routing table target message information corresponding to the target message identification information in the CAN routing table rule list, thereby realizing rapid determination of different target message information, avoiding manual search for the corresponding message information in each CAN communication rule list, which results in a cumbersome process and prone to errors.

[0035] It can be understood that if a certain CAN communication rule list does not have message information matching the target message identification information, the CAN communication rule list does not output the corresponding target message information, and other CAN communication rule lists may output the corresponding target message information.

[0036] It can be understood that after determining the target message information, this example will further display the above target message information through an interactive interface so that the user can obtain the above target message information, avoiding the user's need to manually search for the corresponding message information in the CAN communication rule file, resulting in a cumbersome operation process.

[0037] In some examples, when the user needs to manage the target message information in the CAN communication rule file, a management instruction is directly issued based on the target message information. This example responds to the management instruction for the target message and determines the location information corresponding to the target message information based on the CAN communication rule list; it can be understood that each CAN communication rule list stores message information and stores the location information of the message information in the corresponding CAN communication rule file, that is, the location information can characterize the specific location of the target message information in the corresponding CAN communication rule file, and the location information corresponding to the target message information can be obtained by searching the CAN communication rule list based on the target message information.

[0038] It can be understood that since the message information determined in the CAN communication rule list corresponds to the message information in the CAN communication rule file, when the user manages the target message information, the management instruction can be synchronously mapped to the message information in the CAN communication rule file, thereby realizing the management of the message information in the CAN communication rule file based on the target message information.

[0039] Exemplarily, at least two CAN communication rule lists include: a CAN communication matrix rule list and a CAN routing table rule list. The communication matrix position information corresponding to the target message identification information is determined based on the CAN communication matrix rule list, and the routing table position information corresponding to the target message identification information is determined based on the CAN routing table rule list. Then, the communication matrix position information can represent the specific position of the message information corresponding to the target message identification information in the CAN communication matrix file, and the routing table position information can represent the specific position of the message information corresponding to the target message identification information in the CAN routing table file.

[0040] Among them, after obtaining the location information, this example further manages the message information in the CAN communication rule file according to the management instruction and the location information. Specifically, since the message information in the CAN communication rule list is determined to correspond to the message information in the CAN communication rule file, after the target position of the message information corresponding to the target message information in the CAN communication rule file is determined by obtaining the location information, the message information at the target position can be directly modified based on the management instruction, thereby realizing the rapid management of the message information in the CAN communication rule file through the management instruction and the location information. The operation steps are simple, the possibility of operation errors is reduced, and the management efficiency of the CAN communication rule file is improved. When there are at least two target message information, by obtaining the location information corresponding to each target message information, the message information in the corresponding CAN communication rule file is managed based on each location information, thereby realizing the management of the message information in at least two CAN communication rule files, avoiding the problem in the related technology that the user needs to manually search for the corresponding message information in the CAN communication rule file, resulting in a cumbersome operation process.

[0041] Exemplarily, at least two CAN communication rule lists include: a CAN communication matrix rule list and a CAN routing table rule list; in this example, the CAN communication matrix target message information is first determined based on the CAN communication matrix rule list, and the CAN routing table target message information is determined based on the CAN routing table rule list, and subsequently, when a CAN communication matrix target message information management instruction for the CAN communication matrix target message information is received, the position information of the CAN communication matrix target message information in the CAN communication matrix file is determined based on the CAN communication matrix rule list, and subsequently, the message information in the CAN communication matrix file can be managed according to the CAN communication matrix target message information management instruction and the position information; similarly, when a CAN routing table target message information management instruction for the CAN routing table target message information is received, the position information of the CAN routing table target message information in the CAN routing table file is determined based on the CAN routing table rule list, and subsequently, the message information in the CAN routing table file can be managed according to the CAN routing table target message information management instruction and the position information.

[0042] According to the technical solution provided in the embodiment of the present application, by receiving the target message identification information, the target message identification information is matched with the message information contained in the CAN communication rule list of at least two controller area network buses to obtain the target message information corresponding to the target message identification information; in response to the management instruction for the target message information, the position information corresponding to the target message information is determined based on the CAN communication rule list; the message information in the CAN communication rule file is managed according to the management instruction and the position information, and after the target position of the message information corresponding to the target message information in the CAN communication rule file is determined by the position information, the message at the target position can be directly matched based on the management instruction. The information is modified, thereby realizing rapid management of the message information in the CAN communication rule file through management instructions and location information, the operation steps are simple, the possibility of operation errors is reduced, and the management efficiency of the CAN communication rule file is improved. When there are at least two target message information, by obtaining the location information corresponding to each target message information, the message information in the corresponding CAN communication rule file is managed based on each location information, thereby realizing management of the message information in at least two CAN communication rule files, avoiding the problem in the related technology that the user needs to manually search for the corresponding message information in the CAN communication rule file, resulting in cumbersome operation process.

[0043] In some embodiments, Figure 2 As shown, before matching the target message identification information with the message information included in at least two CAN communication rule lists, the method further includes:

[0044] S201, obtaining at least two CAN communication rule files, and traversing each CAN communication rule file based on field information in each CAN communication rule file to obtain message information corresponding to each CAN communication rule file and position information corresponding to the message information;

[0045] S202: Generate a CAN communication rule list according to the traversed message information and the position information of each message information.

[0046] Specifically, the field information corresponding to each of the above CAN communication rule files is determined by relevant personnel according to the CAN communication rule files. Different CAN communication rule files correspond to different field information, and the field information is used to characterize the parameters constituting the message information in the CAN communication rule file.

[0047] Exemplarily, taking the CAN communication rule file as a CAN communication matrix file as an example, the message information carried in the CAN communication matrix file includes the basic information of the messages and signals of each node of the CAN bus, and the field information constituting the message information includes the message name, message ID, the message sending type, sending cycle, sending channel, signal name, signal length, start bit, precision, offset, etc. Among them, this example does not limit the specific file type of the above CAN communication matrix file. Preferably, the document type of the CAN communication matrix file is EXCEL.

[0048] For another example, taking the CAN communication rule file as a DBC file, the DBC file is a file used to describe the data communication between CAN network nodes. The DBC file records in detail the various parameters and characteristics of the CAN bus communication. The following are some of the main features and functions of the DBC file: ① Clear information definition: The DBC file contains the communication information of all nodes on the CAN network, and this information is defined very completely and clearly. For example, the message name, message ID, cycle, number of bits occupied, start bit, end bit, etc. will be clearly listed, and accordingly, the corresponding field information of the DBC file includes the message name, message ID, cycle, number of bits occupied, start bit, end bit, etc. ② Communication basis: The communication activities in the CAN network are all carried out according to the description of the DBC file. This means that the data exchange and signal transmission between nodes follow the preset rules in the DBC file. ③ Keyword identification: In the DBC file, specific keywords are used to identify different object types, such as "BU_" for network nodes and "BO_" for messages or messages. ④ Universality: Many CAN analysis tools and software can recognize and import DBC files, which makes different tools have good compatibility. When using different software, DBC files can be imported to convert the meaning of message data into clear description information. Preferably, the file type of the above DBC file is a database file.

[0049] For another example, taking the CAN communication rule file as a CAN routing table file, the CAN routing table file mainly stores the data transmission and forwarding relationship between different network protocols. It can be understood that in automotive systems, there are usually multiple network protocols coexisting, such as CAN (Controller Area Network), LIN (Local Interconnect Network), etc. The communication between these protocols needs to be completed through the gateway, and the CAN routing table file is the basis for the gateway to determine how to transfer data from one network to another. The following are several key functions of the CAN routing table file: ① Conversion protocol: When it comes to communication between different protocols, such as CAN and LIN, the gateway needs to be able to receive data from one protocol and forward it according to the specifications of another protocol. The routing table provides the rules and paths for this conversion. ② Message routing: In message routing, the message received by the gateway will be directly forwarded to the specified CAN network according to the routing table without any processing of the message content. ③ Signal routing: In addition to the message itself, the gateway may also need to route based on the signal, which means that it will decide how to process and forward the data based on the specific signal in the message. The CAN routing table file records information such as message name, message ID, sending cycle, and the relationship between CAN and LIN conversion, and the field information corresponding to the CAN routing table file includes message name, message ID, sending cycle, and the relationship between CAN and LIN conversion, etc. This example does not limit the specific file type of the above CAN communication matrix file. Preferably, the document type of the CAN communication matrix file is EXCEL.

[0050] In some examples, this example obtains at least two CAN communication rule files, and traverses each CAN communication rule file based on the field information in each CAN communication rule file to obtain the message information corresponding to each CAN communication rule file and the position information corresponding to the message information; wherein, since different CAN communication rule files contain different field information, different CAN communication rule files correspond to different field information. Specifically, this example can generate corresponding matching rules according to the field information, and then traverse the CAN communication rule file according to the above matching rules to obtain the corresponding message information.

[0051] In some examples, this example will also generate a CAN communication rule list based on the traversed message information and the location information of each message information. It can be understood that the above-mentioned location information can characterize the position of the target message information in the CAN communication rule list. By way of example, taking the CAN communication rule file as a CAN communication matrix file, and the file type of the CAN communication matrix file as EXCEL as an example, when a certain message information in the CAN communication matrix file is traversed, the row coordinates and column coordinates corresponding to the message information are marked as the above-mentioned location information, and the corresponding CAN communication rule list is generated according to the obtained message information and location information, so that the message information can be quickly located in the CAN communication matrix file based on the corresponding location information.

[0052] According to the technical solution provided in the embodiment of the present application, at least two CAN communication rule files are obtained, and each CAN communication rule file is traversed based on the field information in each CAN communication rule file to obtain the message information corresponding to each CAN communication rule file and the position information corresponding to the message information; a CAN communication rule list is generated based on the message information obtained by the traversal and the position information of each message information, so that the message information and the position information in the CAN communication rule list can correspond, and subsequently based on the above-mentioned message information and position information, the message information can be quickly located in the CAN communication matrix file.

[0053] In some embodiments, the CAN communication rule file includes: a CAN communication matrix file, and the CAN communication matrix file is a table file, such as Figure 3 As shown, each CAN communication rule file is traversed based on the field information in each CAN communication rule file to obtain the message information corresponding to each CAN communication rule file and the position information corresponding to the message information, including:

[0054] S301, generating a corresponding tuple structure based on the field information in each CAN communication rule file, and traversing the CAN communication rule file according to the tuple structure to obtain message information;

[0055] S302 , recording the row coordinates and column coordinates of each message information in the CAN communication rule file as position information.

[0056] Specifically, this example saves the field information of each message information in the CAN communication rule file, and subsequently traverses based on the saved field information to achieve the effect of completely traversing the CAN communication rule file; specifically, in this example, the field information of each message information in the CAN communication rule file is saved through a tuple structure.

[0057] After generating a corresponding tuple structure based on the field information in the CAN communication rule file, this example further generates a corresponding matching rule based on the tuple structure, and traverses the CAN communication rule file according to the above matching rule to obtain the message information corresponding to the CAN communication rule file; it can be understood that in order to make the traversed message information more complete, this example can generate multiple matching rules based on each tuple structure, and traverse the CAN communication rule file according to each matching rule, thereby realizing the acquisition of complete message information in the CAN communication rule file.

[0058] It can be understood that, in this example, the CAN communication rule file includes: a CAN communication matrix file, and the CAN communication matrix file is a table file as an example, then the message information in the CAN communication matrix is ​​stored in rows or columns. This example generates a corresponding tuple structure through the field information of the CAN communication matrix file, and traverses the EXCEL type CAN communication matrix file based on the determined tuple structure to obtain the message information corresponding to each row and column in the table.

[0059] In some examples, after traversing and obtaining the message information, the row coordinates and column coordinates of each message information in the CAN communication rule file are recorded, and the above row coordinates and column coordinates are used as position information, so that the specific position of the message information in the CAN communication rule file can be quickly located based on the row coordinates and column coordinates.

[0060] In order to better understand this method, this embodiment provides a more specific example for illustration. This example uses a named tuple in Python to create a named tuple structure, which encapsulates the field information corresponding to the message information in the CAN communication matrix file, including: message name, message ID, message sending type, sending cycle, sending channel, signal name, signal length, start bit, offset and other field information; it can be understood that the CAN communication matrix file is a file saved in Excel format; for the CAN communication matrix file, this file saved in Excel format needs to save the row coordinates and column coordinates of the table where each message information is located to facilitate subsequent positioning and modification. This example will create a CAN communication matrix rule list (later replaced by MatrixList) to save each message information parsed from the CAN communication matrix file. When parsing the above CAN communication matrix file, when the parsed message information is successfully extracted, the ._make method of namedtuple is used to encapsulate it and save it to MatrixList.

[0061] Continuing with the above example, taking Python as an example, the ._make method of namedtuple is used to encapsulate the extracted message information and save it in MatrixList.

[0062] Similarly, this embodiment is explained by taking Python parsing a CAN communication matrix file to obtain message information as an example, wherein parsing a CAN communication matrix file by Python to obtain message information specifically includes the following steps.

[0063] Step 1. Use Python's openpyxl library. Python's openpyxl library is a third-party library for processing Excel files. It is specifically used to read, write and modify Excel files.

[0064] Step 2 parses the meaning of each column in the CAN communication matrix file according to the field information, selects the columns with filtering capabilities, and then traverses the entire table row by row to extract the CAN message information according to the tuple structure.

[0065] Step 3 uses the cell object - cell of Python's openpyxl library to save the location information (row coordinates and column coordinates) of each Excel cell; according to the location information, use the worksheet object - worksheet of Python's openpyxl library to insert rows (worksheet.insert_rows function) and delete rows (worksheet.delete_rows method).

[0066] Among them, the specific steps of parsing the CAN communication matrix file through Python and obtaining the message information are as follows.

[0067] ① Open the specified CAN communication matrix file. Enter the file name of the CAN communication matrix file as a command parameter to the script and use openpyxl to open the excel file.

[0068] ② If the CAN communication matrix file is saved in a worksheet in an EXCEL file, open the sheet where the CAN communication matrix file is located. According to the user's definition, traverse all the Excel sheets and select the sheet where the CAN communication matrix file is located for parsing. If the sheet where the CAN communication matrix file is located is Matrix, this step is implemented in Python as opening the CAN communication matrix file of the Excel type, then obtaining the names of all the sheets in the file, and finally traversing each sheet to parse the sheet named Matrix.

[0069] ③ Get the message ID and the cell location information (MsgIDcell). This solution chooses MsgID (message identifier) ​​as the first key column. First, it determines whether there is a hexadecimal MsgID in the column where MsgID is located (the second column in the table is the column where MsgID is located). If the second column of the row is not empty, it traverses to a new message and saves the found cell to save its coordinates. This step is implemented in Python by traversing the Ith column (the index of I starts from 0), finding the column where MsgID is located, and finding and saving MsgID and coordinates (MsgIDcell) during the traversal process.

[0070] ④ Get the message name, sending type, and sending cycle of the MsgID message. According to the field information corresponding to the CAN communication matrix file, when traversing to a new message information, the saved message name, sending type, and sending cycle on this line can be accessed by the row coordinates of the changed line and its corresponding column coordinates, and the column coordinates of this information can be correctly set according to the definition of the CAN communication matrix. This step is implemented in Python as traversing the Ith column (the index of I starts from 0), and searching for the saved MsgID, message name, sending type, and sending cycle during the traversal process.

[0071] ⑤ Get the sending channel corresponding to each message. According to the structure of the CAN communication matrix, all sending channels are marked with the "S" symbol. Therefore, when traversing a new message, the column (col) with the value "S" on the row is the sending channel. The name of the sending channel is in the first row of the table header (row = 0). Therefore, the coordinates of each sending channel name are (0, col). This step is implemented in Python by searching for the source message and then searching for the signal sending channel.

[0072] ⑥ Get the signal name, signal cell (SignalnCell), signal start bit, and signal length corresponding to each message information. It can be seen from the CAN communication matrix that there are multiple signals under a message, and the signal name, signal start bit, and signal length of each signal are different. However, these signals belong to the message of this MsgID, and their sending channel and other information are also consistent. Therefore, the main information that needs to be compared separately is the signal name, signal start bit, signal length, etc. of each signal. The orange and yellow in the figure below represent all the signals of the two messages. It can be seen that the second column of the row where these signals are located is empty. This condition can be used to distinguish the signals of the two adjacent messages when traversing. And save the signal name, signal start bit, and signal length signals to their respective lists (list) through the specified columns of the rows where each signal is located. Save all the signal name cells found to save their coordinates. This step is implemented in Python as searching for signal messages. In the process of searching for signal messages, the signal name, signal starting bit, signal length and other information are traversed to find the starting bit of each signal in the signal message, and the signal name, signal starting bit, signal length and other information of the traversed signal are saved.

[0073] ⑦ Save the parsed message information into the encapsulated data structure. After traversing and obtaining all the field information of a message, call the ._make method of namedtuple to save the message into the list MatrixList.

[0074] ⑧ Repeat the above saving process until the entire CAN communication matrix file is traversed and the field information of all message information is saved into the data structure for comparison.

[0075] In some examples, the CAN communication rule file includes: a CAN routing table file, and the file type of the CAN routing table file is a table file. This example also takes Python parsing the CAN routing table file to obtain the corresponding message information as an example.

[0076] The CAN routing table file usually places the message information of each CAN channel in its own sheet, so it is necessary to traverse the sheets of all CAN channels one by one. The CAN routing table file is also parsed with the help of the openpyxl library. The process is similar to parsing the CAN communication matrix, as follows.

[0077] ①Open the specified CAN routing table file. Enter the CAN routing table file name as a command parameter to the script and use openpyxl to open the excel file.

[0078] ② Open all the sheets where the CAN channels are located in turn. According to the user's definition, after traversing all the Excel sheets, select the sheet where each CAN channel is located for parsing, otherwise skip the sheet and do not parse it. The above steps are implemented in Python as opening the CAN routing table of the Excel type, obtaining the names of all the sheets in the CAN routing table, and then traversing each sheet to parse the sheets related to the CAN channel.

[0079] ③ Get the sending channel. According to the correspondence between the CAN channel name and the CAN channel number corresponding to the message information, when a sheet is opened, the sending channel of all message information in this sheet is added with the channel number corresponding to the sheet name.

[0080] ④ Obtain the MsgID corresponding to the message information and the cell where it is located, MsgIDcell. According to the routing table format, traverse the rows by row and when a new row is created, obtain the information of the row where the MsgID column is not empty.

[0081] ⑤ Get the message name, signal name, and sending cycle. When traversing a new row by row, get the message name, signal name, and sending cycle information of the message according to the column coordinates of the message name, signal name, and sending cycle and the row coordinates of the new row.

[0082] ⑥ Save the information of the message into the encapsulated data structure. After all the information of a message is traversed and obtained, call the ._make method of namedtuple to save the message into the CAN routing table rule list RTList.

[0083] ⑦ Repeat the above saving process until the entire CAN routing table file is traversed and all message information is saved in the data structure for comparison.

[0084] In some examples, the CAN communication rule file includes: a DBC file, and the file type of the DBC is a database file. This example also takes Python parsing the DBC file to obtain the corresponding message information as an example.

[0085] The message information of each CAN is saved in the corresponding DBC file according to the format of the DBC file. This method extracts each CAN message information by parsing the DBC file of each CAN selected by the user one by one. The DBC file parsing process is as follows.

[0086] ①Read the file path of the DBC file of the eight-way CAN in the corresponding folder.

[0087] ② Use the open() function to open the DBC file of each CAN channel, and use the readline method to read each line of the file line by line.

[0088] ③Match each line of content read, obtain different content according to the mark at the beginning of each line, and obtain the following content according to the DBC file format.

[0089] ④ Get the CAN channel and line number corresponding to the DBC file: Use the if(line.startswith("BU_")): statement to filter the lines starting with "BU_". The CAN channel is the content after the keyword "BU_", such as BU_:Node_1GW, which represents the Node_1 channel.

[0090] ⑤ Get the message name, MsgID, message length, whether it is sent or received in this channel and the line number of all message information sent and received by this channel: Use the if(line.startswith("BO_")): statement to filter the line starting with "BO_". The content after the keyword "BO_" is canid, followed by the message name, followed by the message length, and then the send / receive flag. For example, the parsed content of BO_261VCU1_vehicleTorque_105:8Node_1 is: canid=261, message name VCU1_vehicleTorque_105, message length=8, and the message is sent on the CAN channel of Node_1. If the message information is received by this channel, the final send / receive standard is "GW". And these information are separated by spaces when saved, so you can use the substrings = line.split ("") command to split the line into multiple strings, and get the corresponding information in the string according to the index of the information. For example, MsgID corresponds to the second string, its index is 1 (starting from 0), and its value is substrings [1]. When traversing to a new line, it corresponds to a new message, and you need to create a new list to save the signal, signal start bit, and signal length.

[0091] Get all the signal information and line numbers of the MsgID: After a few lines below a message, the information of all its signals will be indented one grid, and each piece of information is on a line. It starts with the keyword "SG_", so use the if(line.startswith("SG_")): statement to filter the lines starting with "SG_", the keyword "SG_" ends with the content, such as SG_EMS_engFuelCutoff:7|1@0+(1,0)[0|1]""Vector__XXX; means that the signal name is EMS_engFuelCutoff, the actual bit of the signal is 7, and the signal length is 1. Similarly, access its value by cutting it into a string.

[0092] Get the sending period and line number of each message cycle: Use the if(line.startswith("BA_")): statement to filter the lines starting with "BA_", the last content of the keyword "BA_", such as BA_"GenMsgCycleTime"BO_32410; it means that the message GenMsgCycleTime period is 10ms. The Python implementation of this process is as follows: open the DBC file and traverse the DBC file line by line until the end of the file. During the traversal process, if a line is traversed to start with "BU_", the sending channel is obtained according to the data saved in the line; if a line is traversed to start with "Bo_", the data of the line is cut into strings with spaces, and MsgID and MessageName, the line number index of the line and the sending channel are obtained. For the message of the MsgID, three new lists are created to respectively save the name, starting bit, signal length, line number of the signal and other information of all its signals; if a line is traversed to start with "SG_", the data of the line is cut into strings with spaces, and the name, starting bit, signal length and line number of the signal are obtained; if a line is traversed to start with "SG_", the data of the line is cut into strings with spaces, where after all the data are traversed, the above-mentioned sending channel, MsgID and MessageName, the line number index of the line and the name, starting bit, signal length and line number of the signal are saved.

[0093] After extracting all CAN message information from the CAN communication matrix file, CAN routing table file, and DBC file, match and fetch values ​​in the CAN communication matrix rule list MatrixList, CAN routing table rule list RTList, and DBC rule list DBCList according to the MsgID or message name MessageName or signal name Signal entered by the engineer, and output feedback to the user. The process is implemented in Python as follows: create three lists to save the matching results, match the corresponding message information in the CAN communication matrix file, CAN routing table file, and DBC file in turn, and return the matching results.

[0094] According to the technical solution provided in the embodiment of the present application, a corresponding tuple structure is generated based on the field information in each CAN communication rule file, and the CAN communication rule file is traversed according to the tuple structure to obtain message information; the row coordinates and column coordinates of each message information in the CAN communication rule file are recorded as position information, thereby realizing accurate construction of a CAN communication rule list corresponding to the CAN communication rule file based on the message information and position information.

[0095] In some embodiments, the management instruction includes: a deletion instruction, such as Figure 4As shown, the message information in the CAN communication rule file is managed according to the management instructions and location information, including:

[0096] S401, determining the target position of the message information corresponding to the target message information in the CAN communication rule file according to the position information;

[0097] S402. Delete the message information at the target location in the CAN communication rule file according to the deletion instruction.

[0098] Specifically, when the user needs to delete the message information in the CAN communication rule file, the method provided in this example can query the target message information corresponding to the message information to be deleted according to the above-mentioned target message identification information, and can obtain the location information of the target message information in the CAN communication rule file based on the target message identification information. Exemplarily, after receiving the target message identification information input by the user, the location information of the message information in the CAN communication matrix file, the CAN routing table file and the DBC file is located according to the MsgIDcell and SignalnCell information stored in the CAN communication rule list. When the target message identification information is the message ID, the coordinates of the row where the message ID is located are in the Excel cell object MsgIDcell, and the row and column coordinates of each signal are respectively stored in the Excel cell object SignalnCell (where n represents the nth signal).

[0099] In some examples, when the user queries the target message information and receives a delete instruction for the target message information, since the target message information determined in the CAN communication rule list corresponds to the message information in the CAN communication rule file, it can be known that the user's current demand is to delete the message information corresponding to the target message information in the CAN communication rule file.

[0100] Continuing with the above example, in order to accurately delete the message information corresponding to the target message information in the CAN communication rule file, this example determines the target position of the message information corresponding to the target message information in the CAN communication rule file according to the position information. By way of example, taking the CAN communication rule file as a CAN communication matrix file, and the CAN communication matrix file as a table, the specific row coordinates and specific vertical coordinates corresponding to the above target message information in the table can be determined through the above position information.

[0101] Continuing with the above example, the message information at the target position in the CAN communication rule file is deleted according to the delete instruction; specifically, after determining the specific horizontal and vertical coordinates, the message information at the horizontal and vertical coordinates is deleted to delete the specified message information, thus avoiding the problem that users open the CAN communication rule files one by one, resulting in cumbersome operations and prone to errors.

[0102] In order to better understand the present method, the present embodiment provides a more specific example for illustration; in this example, the CAN communication matrix file and the CAN routing table file are both table type files. For the CAN communication matrix file and the CAN routing table file, according to the saved location information (MsgIDcell), the message information is located, and at the position of the row after all sub-signals of the message information end (this position is recorded as row_index), the delete_rows(row_index, amount=colMax) function of openpyxl is used: then delete the amount column on the row_index row, where the column is the maximum number of columns defined by the original CAN communication matrix file or the CAN routing table file.

[0103] In addition, for the CAN communication matrix file and the CAN routing table file, according to the saved location information (SignalnCell), locate the message information, and at the row position after all sub-signals of the message information end (record the position as row_index), use the delete_rows(row_index,amount=colMax) function of openpyxl: delete the amount column on the row_index row, where the column is the maximum number of columns defined by the original CAN communication matrix file or the CAN routing table file.

[0104] This example uses DBC file as a database file. For DBC file, according to the saved location information (MsgIDcell), locate the message information, and use the python file operation lines[row_index-1] to delete the line, where row_index is the number of the line saved by MsgIDcell. In addition, for DBC file, according to the saved location information (SignalnCell), locate the message information, and use the python file operation lines[row_index-1] to delete the line, where row_index is the number of the line saved by MsgIDcell.

[0105] According to the technical solution provided in the embodiment of the present application, the target position of the message information corresponding to the target message information in the CAN communication rule file is determined according to the position information; the message information at the target position in the CAN communication rule file is deleted according to the deletion instruction, thereby realizing the deletion of the specified message information in the CAN communication rule file, avoiding the user from opening the CAN communication rule files one by one, resulting in cumbersome operation and prone to errors.

[0106] In some embodiments, the management instructions include: modification instructions, such as Figure 5As shown, the message information in the CAN communication rule file is managed according to the management instructions and location information, including:

[0107] S501, determining the target position of the message information corresponding to the target message information in the CAN communication rule file according to the position information;

[0108] S502. Modify the message information at the target location in the CAN communication rule file according to the modification instruction.

[0109] Specifically, when the user needs to modify the message information in the CAN communication rule list, the method provided in this example can query the target message information corresponding to the message information that needs to be modified according to the target message identification information, and can obtain the position of the message information that needs to be modified in the CAN communication rule file based on the target message identification information. Exemplarily, after receiving the target message identification information input by the user, the position information of the message information in the CAN communication matrix file, the CAN routing table file and the DBC file is located according to the stored MsgIDcell and SignalnCell information. When the target message identification information is the message ID, the coordinates of the row where the message ID is located are in the Excel cell object MsgIDcell, and the row and column coordinates of each signal are respectively stored in the Excel cell object SignalnCell (where n represents the nth signal).

[0110] In some examples, when the user queries the target message information and receives a modification instruction, since the target message information in the CAN communication rule list corresponds to the message information in the CAN communication rule file, it can be known that the user's current need is to modify the message information in the CAN communication rule file corresponding to the target message information.

[0111] Continuing with the above example, in order to accurately modify the message information corresponding to the target message information in the CAN communication rule file, this example determines the target position of the message information corresponding to the target message information in the CAN communication rule file according to the position information. By way of example, taking the CAN communication rule file as a CAN communication matrix file, and the CAN communication matrix file as a table, the specific row coordinates and specific vertical coordinates corresponding to the above target message information in the table can be determined through the above position information.

[0112] Continuing with the above example, the message information at the target position in the CAN communication rule file is modified according to the modification instruction; specifically, after determining the specific horizontal and vertical coordinates, the message information at the horizontal and vertical coordinates is modified according to the modification instruction, thereby realizing the modification of the specified message information, avoiding the user opening the CAN communication rule files one by one to modify the message information, which results in cumbersome operation and prone to errors.

[0113] In order to better understand the present method, this embodiment provides a more specific example for illustration; in this example, the CAN communication matrix file and the CAN routing table file are both table type files. For the CAN communication matrix file and the CAN routing table file: locate the message confidence according to the location information sgIDcell obtained by the query, and modify the value of the specified column of the row according to the modification instruction input by the user.

[0114] This example uses the DBC file as a database file as an example. According to the saved message cell information MsgIDcell, the message information is located, and the python file operation is used to modify the value of the specified column of the row according to the modification instruction entered by the user and in combination with the DBC file format.

[0115] According to the technical solution provided in the embodiment of the present application, the target position of the message information corresponding to the target message information in the CAN communication rule file is determined according to the position information; the message information at the target position in the CAN communication rule file is modified according to the modification instruction, and after the specific position information is determined, the message information at the position information is modified according to the modification instruction to realize the modification of the specified message information, thereby avoiding the user opening the CAN communication rule files one by one to realize the modification of the message information, which leads to cumbersome operation and prone to errors.

[0116] In some examples, such as Figure 6 As shown, after managing the message information in the CAN communication rule file according to the management instruction and the location information, the method further includes:

[0117] S601, receiving a message adding instruction, parsing the message adding instruction to obtain a message to be added;

[0118] S602, in response to the message adding instruction, determining the message adding position in the CAN communication rule file based on the position information;

[0119] S603. According to the message adding instruction, add the message to be added to the message adding position.

[0120] It can be understood that in order to prevent the added message information from affecting other message information in the CAN communication rule file, the method provided in this example will further determine the message addition position, which is the next position of the last message information in the CAN communication rule file.

[0121] Taking the CAN communication rule file as an EXCEL file as an example, the horizontal coordinate of the last message information in the CAN communication rule file is the Nth row, and the N+1th row is used as the position for adding the above message; similarly, taking the CAN communication rule file as a database file as an example, the horizontal coordinate of the last message information in the CAN communication rule file is the Nth row, and the N+1th row is used as the position for adding the above message.

[0122] Continuing with the previous example, this example receives a message adding instruction, parses the message adding instruction to obtain the message to be added; then responds to the message adding instruction, determines the message adding position in the CAN communication rule file based on the position information; finally, according to the message adding instruction, adds the message to be added to the message adding position, thereby adding the message to be added to the CAN communication rule file, and will not affect other message information in the CAN communication rule file.

[0123] In order to better understand the present method, the present embodiment provides a more specific example for illustration. In this example, the CAN communication matrix file and the CAN routing table file are both table type files. For the CAN communication matrix file and the CAN routing table file, according to the saved position information (MsgIDcell), the last message information is located, and at the position of the row after all sub-signals of the message information end (this position is recorded as row_index), the insert_rows(row_index, amount=colMax) function of openpyxl is used: the amount column is inserted above the row_index, where the column is the maximum number of columns defined by the original CAN communication matrix file or the CAN routing table file, and then the messages to be added corresponding to the message increase instruction input by the user are filled in each column of the row at a time. It can be understood that when the instruction to add a signal in the message information is to locate the position of the message information in the CAN communication matrix file or the CAN routing table file according to the saved position information MsgIDcell, and at the position of the row after all sub-signals of the message information end (the position is recorded as row_index), use openpyxl's insert_rows(row_index,amount=colMax) function: insert the amount column above the row_index row, where the column is the maximum number of columns defined by the original CAN communication matrix file or CAN routing table file, and then fill in the columns of the row at a time according to the message to be added corresponding to the message increase instruction entered by the user.

[0124] This example takes the DBC file as the database file. For the DBC file, according to the saved location information MsgIDcell, locate the last message in the DBC file, and at the position of the row after all the sub-signals of the message information end (record the position as row_index), use the python file operation lines.insert(row_index+1,content+”) to create a new row, and fill in the message information of the row according to the DBC file format, such as BO_261VCU1_vehicleTorque_105:8Node_1. It can be understood that when the instruction is to add a signal in the message information, the root According to the saved location information MsgIDcell, locate the message information, and at the position of the row after all the sub-signals of the message information end (record the position as row_index), use the python file operation lines.insert(row_index+1,content+”) to create a new row to write the signal to be created, and fill in the row data according to the DBC file format, such as SG_EMS_engFuelCutoff:7|1@0+(1,0)[0|1]""Vector__XXX; represents that the signal name is EMS_engFuelCutoff, the actual bit of the signal is 7, and the signal length is 1.

[0125] According to the technical solution provided in the embodiment of the present application, a message adding instruction is received, and the message adding instruction is parsed to obtain a message to be added; in response to the message adding instruction, the message adding position in the CAN communication rule file is determined based on the position information; according to the message adding instruction, the message to be added is added to the message adding position, thereby realizing the addition of the above-mentioned guided added message in the CAN communication rule file without affecting the original message in the CAN communication rule file, thereby avoiding the problem that the added message information affects other message information in the CAN communication rule file.

[0126] In some examples, such as Figure 7 As shown, after managing the message information in the CAN communication rule file according to the management instruction and the location information, the method further includes:

[0127] S701, generating a new CAN communication rule file according to the CAN communication rule file after managing the message information;

[0128] S702: Record the file version number of the new CAN communication rule file according to the preset rule, and replace the CAN communication rule file with the new CAN communication rule file.

[0129] Specifically, after managing the message information in the CAN communication rule file, in order to save the original CAN communication rule file, this example will generate a new CAN communication rule file based on the CAN communication rule file after managing the message information, and record the file version number of the new CAN communication rule file according to the preset rule, and replace the original CAN communication rule file with the new CAN communication rule file.

[0130] For example, the new CAN communication rule file is automatically saved as a new file using Python file operations, and the file name of the new CAN communication rule file is in the format of version and date. If the original CAN communication rule file with modification is named "xxx routing table file V2.8-20240321.xlsx", the new version released on March 22, 2024 is automatically saved as: "xxx routing table file V2.9-20240322.xlsx".

[0131] In order to better understand the present method, this embodiment provides a more specific example for illustration. Figure 8 As shown, Figure 8 Shown is a basic schematic diagram of an interactive interface for executing a message information management method provided in this example.

[0132] in, Figure 8 The figure shows how to use the Python tkinter library to edit a graphical interface, which implements the functions of selecting CAN communication matrix files, CAN routing table files and DBC files, starting and ending functions, information display functions, adding / deleting message information functions, adding / deleting signals, and modifying message information functions.

[0133] ① File selection function: Bind the corresponding CAN communication rule file selection button to a filedialog.askopenfilename() function to input the selected CAN communication rule file as a parameter into the consistency comparison algorithm.

[0134] ② Input box. Enter the target message identification information on the function page;

[0135] ③ Start function. After selecting the file, the file path has been passed into the message matching algorithm, and you can use this button to display the matching results. Click it to start matching.

[0136] ④ Display function: The message information in the three files that match the input information is output to the three output boxes respectively and fed back to the engineer.

[0137] like Fig. 9 As shown, Fig. 9The interactive interface shown is after clicking on Add Message Information. By entering one or more parameters such as registration name, message ID, message sending type, message cycle, message length, arrangement format, etc., you can add message information.

[0138] like Fig.10 As shown, Fig.10 The interactive interface after clicking Add Signal is shown. By entering one or more parameters such as signal name, signal description, signal start bit, signal sending type, signal length, signal offset, etc., the signal in the new message information can be realized.

[0139] Among them, this example manages the message information saved in the CAN communication matrix file, CAN routing table file, and DBC file through the above method, which is convenient and fast, and can reduce the workload of users switching back and forth between CAN communication matrix files, CAN routing table files, and DBC files, browsing in large quantities, and comparing different files when consulting message information, thereby improving development efficiency and accuracy. In addition, by managing the versions of the three files at the same time through the above method, the stability and file consistency are higher, and the probability of file information errors is reduced, which can improve development efficiency. Using the above method to manage the three files reduces the maintenance workload, thereby reducing the cost of use.

[0140] According to the technical solution provided in the embodiment of the present application, a new CAN communication rule file is generated based on the CAN communication rule file after managing the message information; the file version number of the new CAN communication rule file is recorded according to the preset rule, and the CAN communication rule file is replaced with the new CAN communication rule file.

[0141] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0142] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0143] This embodiment also provides a message information management device, such as Fig.11 As shown, the device comprises:

[0144] A matching module 1101 is used to receive target message identification information, match the target message identification information with message information contained in at least two controller area network bus CAN communication rule lists, and obtain target message information corresponding to the target message identification information, wherein the CAN communication rule list is determined based on a corresponding CAN communication rule file;

[0145] A location module 1102, configured to determine location information corresponding to the target message information based on the CAN communication rule list in response to a management instruction for the target message information, wherein the location information is used to characterize a location of the target message information in the CAN communication rule list;

[0146] The management module 1103 is used to manage the message information in the CAN communication rule file according to the management instruction and the location information.

[0147] In some examples, the above-mentioned device is also used to obtain at least two CAN communication rule files, and traverse each CAN communication rule file based on the field information in each CAN communication rule file to obtain the message information corresponding to each CAN communication rule file and the position information corresponding to the message information; generate a CAN communication rule list based on the traversed message information and the position information of each message information.

[0148] In some examples, the CAN communication rule file includes: a CAN communication matrix file, and the CAN communication matrix file is a table file; the location module 1102 is also used to generate a corresponding tuple structure based on the field information in each CAN communication rule file, traverse the CAN communication rule file according to the tuple structure, and obtain message information; record the row coordinates and column coordinates of each message information in the CAN communication rule file as location information.

[0149] In some examples, the management instructions include: a delete instruction, and the management module 1103 is also used to determine the target position of the message information corresponding to the target message information in the CAN communication rule file according to the position information; and delete the message information at the target position in the CAN communication rule file according to the delete instruction.

[0150] In some examples, the management instructions include: modification instructions, and the management module 1103 is also used to determine the target position of the message information corresponding to the target message information in the CAN communication rule file according to the position information; and modify the message information at the target position in the CAN communication rule file according to the modification instructions.

[0151] In some examples, the management module 1103 is also used to receive a message adding instruction, parse the message adding instruction to obtain a message to be added; in response to the message adding instruction, determine the message adding position in the CAN communication rule file based on the position information; and according to the message adding instruction, add the message to be added to the message adding position.

[0152] In some examples, the management module 1103 is also used to generate a new CAN communication rule file based on the CAN communication rule file after managing the message information; record the file version number of the new CAN communication rule file according to the preset rule, and replace the CAN communication rule file with the new CAN communication rule file.

[0153] According to the technical solution provided by the embodiment of the present application, the message information management device provided by the embodiment receives the target message identification information, matches the target message identification information with the message information contained in the CAN communication rule list of at least two controller local area network buses, and obtains the target message information corresponding to the target message identification information; in response to the management instruction for the target message information, determines the position information corresponding to the target message information based on the CAN communication rule list; manages the message information in the CAN communication rule file according to the management instruction and the position information, obtains and determines the target position of the message information corresponding to the target message information in the CAN communication rule file through the position information, and then can directly manage the message information based on the management instruction The message information of the target location is modified, thereby realizing rapid management of the message information in the CAN communication rule file through management instructions and location information. The operation steps are simple, which reduces the possibility of operation errors and improves the management efficiency of the CAN communication rule file. When there are at least two target message information, by obtaining the location information corresponding to each target message information, the message information in the corresponding CAN communication rule file is managed based on each location information, thereby realizing management of the message information in at least two CAN communication rule files, avoiding the problem in the related technology that the user needs to manually search for the corresponding message information in the CAN communication rule file, resulting in a cumbersome operation process.

[0154] Fig.12 Schematic diagram of an electronic device 12 provided in an embodiment of the present application. Fig.12 As shown, the electronic device 12 of this embodiment includes: a processor 1201, a memory 1202, and a computer program 1203 stored in the memory 1202 and executable on the processor 1201. When the processor 1201 executes the computer program 1203, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 1201 executes the computer program 1203, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0155] The electronic device 12 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 12 may include, but is not limited to, a processor 1201 and a memory 1202. Those skilled in the art will appreciate that Fig.12The electronic device 12 is merely an example and does not limit the electronic device 12 , and may include more or fewer components than those shown in the figure, or different components.

[0156] Processor 1201 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0157] The memory 1202 may be an internal storage unit of the electronic device 12, for example, a hard disk or memory of the electronic device 12. The memory 1202 may also be an external storage device of the electronic device 12, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 12. The memory 1202 may also include both an internal storage unit of the electronic device 12 and an external storage device. The memory 1202 is used to store computer programs and other programs and data required by the electronic device.

[0158] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0159] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of regional requirements and patent practice. For example, in some areas, according to regional requirements and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0160] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A message information management method, characterized in that: The method comprises: Receiving target message identification information, matching the target message identification information with message information contained in at least two controller area network bus CAN communication rule lists, and acquiring target message information corresponding to the target message identification information, wherein the CAN communication rule list is determined based on a corresponding CAN communication rule file; In response to a management instruction for the target message information, determining position information corresponding to the target message information based on the CAN communication rule list, wherein the position information is used to characterize a position of the target message information in the CAN communication rule list; The message information in the CAN communication rule file is managed according to the management instruction and the location information.

2. The method according to claim 1, characterized in that Before matching the target message identification information with the message information included in at least two CAN communication rule lists, the method further includes: Acquire at least two of the CAN communication rule files, and traverse each of the CAN communication rule files based on field information in each of the CAN communication rule files to obtain message information corresponding to each of the CAN communication rule files and the position information corresponding to the message information; The CAN communication rule list is generated according to the message information obtained by traversal and the position information of each message information.

3. The method according to claim 2, characterized in that The CAN communication rule file includes: a CAN communication matrix file, and the CAN communication matrix file is a table file; traversing each of the CAN communication rule files based on the field information in each of the CAN communication rule files to obtain the message information corresponding to each of the CAN communication rule files and the position information corresponding to the message information, including: Generate a corresponding tuple structure based on the field information in each of the CAN communication rule files, and traverse the CAN communication rule files according to the tuple structure to obtain the message information; The row coordinates and column coordinates of each message information in the CAN communication rule file are recorded as the position information.

4. The method according to claim 1, characterized in that: The management instruction includes: a deletion instruction, and managing the message information in the CAN communication rule file according to the management instruction and the location information includes: Determine, according to the position information, a target position of the message information corresponding to the target message information in the CAN communication rule file; Delete the message information at the target location in the CAN communication rule file according to the deletion instruction.

5. The method according to claim 1, characterized in that The management instruction includes: a modification instruction, and managing the message information in the CAN communication rule file according to the management instruction and the location information includes: Determine, according to the position information, a target position of the message information corresponding to the target message information in the CAN communication rule file; Modify the message information at the target location in the CAN communication rule file according to the modification instruction.

6. The method according to claim 1, characterized in that After managing the message information in the CAN communication rule file according to the management instruction and the location information, the method further includes: Receiving a message adding instruction, parsing the message adding instruction to obtain a message to be added; In response to the message adding instruction, determining a message adding position in the CAN communication rule file based on the position information; According to the message adding instruction, the message to be added is added to the message adding position.

7. The method according to claim 1, characterized in that After managing the message information in the CAN communication rule file according to the management instruction and the location information, the method further includes: Generate a new CAN communication rule file according to the CAN communication rule file after managing the message information; The file version number of the new CAN communication rule file is recorded according to a preset rule, and the CAN communication rule file is replaced with the new CAN communication rule file.

8. A message information management device, characterized in that: The device comprises: A matching module, configured to receive target message identification information, match the target message identification information with message information contained in at least two controller area network bus CAN communication rule lists, and obtain target message information corresponding to the target message identification information, wherein the CAN communication rule list is determined based on a corresponding CAN communication rule file; a location module, configured to determine, in response to a management instruction for the target message information, location information corresponding to the target message information based on the CAN communication rule list, wherein the location information is used to characterize a location of the target message information in the CAN communication rule list; A management module is used to manage the message information in the CAN communication rule file according to the management instruction and the location information.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.