Automatic point burying method and device, equipment and storage medium

By parsing the design documents of the intelligent cockpit drive layer, log control and instrumentation configuration files are generated, and log management components are used to automatically perform log instrumentation, which solves the problems of low coverage and easy errors in existing technologies, and achieves efficient log management and testing.

CN121722639APending Publication Date: 2026-03-24FIBOCOM AUTO SOFTWARE INC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, the integration test logs for the intelligent cockpit drive layer rely on manual operation, resulting in low coverage and a high risk of errors.

Method used

By parsing the design documents of the intelligent cockpit drive layer, basic function information is extracted, and log control configuration files and instrumentation function configuration files are generated. Log management and instrumentation are then automatically performed using the log management component.

Benefits of technology

It improved the coverage of log tracking points, reduced errors caused by manual operations, and improved the efficiency and accuracy of integration testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121722639A_ABST
    Figure CN121722639A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic point burying method and device, equipment and a storage medium, and relates to the technical field of computers.The method comprises the steps that a design document of an intelligent cabin driving layer is analyzed, and basic function information in the design document is extracted; generating a log control configuration file and a burying point function configuration file of an intelligent cabin driving layer based on the basic function information; generating a log management component of an intelligent cabin driving layer according to the log control configuration file; and performing automatic point burying on the function definition code snippets to be subjected to point burying based on the log management component and the point burying function configuration file. The log management component can be generated according to the log control configuration file of the intelligent cabin driver layer, and automatic point burying is performed on the function based on the log management component and the point burying function configuration file of the intelligent cabin driver layer, so that the problem that a log point burying method in the prior art depends on manual operation; the coverage rate is not high; and errors are easy to occur.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and particularly relates to an automatic burying point method, device, equipment and storage medium. BACKGROUND

[0002] With the continuous development of intelligent cockpit technology, the integration test of its driving layer has become an important link to ensure system stability and reliability. The intelligent cockpit system usually involves multiple functional modules, such as display, audio, sensor, etc., and the coordinated work of these modules depends on the efficient operation of the driving layer. Therefore, when the driving layer is integrated tested, accurate log recording is particularly important.

[0003] Currently, the integration test log burying point of the intelligent cockpit driving layer mainly relies on manual operation. Specifically, the developer can manually identify the external interface and key internal functions of the driving layer, and manually insert log burying points into these functions. However, manual burying cannot guarantee the coverage of the burying function, and is prone to missing integration test logs, and the error rate of manually burying logs in functions is high. SUMMARY

[0004] The main purpose of the present application is to provide an automatic burying point method, device, equipment and storage medium, which aims to solve the technical problems that the log burying point method in the prior art relies on manual operation, has low coverage and is prone to errors.

[0005] To achieve the above-mentioned purpose, the present application provides an automatic burying point method, which comprises: analyzing the design document of the intelligent cockpit driving layer, and extracting the function basic information in the design document; generating a log control configuration file and a burying function configuration file of the intelligent cockpit driving layer based on the function basic information; generating a log management component of the intelligent cockpit driving layer according to the log control configuration file, the log management component being used for log management in the integration test of the intelligent cockpit driving layer; automatically burying point definition code segments based on the log management component and the burying function configuration file.

[0006] In an embodiment, the step of generating a log control configuration file and a burying function configuration file of the intelligent cockpit driving layer based on the function basic information comprises: generating a log control configuration file of the intelligent cockpit driving layer based on the function basic information and a preset log control configuration file template; generating a burying function configuration file of the intelligent cockpit driving layer based on the function basic information and a preset burying function configuration file template.

[0007] In an embodiment, the step of generating the log control configuration file of the intelligent cockpit driving layer based on the function basic information and the preset log control configuration file template comprises: determining all log control nodes defined in the preset log control configuration file template; obtaining log control content corresponding to each log control node in the function basic information; mapping and filling the log control content to the log control nodes to generate the log control configuration file of the intelligent cockpit driving layer.

[0008] In an embodiment, the step of generating the log management component of the intelligent cockpit driving layer according to the log control configuration file comprises: parsing the log control configuration file to extract log control node information in the log control configuration file; generating a header file and a source file of the log management component based on the log control node information; compiling the header file and the source file to generate the log management component of the intelligent cockpit driving layer.

[0009] In an embodiment, the step of automatically performing the point-in-time logging on the function definition code segment to be logged based on the log management component and the point-in-time logging function configuration file comprises: determining a target file path according to the point-in-time logging function configuration file, the target file path being a path of a file where a function is defined; obtaining a function definition file according to the target file path, and inserting a header file statement of the log management component into the function definition file; in a case where the insertion is completed, determining a function definition code segment to be logged from the function definition file; automatically performing the point-in-time logging on the function definition code segment to be logged based on a preset point-in-time logging insertion rule.

[0010] In an embodiment, the header file statement defines a point-in-time logging start macro and a point-in-time logging end macro; the step of automatically performing the point-in-time logging on the function definition code segment to be logged based on the preset point-in-time logging insertion rule comprises: inserting the point-in-time logging start macro at an entry position of the function definition code segment to be logged based on the preset point-in-time logging insertion rule; inserting the point-in-time logging end macro at an exit position of the function definition code segment to be logged to complete the automatic point-in-time logging on the function definition code segment to be logged.

[0011] In one embodiment, the step of parsing the design document of the intelligent cockpit drive layer and extracting basic function information from the design document includes: Determine the document template format corresponding to the design document of the intelligent cockpit drive layer; Determine the document parsing rules corresponding to the design document based on the document template format; The design document is parsed according to the document parsing rules to extract basic function information from the design document.

[0012] Furthermore, to achieve the above objectives, this application also proposes an automatic data embedding device, the device comprising: The information extraction module is used to parse the design document of the intelligent cockpit drive layer and extract the basic information of the functions in the design document; The configuration file generation module is used to generate the log control configuration file and the instrumentation function configuration file of the intelligent cockpit drive layer based on the basic information of the function. The component generation module is used to generate a log management component for the intelligent cockpit drive layer according to the log control configuration file. The log management component is used to manage logs during the integration test of the intelligent cockpit drive layer. The automatic event tracking module is used to automatically track event points based on the log management component and the event tracking function configuration file, specifically the code snippet defining the function to be tracked.

[0013] In addition, to achieve the above objectives, this application also proposes an automatic data tracking device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the automatic data tracking method as described above.

[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the automatic data collection method described above.

[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the automatic data collection method described above.

[0016] This application provides an automatic logging method. It discloses parsing the design document of the intelligent cockpit driver layer and extracting basic function information from the document; generating a log control configuration file and a logging function configuration file for the intelligent cockpit driver layer based on the basic function information; generating a log management component for the intelligent cockpit driver layer based on the log control configuration file, which is used for log management during integration testing of the intelligent cockpit driver layer; and automatically logging the code snippets defining the functions to be logged based on the log management component and the logging function configuration file. Compared to existing technologies where logging for integration testing of the intelligent cockpit driver layer relies on manual identification of the driver layer's external interfaces and key internal functions, this application solves the technical problems of existing logging methods relying on manual operation, having low coverage, and being prone to errors, because it can generate a log management component based on the intelligent cockpit driver layer's log control configuration file and automatically log functions based on the log management component and the logging function configuration file. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating an embodiment of the automatic data tracking method of this application. Figure 2 This is a diagram illustrating the basic information of the functions in the automatic data collection method of this application; Figure 3 This is a flowchart illustrating Embodiment 2 of the automatic data embedding method of this application; Figure 4 This is a structural diagram of the log control configuration file in the automatic data logging method of this application; Figure 5 This is a structural diagram of the configuration file for the automatic data tracking method in this application; Figure 6 This is a structural diagram of the log management component in the automatic data logging method of this application; Figure 7 This is a structural diagram of the header file of the log management component in the automatic data logging method of this application; Figure 8 This is a structural diagram of the source files of the log management component in the automatic data logging method of this application; Figure 9 This is a flowchart illustrating Embodiment 3 of the automatic data embedding method of this application; Figure 10 This is a diagram illustrating the overall architecture of the automatic data tracking method in this application. Figure 11 This is a flowchart illustrating the overall process of the automatic data tracking method in this application. Figure 12 This is a schematic diagram of the module structure of the automatic data collection device according to an embodiment of this application; Figure 13 This is a schematic diagram of the device structure of the hardware operating environment involved in the automatic data embedding method in the embodiments of this application.

[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0023] The main solution of this application embodiment is as follows: parsing the design document of the intelligent cockpit driver layer and extracting the basic function information in the design document; generating a log control configuration file and a data entry function configuration file for the intelligent cockpit driver layer based on the basic function information; generating a log management component for the intelligent cockpit driver layer based on the log control configuration file, the log management component being used for log management in the integration test of the intelligent cockpit driver layer; and automatically adding data entry points to the code snippets defining the functions to be included based on the log management component and the data entry function configuration file.

[0024] Because existing technologies rely on manual identification of external interfaces and key internal functions of the driver layer for log recording in the integrated test of the intelligent cockpit driver layer, they cannot guarantee coverage and have a high error rate.

[0025] This application provides a solution that can generate a log management component based on the log control configuration file of the intelligent cockpit driver layer, and automatically add logging points to functions based on the log management component and the logging function configuration file of the intelligent cockpit driver layer, thereby solving the technical problems of existing log logging methods that rely on manual operation, have low coverage, and are prone to errors.

[0026] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone; or an electronic device, automatic event tracking device, or automatic event tracking system including an automatic event tracking device, etc. The following description uses an automatic event tracking system (hereinafter referred to as the system) as an example to illustrate this embodiment and the following embodiments.

[0027] Based on this, the embodiments of this application provide an automatic data collection method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the automatic data tracking method of this application.

[0028] In this embodiment, the automatic data embedding method includes steps S10 to S40: Step S10: Parse the design document of the intelligent cockpit drive layer and extract the basic information of the functions in the design document.

[0029] It should be understood that the aforementioned intelligent cockpit drive layer can be a software component in the intelligent cockpit system used to manage and control hardware devices (such as displays, cameras, audio systems, etc.). It is used to realize the interaction between hardware devices and upper-layer applications, and to ensure the normal operation and functional realization of hardware devices.

[0030] It is understood that the aforementioned design document can be a detailed technical document describing the functions, module structure, interface definitions, and specific function implementations of the intelligent cockpit drive layer. It can be a Markdown file, a Word document, or other formats, and this embodiment does not impose any limitations on this. In this embodiment, the design document typically includes a software overview design and detailed design, and covers detailed information on all functional units and related functions of the system.

[0031] It should be noted that the basic information about the function mentioned above can be the detailed information about the function found in the design document. In this embodiment, refer to... Figure 2 , Figure 2 This is a diagram illustrating the basic information of the functions in the automatic data tracking method of this application. For example... Figure 2 As shown, basic function information may include, but is not limited to, product characteristics, functional units, and function definitions. The function definition may include: function design ID, function name, the functional unit to which the function belongs, and the function definition file path. Specifically, the function design ID can refer to the function's unique identifier; the function name can refer to the function's specific name; the functional unit to which the function belongs is the functional unit to which the function belongs (such as initialization, diagnostics, etc.); and the function definition file path can refer to the file path where the function definition is located.

[0032] Further, step S10 includes: determining the document template format corresponding to the design document of the intelligent cockpit drive layer; determining the document parsing rules corresponding to the design document according to the document template format; parsing the design document according to the document parsing rules, and extracting basic function information from the design document.

[0033] It should be understood that the aforementioned document template format can be a standardized form of the structure and content of a design document, which specifies the way or rules for organizing and presenting function information. In this embodiment, the document template format may include: document name format, chapter structure, function definition format, tags and comments, etc., wherein the document name format can be the file name of the design document, which usually follows specific naming rules; the chapter structure can be the specific structure of each chapter in the design document, for example, each chapter may contain multiple subsections, and each subsection corresponds to a functional unit; the function definition format can be the presentation form of the function definition, such as a table, which may include information such as function name, function ID, implementation file path, line number, etc.; tags and comments can refer to the identification information in the design document used to instruct parsing tools to extract information.

[0034] It should be noted that the document parsing rules mentioned above can be specific extraction logic defined according to the document template format, used to extract basic information about functions from the design document. These rules may include, but are not limited to, chapter identification rules, table parsing rules, field mapping rules, and data validation rules. Specifically, chapter identification rules can use regular expressions or other text matching techniques to identify chapter titles. Table parsing rules can identify the start and end positions of a table, extract each row of data, and parse it into key-value pairs (such as field and value). Field mapping rules can map fields in the table to attributes of basic function information; for example, function ID maps to function_id; function name maps to function_name; implementation file path maps to file_path; and line number maps to line_number. Data validation rules can verify whether the extracted data conforms to the expected format, such as checking whether the function ID conforms to a specific naming rule and whether the line number is a number.

[0035] In its implementation, the system first performs structural analysis on the design document of the intelligent cockpit drive layer. This analysis determines the document's chapter structure, function definition table format, naming conventions, and chapter title format. Based on this information, a document template format is defined. For example, the document name format might be defined as: XX Project_XX Product Features_Software Overview / Detailed Design_VX.X; the chapter structure is defined as: each chapter title begins with ###, and the functional unit name is enclosed in parentheses; the function definition table format is defined as: a fixed table structure containing fields and values. Then, the system can formulate document parsing rules based on the document template format, including chapter recognition rules, table parsing rules, field mapping rules, and data validation rules. Subsequently, the system can read the text content of the design document and use the chapter recognition rules to extract chapter titles and functional unit names. Within each chapter, the table parsing rules can be used to extract detailed function information. The extracted fields are then mapped to attributes of the function's basic information, and the extracted function information is saved as a structured file (such as a JSON file).

[0036] It should be noted that this embodiment utilizes the standardized template and predefined parsing rules of the intelligent cockpit driver layer design document to directly extract function-related information. This ensures that the information extracted from the design document is accurate and error-free, enabling the function information in the design document to be directly mapped to the event logs required for integration testing. This helps ensure the consistency between integration testing and the design document.

[0037] Step S20: Generate the log control configuration file and the embedded function configuration file of the intelligent cockpit drive layer based on the basic information of the function.

[0038] It should be noted that the aforementioned log control configuration file can be a configuration file used to define log control logic and parameters. In this embodiment, the log control configuration file can be a structured file (usually in JSON format), which can define: a global log control node, a feature-level control node, a functional unit-level control node, a function-level control node, and a log switch instruction mapping, etc. The global log control node is used to control the on / off state of the global log; the feature-level log control node is used to control the log on / off state of specific features (such as Camera, Audio, etc.); the functional unit-level log control node is used to control the log on / off state of specific functional units (such as initialization, diagnosis, etc.); the function-level log control node is used to control the log on / off state of specific functions; and the log switch instruction mapping is used to define how to dynamically adjust the log on / off state through file nodes.

[0039] It should be understood that the above-mentioned tracking function configuration file can be a configuration file used to record the basic information of the function. In this embodiment, the tracking function configuration file can be a structured file (usually in JSON format), which can contain the basic information of the function, such as function ID, function name, characteristics, functional units, definition file path and line number, etc. This embodiment does not impose any restrictions on this.

[0040] In practical applications, the system can first define templates for log control configuration files and event tracking function configuration files. These templates can contain placeholders for later replacement with specific function information. After obtaining the design document of the intelligent cockpit driver layer, basic function information can be extracted from the design document. Based on this basic function information, the placeholders in the log control configuration file template and event tracking function configuration file template are filled in, ultimately generating the log control configuration file and event tracking function configuration file for the intelligent cockpit driver layer.

[0041] Step S30: Generate a log management component for the intelligent cockpit drive layer according to the log control configuration file. The log management component is used for log management during the integration test of the intelligent cockpit drive layer.

[0042] It should be noted that the aforementioned log management component can be a software component used to manage and control the integrated test logs of the intelligent cockpit drive layer. By providing multi-level log control nodes and standardized log macro definitions, it can achieve efficient log management and dynamic control. In this embodiment, the log management component can consist of a header file and source files. The header file is used to define log macros, structures, and global variables; the source files are used to implement the specific functions of the log module, including initialization, dynamic control, and log output.

[0043] In practical applications, the log control configuration file defines the log control logic, including global, feature-level, functional unit-level, and function-level control nodes. The system can parse the log control configuration file to obtain the structure and parameters of the log control, and generate header and source files based on this information. For example, it can dynamically generate definitions in the header file based on the information in the configuration file, including the structure of the log management component, log macros, and global variables. Then, the system can compile the generated header and source files into a loadable module file, i.e., the log management component. This component can then be loaded at system startup or via command-line tools to implement log tracking.

[0044] Step S40: Automatically add data points to the code snippet defining the function to be added based on the log management component and the data point configuration file.

[0045] It should be understood that the code snippet defining the function to be tracked can be the source code portion of a function in the intelligent cockpit driver layer that requires log recording. In this embodiment, the code snippet defining the function to be tracked is usually stored in a specific file, and each function has its own start and end positions. The process of automatically tracking the function involves inserting log macros (such as LOG_START and LOG_END) into the definitions of these functions so that logs are recorded when the function is executed.

[0046] In practical applications, when performing logging, the system can read the logging function configuration file to determine the specific location of the function definition based on the information in the configuration file (such as function name, file path, and line number). It then uses the log management component to insert the `sit_log.h` statement, locates the code snippet defining the function to be logged, inserts the `LOG_START` macro at the first line of the function definition, and inserts the `LOG_END` macro at all return points (return statements) of the function to complete automatic logging. Additionally, if the function's return type is `void`, the `LOG_END` macro is inserted at the end of the function. Afterward, the system can save the code with the inserted logging macros to a file, ensuring that the modified code can be compiled and run correctly. `sit_log.h` provides the definitions of logging macros (such as `LOG_START` and `LOG_END`) and the log control interface (used to dynamically adjust the logging on / off state at runtime).

[0047] This embodiment provides an automatic logging method. The method discloses parsing the design document of the intelligent cockpit driver layer and extracting basic function information from the design document; generating a log control configuration file and a logging function configuration file for the intelligent cockpit driver layer based on the basic function information; generating a log management component for the intelligent cockpit driver layer based on the log control configuration file, which is used for log management during integration testing of the intelligent cockpit driver layer; and automatically logging the code snippets defining the functions to be logged based on the log management component and the logging function configuration file. Compared to existing technologies where logging for integration testing of the intelligent cockpit driver layer relies on manual identification of the driver layer's external interfaces and key internal functions, this embodiment solves the technical problems of existing logging methods relying on manual operation, having low coverage, and being prone to errors because it can generate a log management component based on the intelligent cockpit driver layer's log control configuration file and automatically log functions based on the log management component and the logging function configuration file.

[0048] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 , Figure 3This is a flowchart illustrating the second embodiment of the automatic data tracking method of this application.

[0049] In this embodiment, step S20 includes steps S201 to S202: Step S201: Generate the log control configuration file for the intelligent cockpit drive layer based on the basic information of the function and the preset log control configuration file template.

[0050] Further, step S201 includes: determining all log control nodes defined in the preset log control configuration file template; obtaining the log control content corresponding to each log control node in the basic information of the function; mapping and filling the log control content to each log control node to generate the log control configuration file of the intelligent cockpit drive layer.

[0051] It should be noted that the aforementioned preset log control configuration file template can be a structured file template that defines the initial state and configuration of all log control nodes in the intelligent cockpit drive layer. The configuration may include the log on / off state, log level, log output path, etc. This embodiment does not impose any restrictions on this.

[0052] It should be noted that the aforementioned log control nodes can be hierarchical structures defined in a preset log control configuration file for controlling log output. These nodes may include, but are not limited to, global log control nodes, feature-level control nodes, functional unit-level control nodes, and function-level control nodes.

[0053] It should be understood that the above-mentioned log control content can be specific configuration information associated with each log control node, including: log switch status: whether logging is enabled, log level: the level of detail of the log (such as DEBUG, INFO, WARN, ERROR), log output path: the storage location of the log records, and other related parameters: such as log format, sampling rate, etc.

[0054] In practical applications, the system first determines the structure of the log control nodes (including the control node structure of global, feature, functional unit and function) and the log switch instruction mapping defined in the preset log control configuration file template. Then, based on the feature, functional unit content and function information extracted from the design document, the system replaces the placeholders in the log control configuration file template with specific information to obtain the log control configuration file.

[0055] In this embodiment, refer to Figure 4 , Figure 4 This is a structural diagram of the log control configuration file in the automatic data logging method of this application. (Example:) Figure 4As shown, the log control configuration file is designed to achieve multi-level, fine-grained control of the intelligent cockpit's drive layer logs. This structure organizes log control nodes using a multi-level JSON format and dynamically adjusts the log's on / off state through control commands. Specifically, the log control configuration file can adopt a multi-level JSON format, divided into several levels: global, feature, functional unit, and function. The global level controls the on / off state and log level of all logs; the feature level controls specific features (such as Camera and Audio); the functional unit level controls specific functional units (such as initialization and playback); and the function level controls specific functions. This hierarchical structure allows for progressively refined log control from the global level to specific functions, providing high flexibility and configurability. A control node refers to a configuration point defined in the log control configuration file for controlling log output. Each control node contains the log's on / off state and log level, and can be categorized into global SIT logs, feature SIT logs, functional unit SIT logs, and function SIT logs. Control commands refer to commands that dynamically adjust the log control node (e.g., file nodes), allowing for dynamic modification of the log's on / off state and log level at runtime. In this embodiment, control commands are categorized into global SIT switches, feature SIT switches, functional unit SIT switches, and function SIT switches. Global SIT switches dynamically control the global log's on / off state; feature SIT switches dynamically control the log's on / off state for specific features; functional unit SIT switches dynamically control the log's on / off state for specific functional units; and function SIT switches dynamically control the log's on / off state for specific functions. In the log control configuration file, a multi-level JSON structure and control nodes jointly define the log's initial state and configuration. Through control commands, users can dynamically adjust these configurations at runtime, thereby achieving flexible log management.

[0056] Step S202: Generate the embedding function configuration file for the intelligent cockpit drive layer based on the basic function information and the preset embedding function configuration file template.

[0057] It should be understood that the aforementioned preset embedding function configuration file template can be a structured file template that defines information about all functions in the intelligent cockpit drive layer, including fields such as function ID, function name, characteristics, functional unit, implementation file path and line number. This embodiment does not impose any restrictions on this.

[0058] In practical applications, the system can determine the defined fields of the tracking function configuration file template, including the function name, function design ID, associated characteristic, associated functional unit, and definition file path. Based on the basic function information extracted from the design document, the system then fills in the fields of the tracking function configuration file template to obtain the tracking function configuration file. (Refer to...) Figure 5 , Figure 5 This is a structural diagram of the configuration file for the automatic tracking function in this application. (Example:) Figure 5 As shown, the configuration file for the tracking function can contain information such as function name, function design ID, attribute, functional unit, and definition file path.

[0059] Further, step S30 includes: parsing the log control configuration file and extracting the log control node information in the log control configuration file; generating the header file and source file of the log management component based on the log control node information; and compiling the header file and the source file to generate the log management component of the intelligent cockpit drive layer.

[0060] It should be noted that the above-mentioned log control node information can be extracted from the log control configuration file and is used to control log output configuration data.

[0061] It's understandable that the header file (sit_log.h) and source file (sit_log.c) of the log management component can be parts of the log management component; these two files together define the structure and functionality of the log management component. In practical applications, refer to... Figure 6 , Figure 6 This is a structural diagram of the log management component in the automatic data logging method of this application. (See diagram below.) Figure 6 As shown, after generating `sit_log.h` and `sit_log.c`, they can be compiled into a loadable module file (such as `sit_log.ko`), which is the log management component. This component can then be loaded during system startup or module loading, making it part of the system and enabling dynamic management and control of logs. The header file of the log management component defines declarations of log macros, log control structures, and global variables. These macros and structures are used to insert log records into the code and dynamically control log output at runtime. The source file defines the specific logic for log management, including the initialization of log control nodes (containing global / feature / functional unit / function control nodes), the implementation of the dynamic log control interface, and the log output functionality.

[0062] It should be noted that, referring to Figure 7 , Figure 7This is a structural diagram of the header file for the log management component in the automatic event tracking method of this application. (See diagram below.) Figure 7 As shown, the header file (sit_log.h) of the log management component defines an information structure (including characteristic information, functional unit information, function information, and enablement), an information array (including characteristic array, functional unit array, and function array for convenient subsequent traversal and processing), function switch macros, and event logging macros. The characteristic structure can contain characteristic abbreviations, a list of functional units under that characteristic, and the number of functional units. The functional unit structure can contain functional unit abbreviations, a list of functions under that functional unit, and the number of functions. The function information structure can contain function ID, function name, and whether it is enabled. The function switch macro indicates whether the function is enabled; if the value of the atomic variable corresponding to the function ID is 1, it indicates that logging for that function is enabled. The event logging macro can contain LOG_START and LOG_END, used to insert logs at function entry and exit points. In this embodiment, the system can define corresponding structures and arrays based on the characteristics, functional units, and function information in the log control configuration file, and define log macros and global variables to generate the header file of the log management component.

[0063] It should be noted that, referring to Figure 8 , Figure 8 This is a structural diagram of the source files for the log management component in the automatic event tracking method of this application. For example... Figure 8 As shown, the source file (sit_log.c) of the log management component consists of three parts: an initialization module, a module exit handling module, and a module defining control node read / write operations. The initialization module primarily creates global control file nodes, feature control file nodes, functional unit control file nodes, and function control file nodes, and initializes feature, functional unit, and function arrays according to the feature-functional unit-function relationships in the log control configuration file. The module exit handling module removes control file nodes and releases memory. The module defining control node read / write operations is the core part, mainly used for parsing received control commands, global node read / write processing, and feature control node, functional unit control node, and function control node write processing.

[0064] In this embodiment, the log control configuration file defines the log control logic, including global log on / off, feature-level log on / off, functional unit-level log on / off, and the log on / off status of specific functions. This control logic allows for flexible control of log output at different levels. Simultaneously, the log control configuration file defines multi-level log control nodes, enabling testers to dynamically adjust the log output granularity according to testing needs. For example, when testing a specific functional unit, only the logs for that functional unit can be enabled, while unnecessary logs can be disabled in other scenarios.

[0065] In this embodiment, a method is disclosed for generating a log control configuration file for the intelligent cockpit driver layer based on basic function information and a preset log control configuration file template; and for generating a tracking function configuration file for the intelligent cockpit driver layer based on basic function information and a preset tracking function configuration file template. Since this embodiment can generate log control configuration files and tracking function configuration files based on basic function information and preset templates, it achieves automated generation of configuration files, reduces the error rate caused by manual operation, and thus improves development efficiency.

[0066] Based on the first and / or second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 9 , Figure 9 This is a flowchart illustrating the third embodiment of the automatic data tracking method of this application.

[0067] In this embodiment, step S40 includes steps S401 to S404: Step S401: Determine the target file path according to the embedded function configuration file, where the target file path is the path of the file containing the function definition.

[0068] It should be noted that the above target file path can be the path to the source code file where the function definition is located. This path is usually explicitly specified in the instrumentation function configuration file and is used to locate the specific function definition file.

[0069] Step S402: Obtain the function definition file according to the target file path, and insert the header file statement that introduces the log management component into the function definition file.

[0070] It is understandable that the function definition file mentioned above can be a source code file containing the specific implementation of the function, which includes the function definition and implementation code.

[0071] It should be understood that the above header file statements can be instructions inserted into the function definition file to include the header file of the logging management component. By inserting the header file statement that includes the logging management component into the function definition file, it can be ensured that the function definition file can use the logging macros and functions provided by the logging management component.

[0072] Step S403: After insertion is complete, determine the function definition code segment to be embedded from the function definition file.

[0073] Step S404: Automatically add logging points to the code snippet defining the function to be logged based on the preset logging point insertion rules.

[0074] It should be noted that the aforementioned preset logging rules can be predefined rules used to guide the insertion of logging macros in function definitions. These rules can include: entry logging macros, exit logging macros, and specific point logging macros. An entry logging macro can refer to a logging macro inserted at the function entry point to record the start of function execution; an exit logging macro can refer to a logging macro inserted at the function exit point to record the end of function execution; and a specific point logging macro can refer to a logging macro inserted at a specific location within the function (such as before or after a critical operation) to record intermediate states. In this embodiment, the preset logging rules may include, but are not limited to: inserting a LOG_START macro at the function entry point; inserting a LOG_END macro at each return point of the function; for void type functions, inserting a LOG_END macro at the end of the function; and inserting a LOG_DEBUG macro before or after critical operations of the function.

[0075] In practical applications, the system can read and parse the configuration file of the tracking functions, extract the target file path for each function, and then read the corresponding function definition file based on the target file path. It then inserts the `#include "sit_log.h"` statement at the beginning of the function definition file; if the statement already exists in the file, the insertion is skipped. Next, the system can locate the specific function definition position in the function definition file and, according to preset tracking log insertion rules, insert log macros at the entry and exit points of the function definition. Finally, the file content after inserting the log macros is saved back to the original file, thus achieving automatic tracking of function definition code snippets.

[0076] Furthermore, the header file statement defines a start macro and an end macro for the event tracking log; step S404 includes: based on preset event tracking log insertion rules, inserting the start macro at the entry position of the code segment defining the function to be tracked; and inserting the end macro at the exit position of the code segment defining the function to be tracked, so as to complete the automatic event tracking of the code segment defining the function to be tracked.

[0077] It should be noted that the aforementioned logging start macro can be inserted at the function entry point to record the start of function execution. It is typically defined as LOG_START and includes the function name or other relevant information. The entry point of the code snippet in the function definition to be tracked can refer to the beginning of the function body within the function definition.

[0078] It should be noted that the aforementioned logging end macro can be a logging macro inserted at the function exit point to record the end of function execution. It is typically defined as LOG_END and includes the function name and other relevant information. The exit position of the function definition code snippet to be tracked can refer to the end of the function body in the function definition. Furthermore, for functions with return values, the exit position can also include the locations of all return statements.

[0079] In this embodiment, refer to Figure 10 , Figure 10 This is a diagram illustrating the overall architecture of the automatic data tracking method in this application. Figure 10 As shown, the automatic event tracking method of this application can include three parts: generating a configuration file, generating a log management file, and automatic event tracking. In the configuration file generation stage, the system parses the design document according to the parsing rules, extracts the basic function information, and then generates the event tracking function configuration file and the log control configuration file based on the basic function information, the event tracking function configuration file template, and the log control configuration file template. In the log management component generation stage, the system parses the generated log control configuration file, extracts the log control information, and generates the log management component by combining it with the log management component code template. In the automatic event tracking stage, the system parses the event tracking function configuration file and automatically tracks events for the functions using pre-integrated event tracking rules.

[0080] In the specific implementation, refer to Figure 11 , Figure 11 This is a flowchart illustrating the overall process of the automatic data tracking method described in this application. Figure 11As shown, firstly, the system can parse the design document, extracting its features, functional units, and basic function information. Based on this information, along with the log control configuration file template and the instrumentation function configuration file template, it generates the log control configuration file and the instrumentation function configuration file. Then, the system can combine the log control information in the log control configuration file with the `sit_log.h` and `sit_log.c` templates of the log management component to generate the log management component `sit_log.ko`. Simultaneously, the system can use automated tools (such as Python scripts) to read and parse the instrumentation function configuration file, obtaining detailed information for each function, including the path to the function definition file. It then opens the function definition file and uses the log management component to insert `sit_log.h`, allowing the system to insert the logging macro `LOG_START` at the beginning of the function's entry point and the logging macro `LOG_END` at the function's exit point. Additionally, if the function's return type is `void`, the `LOG_END` macro can be inserted at the end of the function, ultimately obtaining the completed driver layer code. Finally, the system can save the completed driver layer code to a new file or directly overwrite the original file to ensure that the modified code can be compiled and run correctly.

[0081] In this embodiment, the method of determining the target file path based on the function configuration file, wherein the target file path is the path of the file containing the function definition; obtaining the function definition file based on the target file path, and inserting the header file statement for introducing the log management component into the function definition file; after the insertion is completed, determining the function definition code segment to be tracked from the function definition file; and automatically tracking the function definition code segment to be tracked based on preset tracking log insertion rules. Since this embodiment can automatically insert tracking logs into the function definition using preset tracking log insertion rules, it can ensure that the execution process of each function is recorded, thereby reducing the error rate of manual tracking, improving tracking efficiency, and ensuring the coverage of the tracking functions.

[0082] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the automatic data tracking method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0083] This application also provides an automatic data collection device; please refer to [reference needed]. Figure 12 The automatic data embedding device includes: Information extraction module 10 is used to parse the design document of the intelligent cockpit drive layer and extract the basic information of functions in the design document; The configuration file generation module 20 is used to generate the log control configuration file and the embedded function configuration file of the intelligent cockpit drive layer based on the basic information of the function. The component generation module 30 is used to generate a log management component for the intelligent cockpit drive layer according to the log control configuration file. The log management component is used to manage logs during the integration test of the intelligent cockpit drive layer. The automatic event tracking module 40 is used to automatically track event points based on the log management component and the event tracking function configuration file, specifically the code snippet defining the function to be tracked.

[0084] The automatic logging device provided in this application, employing the automatic logging method described in the above embodiments, can solve the technical problems of existing log logging methods that rely on manual operation, have low coverage, and are prone to errors. Compared with the prior art, the beneficial effects of the automatic logging device provided in this application are the same as those of the automatic logging method provided in the above embodiments, and other technical features in the automatic logging device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0085] This application provides an automatic data tracking device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the automatic data tracking method in Embodiment 1 above.

[0086] The following is for reference. Figure 13 The diagram illustrates a structural schematic of an automatic tracking device suitable for implementing embodiments of this application. The automatic tracking device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 13 The automatic data tracking device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.

[0087] like Figure 13As shown, the automatic data tracking device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the automatic data tracking device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the automatic tracking device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show automatic tracking devices with various systems, it should be understood that implementing or having all of the systems shown is not required. More or fewer systems may be implemented alternatively.

[0088] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0089] The automatic tracking device provided in this application, employing the automatic tracking method described in the above embodiments, can solve the technical problem of automatic tracking. Compared with the prior art, the beneficial effects of the automatic tracking device provided in this application are the same as those of the automatic tracking method provided in the above embodiments, and other technical features of the automatic tracking device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0090] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0091] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0092] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the automatic data collection method in the above embodiments.

[0093] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0094] The aforementioned computer-readable storage medium may be included in the automatic data tracking device; or it may exist independently and not be assembled into the automatic data tracking device.

[0095] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the automatic event tracking device, the automatic event tracking device performs the following actions: parses the design document of the intelligent cockpit driver layer and extracts basic function information from the design document; generates a log control configuration file and an event tracking function configuration file for the intelligent cockpit driver layer based on the basic function information; generates a log management component for the intelligent cockpit driver layer based on the log control configuration file, the log management component being used for log management during the integration testing of the intelligent cockpit driver layer; and automatically tracks event points based on the log management component and the event tracking function configuration file, specifically the code snippets defining the functions to be tracked.

[0096] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0097] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0098] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0099] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described automatic logging method. This solves the technical problems of existing log logging methods, which rely on manual operation, have low coverage, and are prone to errors. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the automatic logging method provided in the above embodiments, and will not be repeated here.

[0100] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. An automatic data point embedding method, characterized in that, The method includes: The design document of the intelligent cockpit drive layer is parsed to extract basic information about the functions in the design document. Based on the basic information of the function, generate the log control configuration file and the instrumentation function configuration file of the intelligent cockpit drive layer; A log management component for the intelligent cockpit drive layer is generated based on the log control configuration file. The log management component is used for log management during the integration test of the intelligent cockpit drive layer. Automatic event tracking is performed based on the log management component and the event tracking function configuration file to define the code snippet of the event tracking function.

2. The method as described in claim 1, characterized in that, The step of generating the log control configuration file and the instrumentation function configuration file of the intelligent cockpit drive layer based on the basic information of the function includes: The log control configuration file for the intelligent cockpit drive layer is generated based on the basic information of the function and the preset log control configuration file template. The configuration file for the smart cockpit drive layer is generated based on the basic information of the function and the preset function configuration file template.

3. The method as described in claim 2, characterized in that, The step of generating the log control configuration file for the intelligent cockpit drive layer based on the basic information of the function and the preset log control configuration file template includes: Identify all log control nodes defined in the preset log control configuration file template; Obtain the log control content corresponding to each log control node from the basic information of the function; The log control content is mapped and populated to each log control node to generate the log control configuration file for the intelligent cockpit drive layer.

4. The method as described in claim 1, characterized in that, The step of generating the log management component of the intelligent cockpit drive layer according to the log control configuration file includes: The log control configuration file is parsed to extract the log control node information from the log control configuration file; Generate the header and source files for the log management component based on the log control node information; The header file and the source file are compiled to generate the log management component of the intelligent cockpit drive layer.

5. The method according to any one of claims 1 to 4, characterized in that, The step of automatically adding tracking points to the code snippet defining the function to be tracked based on the log management component and the tracking function configuration file includes: The target file path is determined according to the function configuration file, where the target file path is the path of the file containing the function definition. Obtain the function definition file according to the target file path, and insert the header file statement that introduces the log management component into the function definition file; Once the insertion is complete, determine the code snippet of the function definition to be embedded from the function definition file; Automatically add logging points to the code snippet defining the function to be logged based on preset logging rules.

6. The method as described in claim 5, characterized in that, The header file defines a macro to start and a macro to end the event log; the step of automatically adding event logs to the code snippet defining the function to be event-tracked based on preset event log insertion rules includes: Based on the preset logging insertion rules, the logging start macro is inserted at the entry point of the code snippet defining the function to be logged. Insert the event log end macro at the exit position of the code snippet defining the function to be event tracked, so as to complete the automatic event tracking of the code snippet defining the function to be event tracked.

7. The method according to any one of claims 1 to 4, characterized in that, The step of parsing the design document of the intelligent cockpit drive layer and extracting the basic information of the functions in the design document includes: Determine the document template format corresponding to the design document of the intelligent cockpit drive layer; Determine the document parsing rules corresponding to the design document based on the document template format; The design document is parsed according to the document parsing rules to extract basic function information from the design document.

8. An automatic data collection device, characterized in that, The device includes: The information extraction module is used to parse the design document of the intelligent cockpit drive layer and extract the basic information of the functions in the design document; The configuration file generation module is used to generate the log control configuration file and the instrumentation function configuration file of the intelligent cockpit drive layer based on the basic information of the function. The component generation module is used to generate a log management component for the intelligent cockpit drive layer according to the log control configuration file. The log management component is used to manage logs during the integration test of the intelligent cockpit drive layer. The automatic event tracking module is used to automatically track event points based on the log management component and the event tracking function configuration file, specifically the code snippet defining the function to be tracked.

9. An automatic data collection device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the automatic data collection method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the automatic data collection method as described in any one of claims 1 to 7.