A signal automatic generation method and system, electronic equipment and storage medium
By using an automatic signal generation method, the system analyzes the requirement and code signal sets, automatically identifies differences, and generates code. This solves the problems of signal definition consistency and maintenance costs in automotive electronic software development, and achieves efficient and standardized signal management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA FAW CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-06-26
AI Technical Summary
In automotive electronic software development, manually writing signal definitions is inefficient, error-prone, leads to inconsistencies between requirements documents and code, results in high maintenance costs, and makes it difficult to achieve rapid iteration and automated deployment.
By using an automatic signal generation method, signal information from both the demand side and the code side is parsed to form a signal set. Set operations are then performed to identify differences and automatically generate code, ensuring consistency and standardization. A secure write strategy is adopted to avoid damaging user code.
It achieves consistency and standardization in signal definition throughout the process, reduces human error, improves development efficiency, reduces maintenance costs, and supports multi-module management and automatic updates.
Smart Images

Figure CN122285014A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive electronic software development, and in particular to automatic signal generation methods, automatic signal generation systems, electronic devices, storage media, and automotive electronic software development platforms. Background Technology
[0002] In current automotive electronic software development, signal definition management primarily relies on manual processes. Developers need to frequently switch between and copy and paste between requirements documents (such as Word and Excel files) and code files (such as C / C++ header files).
[0003] The existing technology mainly suffers from the following pain points:
[0004] High human error rate: When manually creating and maintaining signal definition files, problems such as spelling errors, incorrect data type definitions, duplicate definitions due to copying and pasting, and incorrect default value settings are very likely to occur.
[0005] High maintenance costs: As the project scales up, the number of signals grows exponentially. Manual maintenance is not only time-consuming and labor-intensive, but also causes a sharp decline in the maintainability of the codebase.
[0006] Consistency is difficult to guarantee: There is a tendency for the requirements document and the code implementation to become disconnected, which makes it difficult for the team to collaborate. It is also difficult to guarantee the consistency of signal definitions across different modules, and error detection is often delayed. Summary of the Invention
[0007] The purpose of this invention is to provide an automatic signal generation method, an automatic signal generation system, an electronic device, a storage medium, and an automotive electronic software development platform, thereby solving at least one of a number of technical problems.
[0008] Core technical issues: Manually writing signal definitions, signal enumerations, and structure code is inefficient and prone to errors; requirements documents and code are out of sync, resulting in missing signals, mismatched types, and non-standard naming; signal changes, additions, and deletions require manual maintenance, making it difficult to guarantee consistency; signals are scattered across multiple modules and files, making unified management and automatic updates difficult; manual maintenance is costly and time-consuming, failing to meet the development needs of rapid iteration and automatic deployment.
[0009] This invention provides the following solution:
[0010] According to a first aspect of the present invention, an automatic signal generation method is provided, based on text parsing. The automatic signal generation method includes:
[0011] Analyze the demand-side signal information to form the first signal set;
[0012] Analyze the signal information at the code end to form a second signal set;
[0013] Perform set operations on the first signal set and the second signal set to determine the difference set;
[0014] Code is automatically generated based on the difference set, and the generated code is securely written to the target file;
[0015] A report is generated based on the write results.
[0016] Furthermore, set operations include finding the difference, intersection, and union of sets, which are used to identify missing, conflicting, and redundant signals.
[0017] Furthermore, the parsing includes at least one of the following: regular expressions, keyword matching, and structured text parsing.
[0018] Furthermore, secure writing includes: writing only within a preset marked range, without modifying user-owned code.
[0019] Furthermore, code generation is based on preset templates.
[0020] Furthermore, the report includes: changes, modified locations, operation times, and a list of signal differences.
[0021] According to a second aspect of the present invention, an automatic signal generation system is provided, comprising:
[0022] The requirement analysis module is used to form the first set of signals;
[0023] The code parsing module is used to form the second signal set;
[0024] The difference calculation module is used to determine the difference set;
[0025] An automatic generation module is used to generate code based on the set of differences;
[0026] The secure write module is used to securely write code to the target file;
[0027] The reporting module is used to generate operation reports.
[0028] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0029] The memory stores a computer program, which, when executed by the processor, causes the processor to perform steps such as an automatic signal generation method.
[0030] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, comprising: storing a computer program executable by an electronic device, wherein when the computer program is run on the electronic device, the electronic device performs steps such as an automatic signal generation method.
[0031] According to a fifth aspect of the present invention, an automotive electronic software development platform is provided, comprising:
[0032] Electronic equipment used to implement steps such as automatic signal generation methods;
[0033] The processor runs programs, and when the program runs, it executes steps such as signal generation methods based on data output from electronic devices.
[0034] Storage medium used to store programs that, when running, perform steps such as automatic signal generation methods on data output from electronic devices.
[0035] The above solution achieves the following beneficial technical effects:
[0036] This application completely replaces manual writing of signal code, greatly improving development efficiency and reducing human error;
[0037] This application implements automatic synchronization of requirements documents and code signals, ensuring that signal definitions are consistent and standardized throughout the process;
[0038] This application uses set operations to automatically identify missing / conflicting signals, achieving accurate updates without redundancy or omissions;
[0039] This application uses safe interval insertion, which does not disrupt user-written code and significantly improves stability and security.
[0040] This application automatically completes the entire process of code generation, format specification, and version submission, achieving full automation of signal management;
[0041] This application aims to reduce the labor, time, and maintenance costs of automotive electronic software development, and improve the scalability and stability of the system. Attached Figure Description
[0042] Figure 1 This is a flowchart of an automatic signal generation method provided by one or more embodiments of the present invention.
[0043] Figure 2 This is a structural diagram of an automatic signal generation system provided by one or more embodiments of the present invention.
[0044] Figure 3 This is a block diagram of an electronic device structure for an automatic signal generation method provided in one or more embodiments of the present invention. Detailed Implementation
[0045] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] Figure 1 This is a flowchart of an automatic signal generation method provided by one or more embodiments of the present invention.
[0047] like Figure 1 The signal automatic generation method shown is based on text parsing and includes the following:
[0048] Step T1: Analyze the demand-side signal information to form the first signal set;
[0049] Step T2: Analyze the signal information at the code end to form a second signal set;
[0050] Step T3: Perform set operations on the first signal set and the second signal set to determine the difference set;
[0051] Step T4: Automatically generate code based on the difference set and securely write the generated code to the target file;
[0052] Step T5: Generate a report based on the writing results.
[0053] In this embodiment, set operations include: finding the difference, finding the intersection, and finding the union, which are used to identify missing signals, conflicting signals, and redundant signals.
[0054] In this embodiment, the parsing includes at least one of regular expressions, keyword matching, and structured text parsing.
[0055] In this embodiment, secure writing includes: writing only within a preset marked range without modifying the user's own code.
[0056] In this embodiment, the code is generated based on a preset template.
[0057] In this embodiment, the report includes: changes, modified locations, operation time, and a list of signal differences.
[0058] Specifically, the process involves parsing the requirements document to obtain a first set of signals; parsing the code file to obtain a second set of signals; performing set operations on the first and second set of signals to obtain a difference set; automatically generating code based on the difference set and performing secure insertion; and outputting a management report based on the generation and insertion results.
[0059] The parsing of the requirements document includes: extracting signal names, data types, constraints, and associated modules using at least one of the following methods: regular expressions, keyword matching, or structured text extraction.
[0060] The code file parsing process includes: traversing the .c, .h, and .hpp files in the project directory, identifying signal definition statements, and building a signal index library.
[0061] Set operations include performing at least one of the following operations on the first set of signals and the second set of signals: difference operation, intersection operation, and complement operation, in order to determine missing signals, redundant signals, and conflicting signals.
[0062] Automatic code generation includes: generating standard format code based on signal definition templates and inserting it within specified comment intervals.
[0063] Safe insertion includes: writing code only within the preset marked area, not modifying the user-written code area, and locking and validating the file before insertion.
[0064] The management report includes: a list of signal changes, a record of document modifications, an index of insertion locations, and error information and operation logs.
[0065] It also includes: performing syntax checks, conflict detection, and duplicate checks on the generated code, and performing version control commits after the checks pass.
[0066] It also includes: comparing the generated code with the original code, generating a visual comparison result and displaying it to the user.
[0067] It also includes: support for unified signal management across multiple projects, branches, and environments, and support for both incremental and full update modes.
[0068] Furthermore, in another embodiment, the signal automatic generation method based on engineering documents includes:
[0069] The requirements document is structured and parsed to obtain the set of requirements signals (the first set of signals).
[0070] The project code file is traversed and parsed to obtain the code signal set (second signal set);
[0071] A set comparison is performed between the demand signal set and the code signal set to obtain the difference signal set;
[0072] Standard code is automatically generated based on the set of differential signals, and the code is securely inserted into the project file;
[0073] Output a management report containing signal change information.
[0074] Requirements documents include at least one of the following: requirements specification documents, signal definition documents, and tabular requirements documents.
[0075] The project code files include at least one of the following: C language code files, C++ code files, and header files.
[0076] Structured parsing includes parsing using at least one of the following methods: regular expression matching, keyword extraction, and table parsing.
[0077] Set comparison includes calculating the difference, intersection, and complement between the demand signal set and the code signal set to determine missing signals, duplicate signals, and conflicting signals.
[0078] Automatically generating standard code includes: generating at least one of the following based on a preset code template: enumeration type definition, structure definition, and constant definition, which conform to engineering specifications.
[0079] Safe insertion includes: inserting code only within the preset marked area, without modifying the user's handwritten code area.
[0080] The default marker range is the range enclosed by the comment, including the range between / / AUTO BEGIN and / / AUTO END.
[0081] Safe insertion also includes: pre-insertion file existence verification, syntax verification, and duplicate verification.
[0082] The management report includes: a list of requirement signals, a list of code signals, a list of difference signals, insertion locations, modified files, and operation times.
[0083] It also includes: automatically submitting change information to a version control system, including at least one of Git and SVN.
[0084] Furthermore, in another embodiment, the automated management of automotive electronic software signal definitions includes the following steps:
[0085] A1: Parse the requirements document and extract signal names and attributes through keyword matching and regular expressions to form a structured set of requirements signals (first signal set).
[0086] A2: Load a predefined code style library, which includes signal naming rules, data type mapping relationships, and code generation templates;
[0087] A3: Traverse the project source code files and extract the signal definitions in the existing code using regular expressions to form a code signal set (second signal set).
[0088] A4: Perform set operations on the demand signal set and the code signal set to identify missing and conflicting signals;
[0089] A5: Based on the code specification library and the difference detection results, standard signal definition code is automatically generated and written to the source file through a secure insertion mechanism;
[0090] A6: Generate change reports and automatically perform version control commits.
[0091] In step A1, natural language processing or regular expressions are used to match the keywords Signal_Name and signal name to convert unstructured requirements into structured signal data with key-value pairs.
[0092] In step A2, the code style library is stored in JSON or XML format, including enumeration type definition templates and the mapping relationship between requirement types and code types.
[0093] In step A3, the .c and .h files are recursively scanned, and the signal names and corresponding values are extracted by matching the typedefenum structure using regular expressions.
[0094] The set operation in step A4 includes: Missing set = Demand signal set − Code signal set;
[0095] Conflict set = Demand signal set ∩ Signals with inconsistent attributes in the code signal set.
[0096] The safe insertion mechanism in step A5 is as follows: code is inserted only within the range marked / *USERCODEBEGINAutoGen* / and / *USERCODEENDAutoGen* / , and safe appending is performed before the enumeration terminator.
[0097] Step A5 performs file lock detection, syntax verification, and insertion position checks before generating code to avoid overwriting handwritten code.
[0098] The report generated in step A6 includes a list of missing signals, a list of conflict signals, modified file paths, generated lines of code and timestamps, and automatically calls Git to complete the version commit.
[0099] In this embodiment, set operations include: finding the difference, finding the intersection, and finding the union, which are used to identify missing signals, conflicting signals, and redundant signals.
[0100] In this embodiment, the parsing includes at least one of regular expressions, keyword matching, and structured text parsing.
[0101] This application may further include a pre-established signal uniqueness verification mechanism, which performs one of skipping, appending, or overwriting when the same signal is generated multiple times, with skipping being performed by default to avoid duplicate generation.
[0102] The safe insertion interval is pre-configured with interval boundaries, interval length, and insertion priority. When the interval is full or modified, it automatically appends to the end of the interval or switches to a backup insertion interval.
[0103] Before generating signal enumerations, structure names, or variable names, perform validity checks, including:
[0104] Duplicate name verification, system keyword conflict verification, automotive-grade naming convention verification, and data type validity verification.
[0105] Set comparison not only performs difference calculations but also equivalence checks, including:
[0106] Signals with the same name but different comments, the same name but different data types, or the same name but different enumeration values are all considered non-equivalent signals and will be updated.
[0107] It also includes an exception handling mechanism that automatically skips, downgrades, or throws an exception message when the input file is missing, the format is garbled, the signal is empty, or the path does not exist.
[0108] It also includes a version conflict handling mechanism, which automatically performs rollback, retry, or marks the conflict area and pauses writing when multiple people modify the code at the same time or when code submission fails.
[0109] The signal source is subject to a unique constraint, supporting only a single data source input and not supporting simultaneous input from multiple sources, in order to avoid multiple signal definitions and conflicts.
[0110] It also includes automatic signal numbering and increment value verification to ensure that the generated enumeration values are continuous, non-repeating, non-jumping, and non-conflicting.
[0111] It also includes pre-insertion validation, which automatically detects whether there are syntax errors, comment conflicts, or unclosed code blocks in the target area before inserting code.
[0112] It also includes automatic formatting after generation, unifying code indentation, comment format, number of blank lines, and symbol alignment to ensure consistent code style.
[0113] Figure 2 This is a structural diagram of an automatic signal generation system provided by one or more embodiments of the present invention.
[0114] like Figure 2 The automatic signal generation system shown includes:
[0115] The requirement analysis module is used to form the first set of signals;
[0116] The code parsing module is used to form the second signal set;
[0117] The difference calculation module is used to determine the difference set;
[0118] An automatic generation module is used to generate code based on the set of differences;
[0119] The secure write module is used to securely write code to the target file;
[0120] The reporting module is used to generate operation reports.
[0121] Specifically, the automatic signal generation system operates an automatic signal generation method, including:
[0122] The requirements document is structured and parsed to extract signal names, data types, and default values to form a set of requirements signals;
[0123] The source code files are scanned, and existing signal definitions are extracted to form a set of code signals;
[0124] Perform a set difference operation on the two sets to obtain the missing signal set and the conflict signal set;
[0125] Signal definition code is automatically generated according to preset code specifications and safely inserted into the specified comment area;
[0126] Generate change reports and automatically perform version control commits.
[0127] The requirements document is in Excel or Word format. The parsing process uses regular expressions or NLP keyword matching to extract signal entities.
[0128] The source code files include files with the .c and .h extensions, and are scanned using a recursive traversal method.
[0129] Set difference operations include:
[0130] Missing set = Demand signal set - Code signal set;
[0131] Conflict set = Demand signal set ∩ Code signal set of subsets with inconsistent attributes.
[0132] The pre-defined code specifications include signal naming rules, type mapping tables, and enumeration structure templates.
[0133] Safe insertion means inserting only within the comment range of / * USER CODE BEGIN AutoGen * / and / * USER CODE END AutoGen * / , without modifying user-written code.
[0134] Before insertion, three security checks are performed: file lock detection, syntax verification, and duplicate verification.
[0135] The automatically generated code includes:
[0136] Automatically assign increment values based on signal type;
[0137] Generate typedef enum struct code based on the template.
[0138] The change report includes: a list of missing signals, a list of conflicts, modified file paths, generated lines of code, and the operation time. Version control automatically calls Git to execute commits and generate commit records.
[0139] It is worth noting that although this system / device only discloses the above-mentioned modules / units, it does not mean that this system / device is limited to the above-mentioned basic functional modules. On the contrary, what this invention intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. It cannot be assumed that the scope of protection of the claims of this invention is limited to the above-disclosed basic functional modules just because this embodiment only discloses a few basic functional modules.
[0140] In one specific embodiment, an automatic signal definition detection and supplementation strategy is disclosed, including:
[0141] S1: Parsing of requirements documents and extraction of signal entities.
[0142] This step utilizes Natural Language Processing (NLP) technology or a regular expression engine to scan the upstream requirement document (such as Excel or Word), converting unstructured data into structured data. Specific implementation:
[0143] Feature matching rules: The system has a set of preset feature matching rules to search for rows or cells in the document that contain keywords such as "Signal_Name", "definition" or "signal name".
[0144] Regular expression application: Use the regular expression r'(SIGNAL_\w+)\s*[:=]\s*(.*)' to match signal names and attributes.
[0145] Data structuring: The extracted raw string is parsed into structured key-value pairs and stored in an in-memory list List_Req.
[0146] This step solves the problem that unstructured documents are difficult for machines to read directly, and makes the required data "machine-readable" and "machine-processable".
[0147] S2: Definition and Loading of Code Standards
[0148] This step establishes a standard signal definition library, clearly defining the standard format that different types of signals should have in the code. Specific implementation:
[0149] Standardized storage format: The specification library is stored in JSON or XML format, and includes signal naming rules, data type mapping, etc.
[0150] Template definition: Defines an enumeration type template: typedef enum {<Signal_Body>}<Enum_Name> ;
[0151] Type mapping table: Establishes a mapping relationship between "boolean" in the requirements and boolean_t, etc. in the code.
[0152] Example specification definition.
[0153] S3: Source code scanning and existing definition extraction
[0154] This step uses a script to recursively traverse the project's source code directory and extracts existing signal definitions through regular expression matching. Specific implementation:
[0155] Directory traversal: Recursively traverses all .c and .h files in the specified directory.
[0156] Regular expression matching:
[0157] Enumeration block matching: r'(typedef\s+enum\s*\{)([\s\S]*?)(\}\s*\w+\s*;)').
[0158] Signal extraction: r'(\w+)\s*=\s*(\w+)'.
[0159] Data storage: The extracted signal names and their values are stored in the actual defined set.
[0160] List_Code performance optimization: Use multi-threaded parallel processing of multiple files and use memory caching to avoid repeated scanning.
[0161] S4: Difference Detection Based on Set Operations
[0162] This step uses mathematical set operations to detect discrepancies between the requirements and the actual code. Specific algorithm:
[0163] Missing set calculation: Missing = List_Req - List_Code;
[0164] Conflict set calculation: Conflict = List_Req ∩ List_Code (used to detect attribute conflicts);
[0165] Numerical calculation algorithm: Automatically parses the maximum value already present in the code block and assigns an incrementing value to the new signal.
[0166] S5: Automated Code Generation and Secure Insertion
[0167] This step dynamically generates code strings based on the specification library and difference detection results, and inserts them into the source file using a security policy. Specific implementation:
[0168] Template population: Calls the corresponding code template based on the signal type.
[0169] Marker insertion method: Insert between / * USER CODE BEGIN AutoGen * / and / * USER CODE END * / ;
[0170] Positioning: Insert before the enumeration block terminator};
[0171] Safety check: Before insertion, check whether the target position is already occupied;
[0172] Error handling mechanisms: file locking detection, syntax error checking, and conflict resolution strategies.
[0173] S6: Report Generation and Version Control
[0174] This step records all change operations, providing complete audit trail capabilities. Specific functions:
[0175] Report generation: Generates detailed reports in text format.
[0176] Report content includes: a list of detected missing signals, the generated code line count file, modification path, operation timestamp, and version control integration for automatically calling Git commands to commit changes.
[0177] In this embodiment, the detection device includes a document structure adaptive parsing unit, which is configured to identify the metadata format of the source file and dynamically load the corresponding parser strategy, rather than a simple text search.
[0178] In this embodiment, the NLP parsing module uses a pre-trained language model to segment and extract features from unstructured text, and uses an attention mechanism to locate the dependency relationship between signal names and their attribute descriptions.
[0179] In this embodiment, the multi-threaded processing unit adopts a fragmented parallel processing strategy, dividing the file to be detected into several independent data blocks and allocating them to different threads; in the result aggregation stage, a mutex lock or lock-free queue mechanism is used to ensure the atomic writing of the memory list List_Code.
[0180] In this embodiment, the difference set operation is not only based on set operations of signal names, but also includes an attribute consistency verification subunit. This subunit constructs a multidimensional feature vector of the signal, calculates the Euclidean distance or cosine similarity between the requirement vector and the code vector, and marks it as 'attribute drift' rather than simply 'missing' when the difference exceeds a preset threshold.
[0181] In this embodiment, the syntax verification module integrates a static code analysis engine and is configured to extract abstract syntax tree nodes of the code; combined with a pre-set signal definition specification rule library, it performs traversal checks on the syntax structure, data type constraints, and naming conventions of the nodes.
[0182] In this embodiment, the automatic commit unit includes a version control environment pre-check module. Before making modifications, the device is configured to: 1. Verify the cleanliness of the working directory; 2. Automatically create isolated feature branches; 3. Perform conflict simulation detection after committing via a pre-commit hook to ensure the integrity of the codebase.
[0183] In this embodiment, the device generates a detection report containing full lifecycle audit information. The report includes: a snapshot of the code snippet before modification, the code snippet after modification, the type of difference (added / modified / deleted), the execution timestamp, and the digital signature of the operation subject, to support subsequent backtracking and rollback operations.
[0184] In this embodiment, the device further includes a signal semantic mapping unit. This unit maintains a signal semantic knowledge graph to identify signals that point to the same physical meaning under different naming conventions (e.g., mapping Veh_Spd to VehicleSpeed). The device determines the integrity of signals based on semantic similarity rather than simple string matching, thereby solving the signal definition alignment problem between heterogeneous systems.
[0185] Figure 3 This is a block diagram of an electronic device structure for an automatic signal generation method provided in one or more embodiments of the present invention.
[0186] like Figure 3 As shown, this application provides 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;
[0187] The memory stores a computer program that, when executed by a processor, causes the processor to perform steps of an automatic signal generation method.
[0188] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of an automatic signal generation method.
[0189] This application also provides an automotive electronics software development platform, including:
[0190] Electronic equipment, used to implement the steps of an automatic signal generation method;
[0191] The processor runs a program, and when the program runs, it executes the steps of a method that automatically generates signals from data output by an electronic device.
[0192] A storage medium used to store a program that, when running, executes a method for automatically generating signals in response to data output from an electronic device.
[0193] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0194] The electronic device comprises a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory. The operating system can be any one or more computer operating systems that control the electronic device through processes, such as Linux, Unix, Android, iOS, or Windows. Furthermore, in this embodiment of the invention, the electronic device can be a smartphone, tablet computer, or other handheld device, or a desktop computer, portable computer, or other electronic device; there is no particular limitation in this embodiment.
[0195] In this embodiment of the invention, the executing entity for electronic device control can be an electronic device itself, or a functional module within an electronic device capable of calling and executing a program. The electronic device can obtain the firmware corresponding to the storage medium. This firmware is provided by the supplier, and different storage media may have the same or different firmware; no limitation is made here. After obtaining the firmware corresponding to the storage medium, the electronic device can write this firmware into the storage medium; specifically, it burns the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology, and will not be elaborated upon in this embodiment of the invention.
[0196] Electronic devices can also obtain reset commands corresponding to the storage media. The reset commands corresponding to the storage media are provided by the supplier. The reset commands corresponding to different storage media can be the same or different, and no restrictions are imposed here.
[0197] At this time, the storage medium of the electronic device is a storage medium on which the corresponding firmware has been written. The electronic device can respond to the reset command corresponding to the storage medium on which the corresponding firmware has been written, thereby resetting the storage medium on which the corresponding firmware has been written according to the reset command. The process of resetting the storage medium according to the reset command can be implemented by existing technology and will not be described in detail in this embodiment of the invention.
[0198] For ease of description, the above devices are described separately by function as various units and modules. Of course, in implementing this application, the functions of each unit and module can be implemented in one or more software and / or hardware.
[0199] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined.
[0200] For the sake of simplicity, the method embodiments are 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.
[0201] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0202] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for automatically generating signals, characterized in that, The automatic signal generation method based on text parsing includes: Analyze the demand-side signal information to form the first signal set; Analyze the signal information at the code end to form a second signal set; Perform set operations on the first signal set and the second signal set to determine the difference set; Code is automatically generated based on the set of differences, and the generated code is securely written to the target file. A report is generated based on the write results.
2. The automatic signal generation method according to claim 1, characterized in that, The set operations include: finding the difference, finding the intersection, and finding the union, which are used to identify missing signals, conflicting signals, and redundant signals.
3. The automatic signal generation method according to claim 1, characterized in that, The parsing includes at least one of the following: regular expression-based parsing, keyword matching, and structured text parsing.
4. The automatic signal generation method according to claim 1, characterized in that, The secure writing includes writing only within a preset marked range without modifying the user's own code.
5. The automatic signal generation method according to claim 1, characterized in that, The code generation is based on a preset template.
6. The automatic signal generation method according to claim 1, characterized in that, The report includes: changes, modified locations, operation time, and a list of signal differences.
7. An automatic signal generation system, characterized in that, The automatic signal generation system includes: The requirement analysis module is used to form the first set of signals; The code parsing module is used to form the second signal set; The difference calculation module is used to determine the difference set; An automatic generation module is used to generate code based on the set of differences; The secure write module is used to securely write code to the target file; The reporting module is used to generate operation reports.
8. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory stores a computer program that, when executed by a processor, causes the processor to perform the steps of the automatic signal generation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, include: The device stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the automatic signal generation method as described in any one of claims 1 to 6.
10. An automotive electronic software development platform, characterized in that, include: An electronic device for implementing the steps of the automatic signal generation method as described in any one of claims 1 to 6; A processor that runs a program that, when the program is running, performs the steps of the signal automatic generation method as described in any one of claims 1 to 6 from data output by the electronic device. A storage medium for storing a program that, when running, performs the steps of the automatic signal generation method as described in any one of claims 1 to 6 on data output from an electronic device.