Message attribute format file generation method and device, equipment and medium
By parsing and generating message attribute format files, the challenges of understanding and processing DBC files due to their complexity are solved, enabling intuitive data display and an efficient testing process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI LIXIANG AUTOMOBILE CO LTD
- Filing Date
- 2024-11-14
- Publication Date
- 2026-05-15
AI Technical Summary
The DBC file format is complex and not easy for non-technical professionals to read, increasing the barrier to understanding and processing data during the verification and testing phases.
By acquiring the target database file related to the controller's local area network communication, parsing the target database file according to preset filtering rules, extracting message attribute information, and generating a message attribute format file according to preset style information.
By converting complex target database files related to controller area network communication into intuitive and easy-to-read standardized files, manual processing time and labor intensity are reduced, and testing efficiency and quality are improved.
Smart Images

Figure CN122053732A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for generating message attribute format files, a device for generating message attribute format files, an electronic device, and a readable storage medium. Background Technology
[0002] With the rapid development of the automotive industry, automotive electronic systems have become increasingly complex, requiring precise and reliable management of communication between all these systems. In modern vehicles, Controller Area Network (CAN) and Automotive Open System Architecture (AUTOSAR) are standard technologies for enabling communication between various Electronic Control Units (ECUs). To manage and verify these communications, developers typically need to use DBC (Database for CAN) files to describe the communication protocols and message formats on the network. However, the complexity of DBC files and their reliance on specialized tools limit their effectiveness in project management and cross-team collaboration.
[0003] In the development of in-vehicle communication networks, DBC files are widely used to describe the communication relationships between various controllers and signals on the CAN network. However, the DBC file format is inconvenient to read and not intuitive for non-technical professionals, which increases the barrier to understanding and processing data during the verification and testing phases. Summary of the Invention
[0004] The technical problem to be solved by the embodiments of the present invention is to provide a method, apparatus, electronic device, and readable storage medium for generating message attribute format files, so as to solve the problem that the DBC file format is inconvenient to read and not intuitive for non-technical professionals, which increases the threshold for understanding and processing data during the verification and testing phases.
[0005] To address the above problems, this invention provides a method for generating message attribute format files, the method comprising:
[0006] Obtain the target database file related to controller local area network communication;
[0007] According to the preset filtering rules, the target database file is parsed to obtain the message attribute information of the message;
[0008] A message attribute format file is generated based on the preset style information and the message attribute information.
[0009] Optionally, the preset filtering rules include periodic message-specific attributes and attributes to be extracted. The step of parsing the target database file according to the preset filtering rules to obtain the message attribute information includes:
[0010] Load the target database file;
[0011] Based on the unique attributes of the periodic messages, the periodic messages in the target database file are determined;
[0012] Based on the attributes to be extracted, the message attribute information of the periodic message is extracted from the target database file.
[0013] Optionally, the method further includes:
[0014] The periodic messages in the communication test are verified according to the message attribute format file.
[0015] Optionally, the message attribute information includes the time information of periodic messages, and the verification of periodic messages in communication testing according to the message attribute format file includes:
[0016] The period of the periodic message is verified based on the time information.
[0017] Optionally, after parsing the target database file according to preset filtering rules to obtain the message attribute information, the method further includes:
[0018] Calculate the number of periodic messages in the target database file, and use it as the message attribute information of the periodic messages;
[0019] The verification of periodic messages in communication testing based on the message attribute format file includes:
[0020] The number of periodic messages is verified based on the number of messages.
[0021] Optionally, generating a message attribute format file based on preset style information and message attribute information includes:
[0022] Create a table file and set the table properties of the table file;
[0023] The preset style information and the message attribute information are filled into the table file to obtain the message attribute format file.
[0024] Optionally, obtaining the target database file related to controller local area network communication includes:
[0025] Detect database files related to controller local area network communication;
[0026] Save the detected database file to the target folder;
[0027] The target folder is traversed in a loop, and the newly added database file is identified as the target database file.
[0028] The present invention also provides a message attribute format file generation device, the device comprising:
[0029] The file acquisition module is used to acquire target database files related to controller local area network communication;
[0030] The file parsing module is used to parse the target database file according to preset filtering rules to obtain the message attribute information of the message;
[0031] The file generation module is used to generate a message attribute format file based on preset style information and the message attribute information.
[0032] Optionally, the preset filtering rules include periodic message-specific attributes and attributes to be extracted, and the file parsing module includes:
[0033] The file loading submodule is used to load the target database file;
[0034] The message determination submodule is used to determine the periodic messages in the target database file based on the unique attributes of the periodic messages;
[0035] The attribute information extraction submodule is used to extract the message attribute information of the periodic message from the target database file according to the attribute to be extracted.
[0036] Optionally, the device further includes:
[0037] The verification module is used to verify the periodic messages in the communication test according to the message attribute format file.
[0038] Optionally, the message attribute information includes time information for periodic messages, and the verification module includes:
[0039] The periodic verification submodule is used to verify the period of the periodic message based on the time information.
[0040] Optionally, the device further includes:
[0041] The count calculation module is used to calculate the number of periodic messages in the target database file after parsing the target database file according to the preset filtering rules and obtaining the message attribute information of the messages, and use it as the message attribute information of the periodic messages.
[0042] The verification module includes:
[0043] The count verification submodule is used to verify the number of periodic messages based on the number of messages.
[0044] Optionally, the file generation module includes:
[0045] The file creation submodule is used to create a table file and set the table properties of the table file;
[0046] The information input submodule is used to input the preset style information and the message attribute information into the table file to obtain the message attribute format file.
[0047] Optionally, the file acquisition module includes:
[0048] The file detection submodule is used to detect database files related to controller local area network communication.
[0049] The file storage submodule is used to store the detected database file into the target folder;
[0050] The file determination submodule is used to iterate through the target folder and determine the newly added database file as the target database file.
[0051] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0052] Memory, used to store computer programs;
[0053] The processor, when executing a program stored in memory, implements the method described above.
[0054] This invention also discloses a readable storage medium that, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to perform the method described above.
[0055] According to embodiments of the present invention, a target database file related to controller local area network (CLAN) communication is acquired; the target database file is parsed according to preset filtering rules to obtain message attribute information; and a message attribute format file is generated according to preset style information and the message attribute information. This enables automatic identification of the required messages and extraction of the required message attribute information, transforming the complex target database file related to CLAN communication into an intuitive and easy-to-read format file. This improves the efficiency of processing messages in the target database file related to CLAN communication, reduces manual processing time and labor intensity, saves time and effort, and facilitates understanding and use by non-professionals and cross-team sharing during CLAN communication testing, thereby greatly improving testing efficiency and quality. Attached Figure Description
[0056] Figure 1This diagram illustrates a flowchart of a method for generating a message attribute format file according to an embodiment of the present invention.
[0057] Figure 2 This diagram illustrates a flowchart of a method for generating a message attribute format file according to an embodiment of the present invention.
[0058] Figure 3 This diagram illustrates a structural block diagram of an embodiment of a message attribute format file generation device provided by an embodiment of the present invention;
[0059] Figure 4 A structural block diagram of an electronic device for generating message attribute format files is shown according to an exemplary embodiment. Detailed Implementation
[0060] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0061] Reference Figure 1 The diagram illustrates a flowchart of a method for generating a message attribute format file according to an embodiment of the present invention, which may specifically include the following steps:
[0062] Step 101: Obtain the target database file related to controller local area network communication.
[0063] In this embodiment of the invention, the Controller Area Network (CAN) is designed as a microcontroller communication system in the automotive environment, exchanging information between various electronic control units (ECUs) to form an automotive electronic control network. For example, CAN control devices are embedded in the engine management system, transmission controller, instrument cluster, and electronic backbone system.
[0064] In this embodiment of the invention, the target database file (DBC) related to controller local area network communication refers to the database file of messages in the controller local area network. For example, the DBC file contains the following information: the CANID of the current signal message, the position of the signal in the CAN message, the byte order of the signal, the conversion details of the signal, the unit of the signal, etc.
[0065] In this embodiment of the invention, the target database file is obtained from the vehicle system.
[0066] Step 102: Parse the target database file according to the preset filtering rules to obtain the message attribute information.
[0067] In this embodiment of the invention, the preset filtering rule refers to the pre-set filtering rule used to extract some necessary message attribute information from the database file.
[0068] In this embodiment of the invention, the target database file is parsed, and the required packets can be filtered out according to preset filtering rules. Then, some required packet attribute information of the packets is filtered out and stored. Specifically, preset filtering rules can be set as needed, and this embodiment of the invention does not limit this.
[0069] In an optional embodiment of the present invention, when message attribute information of periodic messages is required, according to preset filtering rules, it can be determined whether the message is a periodic message and some required message attribute information of the periodic message can be filtered out.
[0070] For example, pre-defined filtering rules can be used. Valid prefixes in the DBC file, such as Vector_XXX, BS_, BU_, BO_, SG_, CM_, and BA_, can be used as preset filtering rules to retrieve the required messages from the database. Fields like 'GenMsgCycleTime', 'GenMsgSendType', 'GenMsgILSupport', 'Msg Length(Byte)', 'Signal Name', and sender and receiver fields can be used as preset filtering rules to extract the required message attribute information. Additionally, preset filtering rules are needed to determine if a message is a periodic message. Then, based on these preset filtering rules, the DBC file is parsed to filter out the required messages and extract message attribute information including 'GenMsgCycleTime', 'GenMsgSendType', 'GenMsgILSupport', 'Msg Length(Byte)', 'Signal Name', and sender and receiver fields. Finally, the message attribute information is used to determine if it is a periodic message. Store the message attribute information of the periodic messages in a dictionary for use in subsequent steps.
[0071] Step 103: Generate a message attribute format file based on the preset style information and the message attribute information.
[0072] In this embodiment of the invention, the message attribute format file refers to a format file that stores message attribute information, such as a table file or any other applicable format file. This embodiment of the invention does not limit this.
[0073] In this embodiment of the invention, the preset style information refers to the information on the style of organizing message attribute information in the message attribute format file, and this style information is preset.
[0074] For example, design the title of an Excel spreadsheet and initialize the spreadsheet style (i.e., preset style information), including key information such as 'MsgName', 'Msg Type', 'Msg ID', 'Msg Send Type', 'Msg Cycle Time (ms)', 'Msg Length (Byte)', 'Signal Name', 'Signal Description', 'Signal Type', 'Signal ValueDescription', and 'Vector_XXX'.
[0075] In this embodiment of the invention, a message attribute format file is generated based on preset style information and message attribute information. For example, an empty format file is created, then preset style information is filled in, and then message attribute information is filled in according to the preset style information to obtain the message attribute format file.
[0076] In one specific implementation, a wrapper class `Dbcload` is developed to load and analyze DBC files and generate Excel files. This class contains multiple methods to process data in the DBC files and generate Excel files. These methods include: `parse_dbc`, which analyzes the DBC file by parsing the target database file according to preset filtering rules to obtain message attribute information, such as message ID, name, signal details, and signal start bit, length, and end sequence. This parsed message attribute information is then stored as a list in a `dbc parse code` object within the `DbcLoad` class. The `dbc_parse_code_gen` method is a C source code function that generates CAN message parsing. This function can temporarily store the message attribute information from the `dbc parse code` object into a temporary file for later use. The `dbc_excel_gen` method generates an Excel file based on the message attribute information in the temporary file. The Excel file includes a title, detailed message information, detailed signal information, and some project-specific configuration information. Then, the development function convert_dbc provides an entry function to start the entire DBC conversion process, which specifically includes calling multiple methods in the Dbcload class to load and analyze DBC files and generate Excel files.
[0077] According to embodiments of the present invention, a target database file related to controller local area network (CLAN) communication is acquired; the target database file is parsed according to preset filtering rules to obtain message attribute information; and a message attribute format file is generated according to preset style information and the message attribute information. This enables automatic identification of the required messages and extraction of the required message attribute information, transforming the complex target database file related to CLAN communication into an intuitive and easy-to-read format file. This improves the efficiency of processing messages in the target database file related to CLAN communication, reduces manual processing time and labor intensity, saves time and effort, and facilitates understanding and use by non-professionals and cross-team sharing during CLAN communication testing, thereby greatly improving testing efficiency and quality.
[0078] Reference Figure 2 The diagram illustrates a flowchart of a method for generating a message attribute format file according to an embodiment of the present invention, which may specifically include the following steps:
[0079] Step 201: Detect the database files related to controller local area network communication.
[0080] In this embodiment of the invention, database files related to controller local area network (DLAN) communication are detected within the vehicle system's files. For example, a method is created to determine whether a file is a DBC file based on its .dbc extension.
[0081] Step 202: Save the detected database file into the target folder.
[0082] In this embodiment of the invention, the detected database files are stored in a designated folder, i.e., the target folder. For example, all DBC files that are expected to be converted to Excel format are stored in the same target folder.
[0083] Step 203: Iterate through the target folder and identify the newly added database file as the target database file.
[0084] In this embodiment of the invention, the target folder is traversed in a loop. When a newly added database file is found, the database file is identified as the target database file. Then, the target database file is converted into a message attribute format file. After completion, the process continues to the next target database file.
[0085] In this embodiment of the invention, batch automated parsing and conversion greatly reduces the time and labor intensity of manually processing target database files, saving time and effort.
[0086] Step 204: Load the target database file.
[0087] In this embodiment of the invention, a target database file is loaded, and the data in the target database file is read out.
[0088] Step 205: Determine the periodic messages in the target database file based on the unique attributes of the periodic messages.
[0089] In this embodiment of the invention, the preset filtering rules include periodic message-specific attributes. Periodic message-specific attributes refer to unique attributes used to determine whether a message is a periodic message. For example, periodic messages can be quickly identified directly through the GenMsgILSupport and GenMsgSendType attributes.
[0090] In this embodiment of the invention, based on the unique attributes of periodic messages, relevant data of periodic messages can be filtered out from the target database file.
[0091] Step 206: Extract the message attribute information of the periodic message from the target database file according to the attributes to be extracted.
[0092] In this embodiment of the invention, the preset filtering rules include attributes to be extracted. Attributes to be extracted refer to the attributes that need to be extracted, such as 'GenMsgCycleTime', 'GenMsgSendType', 'GenMsgILSupport', 'Msg Length(Byte)', 'Signal Name', as well as sender, receiver, etc. Specifically, any applicable attributes to be extracted can be included according to actual needs, and this embodiment of the invention does not impose any restrictions on this.
[0093] In this embodiment of the invention, based on the attributes to be extracted, the message attribute information of the periodic messages determined above is extracted from the target database file and temporarily stored.
[0094] In an optional embodiment of the present invention, it may further include: verifying periodic messages in communication testing according to the message attribute format file.
[0095] The verification of periodic messages is included in the communication testing. The above-mentioned message attribute format file is used as the data basis for the verification of periodic messages, which greatly improves the testing efficiency and testing quality.
[0096] In an optional embodiment of the present invention, the message attribute information includes time information of periodic messages. In a specific implementation of verifying periodic messages in communication testing according to the message attribute format file, it may include: verifying the period of the periodic messages according to the time information.
[0097] After identifying the periodic message, you can also read its time information, such as the timestamp. This time information can also be recorded in the message attribute format file.
[0098] During communication testing, the period duration of periodic messages can be calculated based on time information. This allows us to determine if there are any abnormalities or errors in the period duration of periodic messages, thus verifying the period of the periodic messages and facilitating communication testing.
[0099] In an optional embodiment of the present invention, after parsing the target database file according to preset filtering rules to obtain the message attribute information of the message, the method may further include: calculating the number of periodic messages in the target database file as the message attribute information of the periodic message; correspondingly, in a specific implementation of verifying periodic messages in communication testing according to the message attribute format file, it may include: verifying the number of periodic messages according to the number of messages.
[0100] After determining the periodic messages, the number of periodic messages can be calculated, for example, by counting the number of periodic messages. This number of messages serves as the message attribute information for the periodic messages and can also be recorded in the message attribute format file.
[0101] During communication testing, the number of messages can be used to determine whether there are any abnormalities or errors in the number of periodic messages, thus verifying the number of periodic messages and facilitating communication testing.
[0102] Step 207: Create a table file and set the table properties of the table file.
[0103] In this embodiment of the invention, a table file refers to a file in tabular format, such as an Excel file. An empty table file is automatically created. Then, the table properties of the table file are automatically set.
[0104] The table attributes include table attributes such as title, font, color, size, row width, and column width, or any other applicable table attributes. This embodiment of the invention does not limit these attributes.
[0105] In this embodiment of the invention, the required messages and message attribute information are actively filtered out from the target database according to preset filtering rules. Furthermore, table attributes can be set so that the format of the table file can be adjusted independently, making the extracted data clearer when used.
[0106] Step 208: Fill the preset style information and the message attribute information into the table file to obtain the message attribute format file.
[0107] In this embodiment of the invention, preset style information is filled into a table file, and then message attribute information is filled into the table file according to the preset style information, thereby obtaining a table file containing message attribute information, namely a message attribute format file.
[0108] According to embodiments of the present invention, by detecting database files related to controller local area network (CLAN) communication, the detected database files are stored in a target folder. The target folder is iterated through, and newly added database files are identified as the target database files. The target database files are loaded, and the periodic messages in the target database files are identified based on the unique attributes of the periodic messages. Based on the attributes to be extracted, the message attribute information of the periodic messages is extracted from the target database files. A table file is created, and the table attributes of the table file are set. The preset style information and the message attribute information are filled into the table file to obtain the message attribute format file. This enables automatic identification of periodic messages and extraction of the required message attribute information. The complex target database files related to CLAN communication are converted into intuitive and easy-to-read format files, improving the efficiency of processing periodic messages in target database files related to CLAN communication, reducing manual processing time and labor intensity, saving time and effort, and facilitating understanding and use by non-professionals and cross-team sharing during CLAN communication testing, thereby greatly improving testing efficiency and quality.
[0109] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0110] Reference Figure 3 The diagram illustrates a structural block diagram of a message attribute format file generation device according to another embodiment of the present invention, which may specifically include the following modules:
[0111] The file acquisition module 301 is used to acquire target database files related to controller local area network communication;
[0112] The file parsing module 302 is used to parse the target database file according to preset filtering rules to obtain the message attribute information of the message;
[0113] The file generation module 303 is used to generate a message attribute format file based on preset style information and the message attribute information.
[0114] Optionally, the preset filtering rules include periodic message-specific attributes and attributes to be extracted, and the file parsing module includes:
[0115] The file loading submodule is used to load the target database file;
[0116] The message determination submodule is used to determine the periodic messages in the target database file based on the unique attributes of the periodic messages;
[0117] The attribute information extraction submodule is used to extract the message attribute information of the periodic message from the target database file according to the attribute to be extracted.
[0118] Optionally, the device further includes:
[0119] The verification module is used to verify the periodic messages in the communication test according to the message attribute format file.
[0120] Optionally, the message attribute information includes time information for periodic messages, and the verification module includes:
[0121] The periodic verification submodule is used to verify the period of the periodic message based on the time information.
[0122] Optionally, the device further includes:
[0123] The count calculation module is used to calculate the number of periodic messages in the target database file after parsing the target database file according to the preset filtering rules and obtaining the message attribute information of the messages, and use it as the message attribute information of the periodic messages.
[0124] The verification module includes:
[0125] The count verification submodule is used to verify the number of periodic messages based on the number of messages.
[0126] Optionally, the file generation module includes:
[0127] The file creation submodule is used to create a table file and set the table properties of the table file;
[0128] The information input submodule is used to input the preset style information and the message attribute information into the table file to obtain the message attribute format file.
[0129] Optionally, the file acquisition module includes:
[0130] The file detection submodule is used to detect database files related to controller local area network communication.
[0131] The file storage submodule is used to store the detected database file into the target folder;
[0132] The file determination submodule is used to iterate through the target folder and determine the newly added database file as the target database file.
[0133] According to embodiments of the present invention, a target database file related to controller local area network (CLAN) communication is acquired; the target database file is parsed according to preset filtering rules to obtain message attribute information; and a message attribute format file is generated according to preset style information and the message attribute information. This enables automatic identification of the required messages and extraction of the required message attribute information, transforming the complex target database file related to CLAN communication into an intuitive and easy-to-read format file. This improves the efficiency of processing messages in the target database file related to CLAN communication, reduces manual processing time and labor intensity, saves time and effort, and facilitates understanding and use by non-professionals and cross-team sharing during CLAN communication testing, thereby greatly improving testing efficiency and quality.
[0134] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0135] Figure 4 This is a structural block diagram of an electronic device 700 for generating message attribute format files, according to an exemplary embodiment. For example, the electronic device 700 may be an on-board computer, an on-board controller, a battery management system (BMS), a fully self-driving system (FSD), etc.
[0136] Reference Figure 4 The electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.
[0137] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.
[0138] Memory 704 is configured to store various types of data to support the operation of device 700. Examples of this data include instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0139] Power supply component 706 provides power to various components of electronic device 700. Power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.
[0140] Multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0141] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
[0142] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0143] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 may detect the on / off state of device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or a component of electronic device 700, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0144] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0145] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0146] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of an electronic device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0147] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a terminal's processor, enables the terminal to execute a message attribute format file generation method, the method comprising:
[0148] Obtain the target database file related to controller local area network communication;
[0149] According to the preset filtering rules, the target database file is parsed to obtain the message attribute information of the message;
[0150] A message attribute format file is generated based on the preset style information and the message attribute information.
[0151] Optionally, the preset filtering rules include periodic message-specific attributes and attributes to be extracted. The step of parsing the target database file according to the preset filtering rules to obtain the message attribute information includes:
[0152] Load the target database file;
[0153] Based on the unique attributes of the periodic messages, the periodic messages in the target database file are determined;
[0154] Based on the attributes to be extracted, the message attribute information of the periodic message is extracted from the target database file.
[0155] Optionally, the method further includes:
[0156] The periodic messages in the communication test are verified according to the message attribute format file.
[0157] Optionally, the message attribute information includes the time information of periodic messages, and the verification of periodic messages in communication testing according to the message attribute format file includes:
[0158] The period of the periodic message is verified based on the time information.
[0159] Optionally, after parsing the target database file according to preset filtering rules to obtain the message attribute information, the method further includes:
[0160] Calculate the number of periodic messages in the target database file, and use it as the message attribute information of the periodic messages;
[0161] The verification of periodic messages in communication testing based on the message attribute format file includes:
[0162] The number of periodic messages is verified based on the number of messages.
[0163] Optionally, generating a message attribute format file based on preset style information and message attribute information includes:
[0164] Create a table file and set the table properties of the table file;
[0165] The preset style information and the message attribute information are filled into the table file to obtain the message attribute format file.
[0166] Optionally, obtaining the target database file related to controller local area network communication includes:
[0167] Detect database files related to controller local area network communication;
[0168] Save the detected database file to the target folder;
[0169] The target folder is traversed in a loop, and the newly added database file is identified as the target database file.
[0170] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0171] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products 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.
[0172] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0173] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0174] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0175] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0176] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0177] The foregoing has provided a detailed description of a message attribute format file generation method, a message attribute format file generation device, an electronic device, and a readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for generating a message attribute format file, characterized in that, The method includes: Obtain the target database file related to controller local area network communication; According to the preset filtering rules, the target database file is parsed to obtain the message attribute information of the message; A message attribute format file is generated based on the preset style information and the message attribute information.
2. The method according to claim 1, characterized in that, The preset filtering rules include periodic message-specific attributes and attributes to be extracted. The step of parsing the target database file according to the preset filtering rules to obtain message attribute information includes: Load the target database file; Based on the unique attributes of the periodic messages, the periodic messages in the target database file are determined; Based on the attributes to be extracted, the message attribute information of the periodic message is extracted from the target database file.
3. The method according to claim 1, characterized in that, The method further includes: The periodic messages in the communication test are verified according to the message attribute format file.
4. The method according to claim 3, characterized in that, The message attribute information includes the time information of periodic messages. The verification of periodic messages in communication testing according to the message attribute format file includes: The period of the periodic message is verified based on the time information.
5. The method according to claim 3, characterized in that, After parsing the target database file according to preset filtering rules to obtain the message attribute information, the method further includes: Calculate the number of periodic messages in the target database file, and use it as the message attribute information of the periodic messages; The verification of periodic messages in communication testing based on the message attribute format file includes: The number of periodic messages is verified based on the number of messages.
6. The method according to claim 1, characterized in that, The step of generating a message attribute format file based on preset style information and message attribute information includes: Create a table file and set the table properties of the table file; The preset style information and the message attribute information are filled into the table file to obtain the message attribute format file.
7. The method according to claim 1, characterized in that, The acquisition of the target database file related to controller local area network communication includes: Detect database files related to controller local area network communication; Save the detected database file to the target folder; The target folder is traversed in a loop, and the newly added database file is identified as the target database file.
8. A message attribute format file generation device, characterized in that, The device includes: The file acquisition module is used to acquire target database files related to controller local area network communication; The file parsing module is used to parse the target database file according to preset filtering rules to obtain the message attribute information of the message; The file generation module is used to generate a message attribute format file based on preset style information and the message attribute information.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-7.
10. A readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1-7.