A communication data analysis method, updating method and related device
By decoupling communication data packets to the ASW layer and automatically generating parsing codes using interactive interfaces and parsing tools, the problem of low communication data analysis efficiency in the BSW layer is solved, and more efficient communication data analysis and update are achieved.
Patent Information
- Application Number
- CN202411877006.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-08
AI Technical Summary
Under the AutoSAR architecture, the communication module is parsed and updated in the BSW layer, which is inefficient and requires manual code writing.
The communication data packets received by the BSW layer are extracted and decoupled to the ASW layer, and the format configuration and parsing tools are used in the ASW layer, and the parsing code is automatically generated for parsing.
It improves the efficiency of communication data parsing, and compared with the analysis at the BSW layer, it saves time to generate parsing code and simplifies the update process.
Smart Images

Figure CN119781773A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a communication data parsing method, an updating method and related devices, and belongs to the technical field of communications. Background Art
[0002] As a standard architecture for the development of automotive electronic systems, the AutoSAR architecture is increasingly being adopted with the development of electric vehicles. The communication module is an important component of this architecture. Currently, the communication module is developed and maintained in the BSW layer (Basic Software). Every change in communication interaction requires parsing the communication data in the communication data packet in the BSW layer, and then further upgrading and modifying the overall code (i.e. updating). However, parsing in the BSW layer requires manual code writing, which is inefficient. Summary of the invention
[0003] The present invention provides a communication data parsing method, an updating method and related devices, which solve the problems disclosed in the background technology.
[0004] According to one aspect of the present disclosure, a communication data parsing method is provided, comprising: Extract and decouple the communication data packets received by the BSW layer to the ASW layer; In the ASW layer, according to the format configuration information preset in the interactive interface, the communication data in the communication data packet is converted into a format that can be parsed by a preset parsing tool. According to the communication standard file corresponding to the communication data packet, the preset parsing tool is used to parse the communication data packet after the converted format.
[0005] The above method extracts the communication data packets received by the BSW layer and decouples them to the ASW layer. In the ASW layer, an interactive interface can be used to configure the format information, and a parsing tool can be used to automatically generate parsing code for parsing, which is more efficient than parsing in the BSW layer.
[0006] In some embodiments of the present disclosure, extracting and decoupling communication data packets received by the BSW layer to the ASW layer includes: Extract the communication data packets received by the BSW layer; By establishing a fixed communication interface for decoupling, the communication data packet is transmitted to the ASW layer using the fixed communication interface.
[0007] The fixed communication interface can realize the soft decoupling of the communication data packets received by the BSW layer and the communication data packets parsed by the ASW layer. In subsequent updates, if the content of the received communication data packet changes, only the format configuration information and communication standard files need to be updated to complete the communication data update, which is simple and convenient.
[0008] In some embodiments of the present disclosure, the format configuration information includes a communication protocol mode, a message length, a message error frame, a communication protocol bit rate switch, a communication protocol error status indicator, a data length code value, and a message identifier. The content of each element in the format configuration information can be flexibly configured, thereby improving the efficiency of communication data conversion.
[0009] In some embodiments of the present disclosure, the preset parsing tool is a visual simulation tool; According to the communication standard file corresponding to the communication data packet, the preset parsing tool is used to parse the communication data packet after the conversion format, including: Import the communication standard file corresponding to the communication data packet into the visual simulation tool; A visual simulation tool that imports communication standard files is used to parse the communication data packets after the conversion format.
[0010] The communication data packets are analyzed by using mature visual simulation tools combined with communication standard files, which saves the time of generating analysis codes and improves the analysis efficiency.
[0011] According to another aspect of the present disclosure, there is provided a communication data parsing device, comprising: Extraction and decoupling module, extracts the communication data packets received by the BSW layer and decouples them to the ASW layer; The first parsing module, in the ASW layer, converts the communication data in the communication data packet into a format that can be parsed by a preset parsing tool according to the format configuration information preset in the interactive interface, and uses the preset parsing tool to parse the communication data packet after the converted format according to the communication standard file corresponding to the communication data packet.
[0012] The above-mentioned device extracts the communication data packets received by the BSW layer and decouples them to the ASW layer. In the ASW layer, an interactive interface can be used to configure the format information, and a parsing tool can be used to automatically generate a parsing code for parsing, which is more efficient than parsing in the BSW layer.
[0013] In some embodiments of the present disclosure, in the first analysis module, the preset analysis tool is a visual simulation tool; According to the communication standard file corresponding to the communication data packet, the preset parsing tool is used to parse the communication data packet after the conversion format, including: Import the communication standard file corresponding to the communication data packet into the visual simulation tool; A visual simulation tool that imports communication standard files is used to parse the communication data packets after the conversion format.
[0014] In the first parsing module, a mature visual simulation tool is used in combination with communication standard files to parse communication data packets, which saves the time of generating parsing codes and improves the parsing efficiency.
[0015] According to another aspect of the present disclosure, there is provided a communication data updating method, comprising: The communication data parsing method is used to parse the new communication data packets received by the BSW layer; The parsing results of the new communication data packets are sent to the BSW layer, and the parsing results of the old communication data packets in the BSW layer are updated.
[0016] In the above method, communication data parsing is performed in the ASW layer. When the communication changes, only the format configuration information and the communication standard file need to be adjusted to obtain new parsing results, thereby improving the update efficiency.
[0017] According to another aspect of the present disclosure, there is provided a communication data updating device, characterized in that it comprises: The second parsing module uses a communication data parsing method to parse new communication data packets received by the BSW layer; The update module sends the parsing results of the new communication data packets to the BSW layer and updates the parsing results of the old communication data packets in the BSW layer.
[0018] In the above device, communication data analysis is performed in the ASW layer. When the communication changes, only the format configuration information and the communication standard file need to be adjusted to obtain new analysis results, thereby improving the update efficiency.
[0019] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which stores one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes a communication data parsing method or an updating method.
[0020] The communication data in the above storage medium is parsed in the ASW layer. When the communication changes, only the format configuration information and the communication standard file need to be adjusted to obtain new parsing results, thereby improving the updating and parsing efficiency.
[0021] According to another aspect of the present disclosure, a computer device is provided, comprising one or more processors and one or more memories, wherein one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing a communication data parsing method or an updating method.
[0022] The communication data analysis in the above-mentioned computer equipment is performed in the ASW layer. When the communication changes, only the format configuration information and the communication standard file need to be adjusted to obtain new analysis results, thereby improving the updating and analysis efficiency.
[0023] The beneficial effects achieved by the present invention are as follows: the present invention extracts the communication data packets received by the BSW layer and decouples them to the ASW layer. An interactive interface can be used in the ASW layer to configure the format information, and a parsing tool can be used to automatically generate parsing code for parsing, which is more efficient than parsing at the BSW layer. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a flow chart of a communication data parsing method; Figure 2 is a block diagram of a communication data analysis device; Figure 3 is a flow chart of a communication data updating method; Figure 4 The block diagram of the communication data updating device. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. It is obvious that the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0026] Unless otherwise specified, the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0027] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0028] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0029] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0030] It should be noted that similar symbols and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it does not require further discussion in subsequent figures.
[0031] In order to solve the problems existing in parsing communication data in the BSW layer, the present disclosure proposes a communication data parsing method, an updating method and related devices, specifically placing the parsing process in the ASW layer, and improving the parsing efficiency with the help of existing parsing tools.
[0032] Figure 1 is a schematic diagram of an embodiment of the communication data parsing method disclosed in the present invention, Figure 1 The embodiments may be executed by a terminal (such as a computer).
[0033] like Figure 1 As shown, in step 1 of the embodiment, the communication data packet received by the BSW layer is extracted and decoupled to the ASW layer (Application Software Layer).
[0034] It should be noted that the BSW layer is the basic software layer, and its internal operations can only be performed by manually writing codes without the help of existing tools. Therefore, in order to improve efficiency, the parsing of communication data packets is migrated to the ASW layer, which facilitates some existing tools and improves efficiency.
[0035] In some embodiments, the communication data packet extraction and decoupling process may be as follows: Based on the communication data packets received by the BSW layer under the AutoSAR architecture, the communication data packets are decoupled from the communication module of the BSW layer by establishing a fixed communication interface, and the communication data packets are transmitted to the ASW layer through the fixed communication interface.
[0036] It should be noted that the fixed communication interface defines a fixed array variable A, and assigns the communication data packet received by the BSW layer in real time to the array variable A. When the ASW layer receives the communication data packet transmitted by the array variable A, it parses the communication data packet, releases the array variable A after parsing, and reassigns the newly received communication data packet.
[0037] The fixed communication interface can realize the soft decoupling of the communication data packets received by the BSW layer and the communication data packets parsed by the ASW layer. In subsequent updates, if the content of the received communication data packet changes, only the format configuration information and communication standard files need to be updated to complete the communication data update, which is simple and convenient.
[0038] return Figure 1 In step 2 of the embodiment, in the ASW layer, according to the format configuration information preset in the interactive interface, the communication data in the communication data packet is converted into a format that can be parsed by a preset parsing tool, and according to the communication standard file corresponding to the communication data packet, a preset parsing tool is used to parse the communication data packet after the converted format.
[0039] It should be noted that the interactive interface can adopt a GUI interface, through which some format configuration information can be manually input, that is, only data that meets this format configuration information can be parsed by the parsing tool. The specific format configuration information may include communication protocol mode, message length, message error frame (such as CAN message error frame), communication protocol bit rate switch (such as CAN FD bit rate switch), communication protocol error status indicator (such as CAN FD error status indicator), data length code value and message identifier (CAN message identifier), etc.; among them, the content of each element in the format configuration information (i.e., communication protocol mode, message length, message error frame, communication protocol bit rate switch, communication protocol error status indicator, data length code value and message identifier, etc.) can be flexibly configured (i.e., manually input), thereby improving the efficiency of communication data conversion.
[0040] At the ASW layer (Application Software Layer), data analysis can be done directly using existing analysis tools, specifically visual simulation tools such as Simulink, which is a mature tool with the advantages of wide adaptability, clear structure and process, fine simulation, close to reality, high efficiency and flexibility.
[0041] Taking Simulink as an example, in order to adapt the tool, it is necessary to convert the data in the communication data packet into a format that can be parsed by Simulink according to the format configuration information.
[0042] Specifically, a structure data type canFDMessageBusType can be defined. The structure data can be parsed by the data packet module CANFD_Unpack of simulink, and the extracted data packet interface data is transferred to the Data element of canFDMessageBusType. The above format configuration information and Data data constitute a canFDMessageBusType structure data type data.
[0043] In some embodiments, the process of parsing the communication data packet after the format conversion can be: importing the communication standard file corresponding to the communication data packet into the visual simulation tool, and using the visual simulation tool imported with the communication standard file to parse the communication data packet after the format conversion. Using a mature visual simulation tool combined with the communication standard file to parse the communication data packet saves the time of generating the parsing code and improves the parsing efficiency.
[0044] Taking simulink as an example, the data packet module CANFD_Unpack is used in simulink to perform graphical analysis of data. Specifically, the communication standard file can be imported into simulink first, that is, import CANFD_Unpack. The communication standard file (DBC file) is a file format used to define the CAN bus communication protocol. It is mainly used to describe the signals, messages, nodes and other information in the CAN bus network. Specifically, it is a standard file that describes CAN communication information. The data that needs to be parsed in the package is determined through the DBC file, and then the data packet is parsed.
[0045] In order to improve efficiency, a GUI interface can also be used to import communication standard files and select corresponding parsed signals in DBC files.
[0046] It should be noted that after the parsing of the data packet is completed, the parsing result can be further output through the output interface.
[0047] The above method extracts the communication data packets received by the BSW layer and decouples them to the ASW layer. In the ASW layer, an interactive interface can be used to configure the format information, and a parsing tool can be used to automatically generate parsing code for parsing, which is more efficient than parsing in the BSW layer.
[0048] Figure 2 is a schematic diagram of an embodiment of the communication data parsing device disclosed in the present invention, Figure 2 The embodiment is a virtual device that can be loaded and executed by a terminal (computer), including an extraction decoupling module and a first parsing module.
[0049] The extraction and decoupling module of the embodiment is configured to extract and decouple the communication data packets received by the BSW layer to the ASW layer.
[0050] The first parsing module of the embodiment is configured to, in the ASW layer, convert the communication data in the communication data packet into a format that can be parsed by a preset parsing tool according to the format configuration information preset in the interactive interface, and parse the communication data packet after the converted format using a preset parsing tool according to the communication standard file corresponding to the communication data packet.
[0051] It should be noted that in the first parsing module, the preset parsing tool is a visual simulation tool; the parsing process of the communication data packet after the conversion may include: importing the communication standard file corresponding to the communication data packet into the visual simulation tool, and using the visual simulation tool that imports the communication standard file to parse the communication data packet after the conversion. Using a mature visual simulation tool combined with a communication standard file to parse the communication data packet saves the time of generating parsing code and improves the parsing efficiency.
[0052] Similar to the above method, the above device extracts the communication data packets received by the BSW layer and decouples them to the ASW layer. In the ASW layer, an interactive interface can be used to configure the format information, and a parsing tool can be used to automatically generate parsing code for parsing, which is more efficient than parsing in the BSW layer.
[0053] Figure 3 is a schematic diagram of an embodiment of the communication data updating method disclosed in the present invention, Figure 3 The embodiments may be executed by a terminal (such as a computer).
[0054] like Figure 3 As shown, S1 of the embodiment adopts a communication data parsing method to parse a new communication data packet received by the BSW layer.
[0055] It should be noted that, during parsing, only the format configuration information and the communication standard file in the communication data parsing method need to be adjusted to obtain a new parsing result.
[0056] return Figure 3 , S2 of the embodiment, sends the parsing result of the new communication data packet to the BSW layer, and updates the parsing result of the old communication data packet in the BSW layer.
[0057] In the above method, communication data parsing is performed in the ASW layer. When the communication changes, only the format configuration information and the communication standard file need to be adjusted to obtain new parsing results, thereby improving the update efficiency.
[0058] Figure 4 is a schematic diagram of an embodiment of the communication data updating device disclosed in the present invention, Figure 4 The embodiment is a virtual device that can be loaded and executed by a terminal (computer), including a second parsing module and an updating module.
[0059] The second parsing module of the embodiment is configured to parse the new communication data packet received by the BSW layer using a communication data parsing method.
[0060] The updating module of the embodiment is configured to send the parsing result of the new communication data packet to the BSW layer, and update the parsing result of the old communication data packet in the BSW layer.
[0061] In the above device, communication data analysis is performed in the ASW layer. When the communication changes, only the format configuration information and the communication standard file need to be adjusted to obtain new analysis results, thereby improving the update efficiency.
[0062] Based on the same technical solution, the present disclosure also relates to a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a computing device, the computing device executes a communication data parsing method or an updating method.
[0063] The communication data in the above storage medium is parsed in the ASW layer. When the communication changes, only the format configuration information and the communication standard file need to be adjusted to obtain new parsing results, thereby improving the updating and parsing efficiency.
[0064] Based on the same technical solution, the present disclosure also relates to a computer device, comprising one or more processors and one or more memories, one or more programs stored in the one or more memories and configured to be executed by one or more processors, and the one or more programs include instructions for executing a communication data parsing method or an updating method.
[0065] The communication data analysis in the above-mentioned computer equipment is performed in the ASW layer. When the communication changes, only the format configuration information and the communication standard file need to be adjusted to obtain new analysis results, thereby improving the updating and analysis efficiency.
[0066] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0067] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0068] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0069] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0070] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.
Claims
1. A communication data analysis method, characterized in that: include: Extract and decouple the communication data packets received by the BSW layer to the ASW layer; In the ASW layer, according to the format configuration information preset in the interactive interface, the communication data in the communication data packet is converted into a format that can be parsed by a preset parsing tool. According to the communication standard file corresponding to the communication data packet, the preset parsing tool is used to parse the communication data packet after the converted format.
2. The method according to claim 1, characterized in that Extract and decouple the communication data packets received by the BSW layer to the ASW layer, including: Extract the communication data packets received by the BSW layer; By establishing a fixed communication interface for decoupling, the communication data packet is transmitted to the ASW layer using the fixed communication interface.
3. The method according to claim 1, characterized in that The format configuration information includes communication protocol mode, message length, message error frame, communication protocol bit rate switch, communication protocol error status indicator, data length code value and message identifier.
4. The method according to claim 1, characterized in that: The default analysis tool is a visual simulation tool; According to the communication standard file corresponding to the communication data packet, the preset parsing tool is used to parse the communication data packet after the conversion format, including: Import the communication standard file corresponding to the communication data packet into the visual simulation tool; A visual simulation tool that imports communication standard files is used to parse the communication data packets after the conversion format.
5. A communication data analysis device, characterized in that: include: Extraction and decoupling module, extracts the communication data packets received by the BSW layer and decouples them to the ASW layer; The first parsing module, in the ASW layer, converts the communication data in the communication data packet into a format that can be parsed by a preset parsing tool according to the format configuration information preset in the interactive interface, and uses the preset parsing tool to parse the communication data packet after the converted format according to the communication standard file corresponding to the communication data packet.
6. The device according to claim 5, characterized in that In the first analysis module, the preset analysis tool is a visual simulation tool; According to the communication standard file corresponding to the communication data packet, the preset parsing tool is used to parse the communication data packet after the conversion format, including: Import the communication standard file corresponding to the communication data packet into the visual simulation tool; A visual simulation tool that imports communication standard files is used to parse the communication data packets after the conversion format.
7. A communication data updating method, characterized in that: include: Using the method described in any one of claims 1 to 4, parsing the new communication data packet received by the BSW layer; The parsing results of the new communication data packets are sent to the BSW layer, and the parsing results of the old communication data packets in the BSW layer are updated.
8. A communication data updating device, characterized in that: include: A second parsing module, using the method described in any one of claims 1 to 4, to parse the new communication data packet received by the BSW layer; The update module sends the parsing results of the new communication data packets to the BSW layer and updates the parsing results of the old communication data packets in the BSW layer.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a computing device, the computing device executes any one of the methods described in claims 1 to 4 and 7.
10. A computer device, characterized in that: include: One or more processors, and one or more memories, one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods described in claims 1 to 4 and 7.