Method, system and equipment for automatically matching CAN signal cycle time

By automatically matching the CAN signal cycle time, using CAN matrix editing tools and Python scripts, the time-consuming problem of manual matching is solved, and the efficiency and accuracy of automotive electronic control system software development are improved.

CN120602254APending Publication Date: 2025-09-05CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510829061.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

In automotive electronic control systems, manually matching the CAN signal cycle time consumes a lot of time and energy, affecting development efficiency.

Method used

Generate matrix files through the CAN matrix editing tool, generate initial signal table files based on application development requirements, configure automated processing scripts, automatically match CAN signal cycle times, use Python language to develop automated scripts and implement them through the PyCharm integrated development environment, perform file parsing and data structure establishment, and use a two-way matching verification mechanism for data matching.

Benefits of technology

It realizes the automatic matching of CAN signal cycle time, reduces manual operation time and errors, improves software development efficiency and accuracy, and ensures the quality and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602254A_ABST
    Figure CN120602254A_ABST
Patent Text Reader

Abstract

The invention relates to a method, a system and equipment for automatically matching CAN signal cycle time, and belongs to the field of automobile electronic control. The method comprises the following steps: generating a matrix file containing a CAN network communication rule through a CAN matrix editing tool; the matrix file at least comprises a signal name, a corresponding cycle time parameter and communication identification information; based on an application development demand, generating an initial signal table file containing a to-be-modeled signal name; configuring an automatic processing script based on the matrix file and the initial signal table file; outputting an update signal table file containing a complete cycle time parameter through an automatic processing script; the update signal table file is used for supporting software component modeling. By means of the scheme, automatic processing of the whole process from file generation, analysis, data matching to output is achieved, the software development efficiency is greatly improved, and the modeling accuracy is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of automotive electronic control, and in particular relates to a method, system and device for automatically matching the cycle time of a CAN signal. Background Art

[0002] With the continuous advancement of automotive electronics technology, communication between automotive electronic control units (ECUs) has become increasingly complex and critical. In automotive electronic control systems, the Controller Area Network (CAN), a widely used communication protocol, handles a large number of signal transmission tasks. AUTOSAR (AUTomotive Open System ARchitecture), a key architectural standard for automotive embedded systems, is also gaining increasing adoption in automotive software development.

[0003] In AUTOSAR systems, communication between software components (SWCs) typically occurs via CAN signals. Accurately establishing the connection between SWC ports and CAN signals, and determining the CAN signal cycle time, is crucial for the proper operation and development efficiency of automotive electronic control systems.

[0004] Currently, the implementation of software signals for electronic control units (ECUs) in general vehicle models faces the following challenges: Application developers must manually search for the cycle times of their desired CAN signals within the CAN Matrix file, released by architecture professionals, to lock in the timing settings for the CAN signals during modeling. However, when signals are complex or involve a large number of service signals, this manual matching method consumes considerable time and effort, significantly impacting development efficiency.

[0005] Therefore, in view of the above problems existing in the prior art, there is an urgent need for a method that can quickly and accurately match the CAN signal trigger period for the SWC Port to improve the efficiency of automotive electronic control system software development. Summary of the Invention

[0006] Based on this, it is necessary to provide a method, system and device for automatically matching the CAN signal cycle time to address the above technical problems, which can automatically achieve the matching of CAN signal cycle time to solve the problem of low efficiency of manual matching of CAN signal cycle time in the existing technology.

[0007] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions:

[0008] In a first aspect, the present application provides a method for automatically matching the cycle time of a CAN signal, comprising the following steps:

[0009] Generate a matrix file containing CAN network communication rules using a CAN matrix editing tool; the matrix file at least includes a signal name, a corresponding cycle time parameter, and communication identification information;

[0010] Based on application development requirements, generate an initial signal table file containing the names of the signals to be modeled;

[0011] Configure automated processing scripts based on the matrix file and the initial signal table file;

[0012] An updated signal table file containing complete cycle time parameters is output through an automated processing script; the updated signal table file is used to support software component modeling.

[0013] Optionally, generating an initial signal table file containing the names of the signals to be modeled based on application development requirements includes:

[0014] Extract the signal characteristic parameters to be modeled based on the actual SWC modeling needs and system configuration requirements;

[0015] generating a standardized signal name list according to the signal characteristic parameters;

[0016] Automatically fill the standardized signal name list into a preset signal configuration table template to form a structured initial signal table file; the signal characteristic parameters in the document are configured to match the cycle time parameters of the CAN signal;

[0017] The signal characteristic parameters include: signal physical properties, data transmission direction, refresh frequency and associated control logic;

[0018] The signal configuration table template includes: a signal name column, a data type column, a communication cycle column and an associated SWC component column;

[0019] Generating a standardized signal name list according to the signal characteristic parameters includes:

[0020] Standardize non-standard signal names;

[0021] Verify the correspondence between signal names and SWC function definitions;

[0022] Generates a unique signal naming convention that includes a version identifier.

[0023] Optionally, the configuration of the automated processing script includes:

[0024] Read the generated matrix file, extract the signal name and cycle time parameters, and construct the first key-value pair data structure;

[0025] Read the generated initial signal table file, extract the signal name, and construct a second key-value pair data structure;

[0026] By traversing the signal names of the second key-value pair data structure and performing feature comparison with the first key-value pair data structure, when a name match is detected, the corresponding cycle time parameter in the first key-value pair is injected into the second key-value pair.

[0027] Optionally, the key value of the first key-value pair data structure is defined as {signal name: cycle time}; the initial key value of the second key-value pair data structure is defined as {signal name: empty value}, and is updated to {signal name: cycle time} after data matching.

[0028] Optionally, the automated processing script is developed in Python and is obtained by engineering construction through the PyCharm integrated development environment; the obtained automated processing script is used to record operation trajectory information; the automated processing script is deployed in a continuous integration environment and is configured to automatically trigger full-process processing when an input file update is detected, and send a processing result notification through an email server;

[0029] The operation trace information includes input file hash value verification records, data matching process logs, parameter modification history tracking and output file digital signatures.

[0030] Optionally, the automated processing script includes a data matching engine using a two-way matching verification mechanism, which generates an error log file when a signal name match fails;

[0031] The two-way matching verification mechanism includes:

[0032] Data injection is performed based on the principle of exact matching of signal names;

[0033] The injected cycle time parameters are checked for compliance with the communication protocol; the compliance check includes: data type verification, value range verification, and deviation detection between the cycle time and the preset value of the communication matrix.

[0034] Optionally, the output format of the update signal table file is xlsx format, and contains the following metadata fields: signal name, original cycle time, post-match cycle time, matching status identifier, and last update timestamp;

[0035] The matching status flag adopts three-state logic: 0-no match, 1-successful match, 2-partial match.

[0036] Optionally, the method further includes: when it is detected that there are multiple candidate cycle time values ​​for the signal with the same name, executing the following priority strategy:

[0037] The first priority is defined as adopting the parameters marked as mandatory period in the communication matrix;

[0038] The second priority is defined as using parameters with the smallest deviation from the preset period in the application layer requirement document;

[0039] The third priority is defined as parameter values ​​that are confirmed using human intervention.

[0040] In a second aspect, the present invention further provides a system for automatically matching CAN signal cycle time, comprising:

[0041] A first generating module is used to generate a matrix file containing CAN network communication rules through a CAN matrix editing tool; the matrix file at least includes a signal name, a corresponding cycle time parameter and communication identification information;

[0042] The second generation module is used to generate an initial signal table file containing the names of the signals to be modeled based on application development requirements;

[0043] Automation script configuration module, used to configure automation processing scripts based on matrix files and initial signal table files;

[0044] The file output module is used to output an update signal table file containing complete cycle time parameters through an automated processing script; the update signal table file is used to support software component modeling.

[0045] In a third aspect, the present invention further provides an electronic device, comprising:

[0046] at least one processor; and,

[0047] a memory communicatively connected to the at least one processor; wherein,

[0048] The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor.

[0049] At least one processor executes, so that the at least one processor can perform the method steps as described in any one of the first aspects.

[0050] The method, system, and device for automatically matching CAN signal cycle times proposed above, through the development of an automated script based on Python syntax, automates a series of operations, from file parsing, data structure establishment, to data matching and improvement. This avoids the tedious process of manually searching for CAN signal cycle times in CAN communication matrix files, greatly reducing the time and effort spent by software developers in this process and effectively improving the efficiency of automotive electronic control system software development.

[0051] Compared with manual search and matching, the automated script in this application can more accurately extract the correct CAN signal Cycle time information from the CAN communication matrix file and match it to the corresponding signal, reducing errors and omissions caused by human factors, improving the accuracy of SWC signal modeling, and thus ensuring the quality and stability of the entire automotive electronic control system software development.

[0052] The method and system for automatically matching CAN signal cycle times proposed in this invention are applicable to various automotive electronic control system software development scenarios based on the AUTOSAR architecture. Whether dealing with simple or complex signals or a large number of service signals, they can quickly and efficiently complete CAN signal cycle time matching. This method has wide applicability and practicality, and can bring significant benefits to the automotive electronic control system software development industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly describes the drawings required for the specific embodiments or the description of the prior art. Similar elements or parts are generally identified by similar reference numerals throughout the drawings. Elements or parts in the drawings are not necessarily drawn to scale.

[0054] Figure 1 Flowchart of a method for automatically matching CAN signal cycle time in an embodiment of the present invention;

[0055] Figure 2 Schematic diagram of the system structure for automatically matching the CAN signal cycle time in an embodiment of the present invention;

[0056] Figure 3 FIG. 4 is a diagram showing the internal structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0058] The present invention provides a system, method, and device for automatically matching CAN signal cycle times. The method can be applied to a terminal, a server, or a system comprising a terminal and a server, and implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, and the like.

[0059] A CAN signal is a data unit communicated via the CAN bus. A CAN signal is contained in a CAN message and can be sent and received by one or more SWCs.

[0060] CAN signals define data types, data ranges, units, and other properties such as minimum / maximum values, resolution, and accuracy.

[0061] Based on this, the embodiments of the present invention are described in conjunction with the accompanying drawings. Figure 1 As shown, the embodiment of the present invention provides a method for automatically matching the cycle time of a CAN signal, which specifically includes the following steps:

[0062] S101: Generate a matrix file containing CAN network communication rules using a CAN matrix editing tool; the matrix file at least includes a signal name, a corresponding cycle time parameter, and communication identification information;

[0063] S102 generates an initial signal table file containing the names of the signals to be modeled based on application development requirements;

[0064] S103 configures the automated processing script based on the matrix file and the initial signal table file;

[0065] S104: Outputting an updated signal table file containing complete cycle time parameters through an automated processing script; the updated signal table file is used to support software component modeling.

[0066] In the above step S101, the matrix file also includes the communication rule information between the nodes in the CAN network, the identifier of the message, the data length, the periodic transmission triggering condition, etc.

[0067] The matrix file in step S101 is specifically a CAN communication matrix (CAN Matrix);

[0068] The CAN Matrix is ​​a data structure that describes messages and signals within a Controller Area Network (CAN) network. It defines the communication rules between each node in the CAN network, including information such as message identifiers, data length, periodic transmission, and trigger conditions. The CAN Matrix can be created and edited in a variety of ways, one common method being using a CAN matrix editing tool. The steps for creating and editing a CAN Matrix are as follows:

[0069] 1. Determine the network topology: First, you need to determine the topology of the CAN network, including the number of nodes, the connection relationship between nodes, etc.

[0070] 2. Define the message: Determine the message that needs to be transmitted in the CAN network. Each message usually has a unique identifier (ID) to identify and distinguish it in the network.

[0071] 3. Define signals: For each message, you need to define the signals contained in the message. Signals are the data portion of a message that describes the meaning, length, location, etc. of a specific piece of information.

[0072] 4. Define signal properties: Define properties for each signal, such as physical units, minimum and maximum values, scaling factors, etc. These properties help to interpret signal values ​​and display and process them correctly.

[0073] 5. Define sending and triggering conditions: Determine the message sending time and triggering conditions. This includes the message sending cycle and triggering events (such as the satisfaction of specific conditions).

[0074] 6. Export the CAN Communication Matrix: After completing the above definitions, you can use a CAN matrix editing tool to export a CAN communication matrix file. This file can be a text file in a specific format (such as DBC) and contains definitions of all nodes, messages, and signals in the network. It is important to note that the process of creating a CAN communication matrix needs to be defined based on the specific application and requirements. Some engineers may use specialized CAN tools and editors to create and edit the CAN communication matrix, while others may use custom scripts or programming languages ​​to generate the CAN communication matrix.

[0075] In one embodiment, the above step S102 generates an initial signal table file containing the names of the signals to be modeled based on application development requirements, including:

[0076] Extract the signal characteristic parameters to be modeled based on the actual SWC modeling needs and system configuration requirements;

[0077] generating a standardized signal name list according to the signal characteristic parameters;

[0078] Automatically fill the standardized signal name list into a preset signal configuration table template to form a structured initial signal table file; the signal characteristic parameters in the document are configured to match the cycle time parameters of the CAN signal;

[0079] The signal characteristic parameters include: signal physical properties, data transmission direction, refresh frequency and associated control logic;

[0080] The signal configuration table template includes: a signal name column, a data type column, a communication cycle column and an associated SWC component column.

[0081] Optionally, generating a standardized signal name list according to the signal characteristic parameters includes:

[0082] Standardize non-standard signal names;

[0083] Verify the correspondence between signal names and SWC function definitions;

[0084] Generates a unique signal naming convention that includes a version identifier.

[0085] In one embodiment, the configuration of the automated processing script in step S103 includes:

[0086] Read the generated matrix file, extract the signal name and cycle time parameters, and construct the first key-value pair data structure;

[0087] Read the generated initial signal table file, extract the signal name, and construct a second key-value pair data structure;

[0088] By traversing the signal names of the second key-value pair data structure and performing feature comparison with the first key-value pair data structure, when a name match is detected, the corresponding cycle time parameter in the first key-value pair is injected into the second key-value pair.

[0089] Optionally, the key value of the first key-value pair data structure is defined as {signal name: cycle time}; the initial key value of the second key-value pair data structure is defined as {signal name: empty value}, and is updated to {signal name: cycle time} after data matching.

[0090] In the above embodiment, the automated processing script is developed in Python and is obtained by engineering construction using the PyCharm integrated development environment; the obtained automated processing script is used to record operation trajectory information; the automated processing script is deployed in a continuous integration environment and is configured to automatically trigger full-process processing when an input file update is detected, and send a processing result notification via an email server;

[0091] The operation trace information includes input file hash value verification records, data matching process logs, parameter modification history tracking and output file digital signatures.

[0092] In the above embodiment, the automated processing script includes a data matching engine that uses a two-way matching verification mechanism and generates an error log file when a signal name match fails;

[0093] The two-way matching verification mechanism includes:

[0094] Data injection is performed based on the principle of exact matching of signal names;

[0095] The injected cycle time parameters are checked for compliance with the communication protocol; the compliance check includes: data type verification, value range verification, and deviation detection between the cycle time and the preset value of the communication matrix.

[0096] In one embodiment, the output format of the updated signal table file in step S104 is in xlsx format, and includes the following metadata fields: signal name, original cycle time, post-match cycle time, matching status flag, and last updated timestamp;

[0097] The matching status flag adopts three-state logic: 0-no match, 1-successful match, 2-partial match.

[0098] In one embodiment, the method further includes: when it is detected that there are multiple candidate cycle time values ​​for the signal with the same name, executing the following priority strategy:

[0099] The first priority is defined as adopting the parameters marked as mandatory period in the communication matrix;

[0100] The second priority is defined as using parameters with the smallest deviation from the preset period in the application layer requirement document;

[0101] The third priority is defined as parameter values ​​that are confirmed using human intervention.

[0102] By applying the method of the present embodiment, the task of manually matching the CAN signal cycle time, which originally took several hours or even longer, can be completed by waiting for a few minutes after calling the automated script, greatly improving development efficiency while also avoiding errors that may be caused by manual operation.

[0103] It is understood that the technical solution of the present invention shown in the following embodiment 1 includes the following contents:

[0104] Example 1:

[0105] In this embodiment, a specific ECU software development project in an automotive electronic control system is taken as an example to illustrate the specific implementation process of the method for quickly finding the periodic signal time of the present invention.

[0106] First, based on the network design requirements of the automotive electronic control system, developers use professional CAN matrix editing tools (such as CANoe) to export a matrix file (assuming the file name is "CAN_Matrix_File.xlsx"). This file contains the detailed communication rules and signal information between each node in the entire CAN network, including CAN signals transmitted between multiple ECUs. Each signal has its corresponding key attributes such as name, data type, and transmission cycle time.

[0107] At the same time, application developers determine the list of CAN signals that need to be modeled based on the SWC modeling and configuration requirements of the specific ECU in the project. They then fill these signal names into an Excel spreadsheet file (assuming the file name is "Signal_Table.xlsx"). This Excel spreadsheet file only contains the signal names and does not yet have the corresponding cycle time information.

[0108] Next, the developer invokes an automated script project developed using Python syntax. This automated script project is created in the PyCharm IDE development environment and has pre-programmed functions such as file parsing, data structure creation, and data matching.

[0109] The automated script first parses the "CAN_Matrix_File.xlsx" file by parsing the .xlsx file. Using Python libraries like pandas, it reads the data from the file, extracts key information such as the CAN signal names and corresponding cycle times, and stores it in a predefined matrix file (for example, "can_matrix_dict"). The key of the file is the CAN signal name, and the value is the corresponding cycle time value and other related attribute information.

[0110] At the same time, the "Signal_Table.xlsx" file filled out by the application professional developer is parsed. The signal name data in the table is also read using tools such as pandas and stored in another signal table file (for example, named "signal_table_dict"). At this time, the cycle time value corresponding to each signal name in the file is temporarily empty, waiting for subsequent matching and improvement operations.

[0111] After generating the two files, the system iterates through each signal name in the signal table file, searching the matrix file for signals with the same name. For each signal with a matching name found in the matrix file, the corresponding cycle time value is retrieved from the matrix file and assigned to the corresponding cycle time value in the signal table file, thus automatically matching and improving the signal cycle times.

[0112] Finally, save the data in the signal table file with completed Cycle time information to a new Excel file (for example, named "Completed_Signal_Table.xlsx") and output it to professional application developers. Developers can then open this output table file and view the exact Cycletime value corresponding to each CAN signal that needs to be modeled. Then, based on this information, they can model the SWC signals, create the corresponding Runnable, and accurately set the signal's time attributes to ensure that communication between SWCs can proceed according to the correct cycle, thereby improving the quality and reliability of the entire automotive electronic control system software.

[0113] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0114] Based on the same inventive concept, embodiments of the present application also provide a system for automatically matching CAN signal cycle times. The implementation solution provided by this system is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the system for automatically matching CAN signal cycle times provided below can be found in the aforementioned method for automatically matching CAN signal cycle times, and will not be further elaborated here. It should be understood that the description of the method above also applies to the description of the system.

[0115] In one embodiment, a system for automatically matching the cycle time of a CAN signal is also provided. The embodiments of the present invention are described below with reference to the accompanying drawings. Figure 2As shown, the system specifically includes:

[0116] The first generating module 210 is used to generate a matrix file containing CAN network communication rules using a CAN matrix editing tool; the matrix file at least includes a signal name, a corresponding cycle time parameter, and communication identification information;

[0117] The second generating module 220 is used to generate an initial signal table file containing the names of the signals to be modeled based on application development requirements;

[0118] An automation script configuration module 230 is used to configure an automation processing script based on the matrix file and the initial signal table file;

[0119] The file output module 240 is used to output an updated signal table file containing complete cycle time parameters through an automated processing script; the updated signal table file is used to support software component modeling.

[0120] It is worth noting that although only some basic functional modules are disclosed in the embodiment of the present invention, it does not mean that the composition of the present system is limited to the above basic functional modules. On the contrary, what this embodiment wants to express is that on the basis of the above basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the existing technology to form an infinite number of embodiments or technical solutions. In other words, this system is open rather than closed. Just because this embodiment only discloses individual basic functional modules, it cannot be considered that the scope of protection of the claims of the present invention is limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above devices are described in terms of functions, which are divided into various units and modules. Of course, when implementing the present invention, the functions of each unit and module can be implemented in the same or one or more software and / or hardware.

[0121] Example 2:

[0122] This embodiment further illustrates the working principle and effect of the system for automatically matching CAN signal cycle time of the present invention in practical applications.

[0123] The system for automatically matching the CAN signal cycle time of the present invention mainly includes a first generation module, a second generation module, an automatic script configuration module and a file output module.

[0124] The first and second generation modules involve network developers and application developers using corresponding tools and methods to export the matrix file and initial signal table file, respectively. For example, after completing the configuration and debugging of the CAN network, the network developer uses the export function of the CAN matrix editing tool to generate a standard matrix file. Application developers, based on the SWC design requirements, select the signals to be modeled in the modeling development tool and export their names to an Excel spreadsheet file.

[0125] The automation script configuration module usually accepts a simple user interface button or command line instruction. Developers click the button or enter the instruction to start the automation script, thereby triggering the operation process of the entire device:

[0126] Parsing is performed separately for matrix files and initial signal table files. In practical applications, different parsing strategies and algorithms can be used based on the file format and content characteristics to ensure efficient and accurate extraction of the required data information. For example, for matrix files, it may be necessary to parse multi-layered nested data structures to obtain detailed signal information; for initial signal table files, it may only be necessary to read specific columns to obtain signal name data.

[0127] This also involves building key-value data structures, namely the CAN communication matrix file and signal table file; these are crucial data structures for the entire device's data matching functionality. In practice, Python's file data type facilitates the creation and manipulation of these data structures, leveraging the file's fast search and update capabilities to improve data matching efficiency.

[0128] When performing data matching, various algorithms can be used to optimize matching speed and accuracy. For example, signal names in the CAN communication matrix file can be preprocessed to create indexes or employ data structures such as hash tables to more quickly find corresponding signal names during the matching process. Furthermore, signal names in the signal table file can be verified and cleaned to avoid matching errors caused by inconsistent signal name formats.

[0129] Finally, when using the file output module to output the improved signal table file, different file formats and save paths can be selected according to actual needs to ensure that the output file can be easily used by professional application developers and can be well compatible and connected with subsequent modeling development tools.

[0130] In practical applications, the system provided by the embodiments of the present invention can be integrated into existing workflows for automotive electronic control system software development, seamlessly integrating with commonly used development tools and platforms. For example, an automation script can be embedded into a plug-in for a modeling and development tool. This allows developers to automatically match CAN signal cycle times during SWC modeling with a single click within the tool. The matching results can then be directly applied to the SWC signal modeling process, further streamlining the development process and improving efficiency.

[0131] The system provided by the embodiments of the present invention can quickly and accurately match the correct cycle time values ​​for a large number of CAN signals in a short period of time in most automotive electronic control system software development projects. As an automated tool, it automatically matches the cycle time of CAN signals based on the application's professionally filled CAN signal table file and the CAN communication matrix file, fully utilizing the existing development environment to help software developers reduce time and effort and improve development efficiency. This effectively solves the problems of low efficiency and high error rates encountered in previous manual matching processes, providing strong technical support and assurance for automotive electronic control system software development.

[0132] At the same time, the application also proposes an electronic device.

[0133] In one embodiment, the electronic device may be a terminal, and its internal structure is shown in FIG. Figure 3 As shown. The electronic device includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication), or other technologies. When the computer program is executed by the processor, it implements any one of the methods from S101 to S104. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or a key, trackball, or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad, or mouse.

[0134] Those skilled in the art will understand that Figure 3The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0135] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0136] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. 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.

[0137] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0139] 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 method for automatically matching the cycle time of a CAN signal, characterized in that: The following steps are involved: Generate a matrix file containing CAN network communication rules using a CAN matrix editing tool; the matrix file at least includes a signal name, a corresponding cycle time parameter, and communication identification information; Based on application development requirements, generate an initial signal table file containing the names of the signals to be modeled; Configure automated processing scripts based on the matrix file and the initial signal table file; Output updated signal table files containing complete cycle time parameters through automated processing scripts; The update signal table file is used to support software component modeling.

2. The method according to claim 1, characterized in that The generation of an initial signal table file containing the names of the signals to be modeled based on the application development requirements includes: Extract the signal characteristic parameters to be modeled based on the actual SWC modeling needs and system configuration requirements; generating a standardized signal name list according to the signal characteristic parameters; Automatically fill the standardized signal name list into a preset signal configuration table template to form a structured initial signal table file; the signal characteristic parameters in the document are configured to match the cycle time parameters of the CAN signal; The signal characteristic parameters include: signal physical properties, data transmission direction, refresh frequency and associated control logic; The signal configuration table template includes: a signal name column, a data type column, a communication cycle column and an associated SWC component column; Generating a standardized signal name list according to the signal characteristic parameters includes: Standardize non-standard signal names; Verify the correspondence between signal names and SWC function definitions; Generates a unique signal naming convention that includes a version identifier.

3. The method according to claim 1, characterized in that The configuration of the automated processing script includes: Read the generated matrix file, extract the signal name and cycle time parameters, and construct the first key-value pair data structure; Read the generated initial signal table file, extract the signal name, and construct a second key-value pair data structure; By traversing the signal names of the second key-value pair data structure and performing feature comparison with the first key-value pair data structure, when a name match is detected, the corresponding cycle time parameter in the first key-value pair is injected into the second key-value pair.

4. The method according to claim 3, characterized in that The key value of the first key-value pair data structure is defined as {signal name: cycle time}; the initial key value of the second key-value pair data structure is defined as {signal name: empty value}, and is updated to {signal name: cycle time} after data matching.

5. The method according to claim 4, characterized in that The automated processing script is developed in Python and is constructed through engineering in the PyCharm integrated development environment. The obtained automated processing script is used to record operation trajectory information. The automated processing script is deployed in a continuous integration environment and is configured to automatically trigger full-process processing when an input file update is detected, and send a processing result notification via an email server. The operation trace information includes input file hash value verification records, data matching process logs, parameter modification history tracking and output file digital signatures.

6. The method according to claim 5, characterized in that The automated processing script includes a data matching engine that uses a two-way matching verification mechanism and generates an error log file when a signal name match fails; The two-way matching verification mechanism includes: Data injection is performed based on the exact matching principle of signal names; The injected cycle time parameters are checked for compliance with the communication protocol; the compliance check includes: data type verification, value range verification, and deviation detection between the cycle time and the preset value of the communication matrix.

7. The method according to claim 1, characterized in that The output format of the update signal table file is xlsx format, which contains the following metadata fields: signal name, original cycle time, matched cycle time, matching status identifier and last updated timestamp; The matching status flag adopts three-state logic: 0-no match, 1-successful match, 2-partial match.

8. The method according to claim 1, characterized in that The method further includes: when detecting that there are multiple candidate cycle time values ​​for the signal with the same name, executing the following priority strategy: The first priority is defined as adopting the parameters marked as mandatory period in the communication matrix; The second priority is defined as using parameters with the smallest deviation from the preset period in the application layer requirement document; The third priority is defined as parameter values ​​that are confirmed using human intervention.

9. A system for automatically matching CAN signal cycle time, characterized in that: include: A first generating module is used to generate a matrix file containing CAN network communication rules through a CAN matrix editing tool; the matrix file at least includes a signal name, a corresponding cycle time parameter and communication identification information; The second generation module is used to generate an initial signal table file containing the names of the signals to be modeled based on application development requirements; Automation script configuration module, used to configure automation processing scripts based on matrix files and initial signal table files; A file output module is used to output an updated signal table file containing complete cycle time parameters through an automated processing script; The update signal table file is used to support software component modeling.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor. at least one processor to execute, so that the at least one processor can execute the method according to any one of claims 1 to 8.