Automobile instrument indicating lamp configuration method and device, computer equipment and storage medium

By using Excel configuration tables and automated scripts to generate indicator configuration codes in the smart cockpit, the problems of low efficiency and insufficient adaptability of the smart cockpit instrument indicator light configuration in the existing technology are solved, and fast, accurate and flexible indicator light configuration is achieved. , improves development efficiency and reliability.

CN119233498APending Publication Date: 2024-12-31BEI DOU ZHI LIAN KE JI YOU XIAN GONG SI +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411243383.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing technology has inefficient efficiency, redundant code, complex maintenance, configuration consistency and reusability in the configuration and implementation of smart cockpit instrument indicator lights, and it is difficult to adapt to the diversified needs of different models and hardware platforms, resulting in development. Inefficient efficiency and insufficient market adaptability.

Method used

By configuring indicator attribute information in the preset Excel configuration table, obtaining automated scripts to generate regular expressions and function processing logic function codes, realizing automated configuration of indicators, using openpyxl and xlrd modules to read Excel tables, and automating script batches Process and generate code to reduce human errors and repetitive labor.

Benefits of technology

Significantly improves the development efficiency and project maintenance of automotive instrument indicators, reduces human errors and repeated labor, improves the overall efficiency and reliability of the indicator light display project in the smart cockpit, and adapts to the needs of different projects and is maintainable. sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233498A_ABST
    Figure CN119233498A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an automobile instrument indicator lamp configuration method and device, computer equipment and a storage medium. The method comprises the steps that indicator lamp attribute information is configured for the first time in an Excel configuration table according to preset configuration requirement information; obtaining an automatic script matched with the configuration demand information, wherein the automatic script comprises a first script and a second script; reading the Excel configuration table through a reading module in the first script; generating a function processing logic function code according to the indicator lamp attribute information and a source file template corresponding to the second script, and writing the function processing logic function code into the source file template to generate an indicator lamp configuration code; and configuring the indicator lamp configuration code in an indicator lamp function configuration table to generate a corresponding indicator lamp control signal. Through Excel table configuration and an automatic script, automatic configuration of underlying signal logic processing of the automobile instrument indicating lamp is realized, and rapid and accurate configuration of underlying signal logic processing of the automobile instrument indicating lamp is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for configuring an automobile instrument indicator light. Background Art

[0002] In the current field of automotive electronic technology research and development, the existing related technologies face a series of challenges in the configuration and implementation of smart cockpit instrument indicator lights. The manual coding method in the development process of indicator light control methods is not only inefficient but also prone to code duplication and redundancy, which directly leads to the bloated code base and the complexity of subsequent maintenance work. At the same time, due to the lack of effective configuration management, when the number of indicator lights increases or the functional requirements change, the difficulty of developing and maintaining the indicator light configuration code increases significantly, and its consistency and reusability are difficult to ensure, which is a major defect for fast iteration and diversified automotive electronic products. In addition, the configuration flexibility of the existing technology is insufficient, and it is difficult to adapt to the diverse needs of different models and hardware platforms, which limits the market adaptability and competitiveness of the product. In the process of application development, the configuration method of automotive instrument indicator lights is inefficient, and there are too many human errors in the development process, which makes the configuration process of smart cockpit instrument indicator lights urgently need to be optimized to improve configuration efficiency. Summary of the invention

[0003] The embodiments of the present application provide a method, apparatus, computer device and storage medium for configuring an automobile instrument indicator light, aiming to solve the problem of low efficiency in the development of configuration of multiple instrument indicator lights in an automobile smart cockpit.

[0004] In a first aspect, an embodiment of the present application provides a method for configuring an automobile instrument indicator light, which includes performing a first configuration of the attribute information of each indicator light in a preset Excel configuration table according to preset configuration requirement information; obtaining an automation script that matches the configuration requirement information, the automation script including a first script and a second script; running the first script to read the Excel configuration table through a reading module in the first script, and generating a regular expression based on the read table information; performing a second configuration of the indicator light attribute information according to the regular expression to generate a declaration definition of the indicator light processing function and write it into a header file template generated based on the first script; running the second script to read the indicator light attribute information that has been configured for the second time through the second script, and generating a function processing logic function code based on the indicator light attribute information and a source file template corresponding to the second script, and writing the function processing logic function code into the source file template to generate an indicator light configuration code; configuring the indicator light configuration code in the indicator light function configuration table to generate a corresponding indicator light control signal.

[0005] In a second aspect, an embodiment of the present application further provides an automobile instrument indicator light configuration device, which includes a first configuration unit, which is used to perform a first configuration of the attribute information of each indicator light in a preset Excel configuration table according to preset configuration requirement information; a script acquisition unit, which is used to obtain an automation script that matches the configuration requirement information, and the automation script includes a first script and a second script; a first running unit, which is used to run the first script to read the Excel configuration table through the reading module in the first script, and generate a regular expression according to the read table information; a second configuration unit, which is used to perform a second configuration of the indicator light attribute information according to the regular expression, so as to generate a declaration definition of the indicator light processing function and write it into a header file template generated based on the first script; a second running unit, which is used to run the second script, so as to read the indicator light attribute information that has been configured for the second time through the second script, and generate a function processing logic function code according to the indicator light attribute information and the source file template corresponding to the second script, and write the function processing logic function code into the source file template to generate the indicator light configuration code; a control unit, which is used to configure the indicator light configuration code in the indicator light function configuration table to generate a corresponding indicator light control signal.

[0006] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the above method is implemented when the processor executes the computer program.

[0007] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program includes program instructions, which can implement the above method when executed by a processor.

[0008] The embodiment of the present application provides a method, device, computer equipment and storage medium for configuring an automobile instrument indicator light. The method includes performing a first configuration of the attribute information of each indicator light in a preset Excel configuration table according to preset configuration requirement information; obtaining an automation script matching the configuration requirement information, the automation script including a first script and a second script; running the first script to read the Excel configuration table through a reading module in the first script, and generating a regular expression according to the read table information; performing a second configuration of the indicator light attribute information according to the regular expression to generate a declaration definition of the indicator light processing function and write it into a header file template generated based on the first script; running the second script to read the indicator light attribute information that has been configured for the second time through the second script, and generating a function processing logic function code according to the indicator light attribute information and a source file template corresponding to the second script, and writing the function processing logic function code into the source file template to generate the indicator light configuration code; configuring the indicator light configuration code in the indicator light function configuration table to generate a corresponding indicator light control signal. The automated configuration of the underlying signal logic processing of automobile instrument indicator lights is achieved through Excel spreadsheet configuration and automated scripts. The fast, accurate and flexible configuration of the underlying signal logic processing of automobile instrument indicator lights is achieved, which significantly improves development efficiency and project maintainability, while greatly reducing human errors and repetitive work, thereby improving the overall efficiency and reliability of the development of indicator light display projects in automobile smart cockpits. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0010] Figure 1 A flow chart of a method for configuring an automobile instrument indicator light provided in an embodiment of the present application;

[0011] Figure 2 A schematic diagram of a sub-process of a method for configuring an automobile instrument indicator light provided in an embodiment of the present application;

[0012] Figure 3 A schematic diagram of another sub-process of the method for configuring the automobile instrument indicator light provided in an embodiment of the present application;

[0013] Figure 4 A schematic block diagram of a vehicle instrument indicator light configuration device provided in an embodiment of the present application;

[0014] Figure 5 A schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0016] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0017] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0018] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0019] The embodiments of the present application provide a method, apparatus, computer equipment and storage medium for configuring an automobile instrument indicator light.

[0020] The executor of the automobile instrument indicator light configuration method may be the automobile instrument indicator light configuration device provided in the embodiment of the present application, or a computer device integrating the automobile instrument indicator light configuration device, wherein the automobile instrument indicator light configuration device may be implemented in hardware or software, the computer device may be a terminal or a server, and the terminal may be a smart phone, a tablet computer, a PDA, or a laptop computer, etc.

[0021] The automobile instrument indicator light configuration method is applied to Figure 5 In the computer device 500.

[0022] Figure 1 It is a flow chart of a method for configuring an automobile instrument indicator light provided in an embodiment of the present application, and the method includes the following steps S110-S160.

[0023] S110 , configuring attribute information of each indicator light for the first time according to preset configuration requirement information in a preset Excel configuration table.

[0024] The indicator light attribute information includes indicator light ID definition information, index number, usage flag, offline configuration permission, power-on self-test request, working power supply condition and CAN signal ID name.

[0025] S120: Acquire an automation script that matches the configuration requirement information, where the automation script includes a first script and a second script.

[0026] S130, running the first script to read the Excel configuration table through the reading module in the first script, and generating a regular expression according to the read table information.

[0027] S140. Perform a second configuration on the indicator light attribute information according to the regular expression to generate a declaration definition of the indicator light processing function and write it into a header file template generated based on the first script.

[0028] S150, run the second script to read the indicator light attribute information of the second configuration through the second script, and generate the function processing logic function code according to the indicator light attribute information and the source file template corresponding to the second script, and write the function processing logic function code into the source file template to generate the indicator light configuration code.

[0029] S160, configuring the indicator light configuration code in the indicator light function configuration table to generate a corresponding indicator light control signal.

[0030] Specifically, first, in the preset Excel configuration table, the system configuration management engineer configures the various attribute information of the indicator light for the first time according to the specific needs of the project. This includes but is not limited to the indicator light ID definition information, index number, usage flag (whether to enable the indicator light), offline configuration permission (whether to allow the indicator light to be turned off under specific conditions), power-on self-test request (whether the indicator light needs to be self-tested when the vehicle is powered on), working power supply conditions (power supply conditions required for the indicator light to work normally) and CAN signal ID name (CAN signal identifier associated with the indicator light). According to the configured indicator light attribute information, the corresponding automation script is obtained. These scripts are designed to convert configuration information into executable code, including a first script and a second script. The first script is responsible for reading the Excel configuration table and processing the configuration information, while the second script is responsible for generating the final code file.

[0031] Run the first script to read the Excel configuration table through the reading module in the first script. The reading modules are openpyxl module and xlrd module respectively. The script uses openpyxl module and xlrd module to read the data in the Excel configuration table. Through these modules, the script can access each cell in the table and generate corresponding regular expressions according to the information in the cell for subsequent configuration and code generation. Use the generated regular expression to configure the indicator light attribute information for the second time. The purpose of this configuration is to generate the declaration definition of the indicator light processing function and write these definitions into the header file template generated by the first script. This process ensures that each indicator light has corresponding processing logic and these logics can be correctly referenced by the project code. Then run the second script, which reads the indicator light attribute information after the second configuration. Combined with the source file template corresponding to the second script, the script generates the function processing logic function code. These codes will be written into the source file template to eventually form a complete indicator light configuration code. Finally, the generated indicator light configuration code is configured into the indicator light function configuration table. This process completes the generation of the indicator light control signal so that each indicator light can be correctly displayed and controlled according to its configuration information.

[0032] In a more specific implementation process, the intelligent driving system development engineer fills in the indicator light's ID definition, index number, usage flag and other attribute information in an Excel table according to project requirements. This step is performed manually to ensure the flexibility and adaptability of the configuration. Through standardized table configuration, the information entry process is simplified and human errors are reduced. The traditional hard coding method requires writing the configuration of each indicator light one by one, which is cumbersome and error-prone. According to the configuration requirements, select the appropriate automation script, including the first script for reading the configuration and the second script for generating code. The selection of automation scripts enables batch processing of the configuration process, improving work efficiency. It avoids repeated code writing and reduces development time and cost.

[0033] Using openpyxl and xlrd modules, the first script reads the indicator light attribute information in the Excel table and generates a regular expression. Automatically reading the configuration information ensures data consistency and accuracy. Manually reading and converting data is prone to errors, and the automated script improves the speed and reliability of data processing. According to the regular expression, the indicator light attribute information is configured for the second time, the declaration definition of the processing function is generated, and written into the header file template. The automatically generated code framework lays the foundation for subsequent function implementation. Manually writing function declarations is prone to omissions or errors, and the automated process reduces these risks.

[0034] The second script reads the configured indicator light attribute information and generates the function processing logic function code in combination with the source file template. The generated code can be used directly, which greatly shortens the development cycle. The traditional manual coding process is time-consuming and error-prone. The automated script improves the efficiency and accuracy of code generation. The generated indicator light configuration code is integrated into the indicator light function configuration table to generate the control signal. Finally, the automated configuration of the indicator light is realized, which can quickly respond to project changes. The traditional configuration method is difficult to adapt to frequent project changes, and the automated configuration improves the flexibility and maintainability of the system. Through a series of automated steps, this solution not only realizes the automation of the configuration of the automobile instrument indicator lights, but also improves the development efficiency, reduces the error rate, and makes the system more flexible and easy to maintain.

[0035] In summary, the automatic configuration of the underlying signal logic processing of the automobile instrument indicator lights through Excel table configuration and automated scripts has realized the fast, accurate and flexible configuration of the underlying signal logic processing of the automobile instrument indicator lights, significantly improved the development efficiency and project maintainability, and greatly reduced human errors and repetitive work, thereby improving the overall efficiency and reliability of the development of the indicator light display project in the intelligent cockpit of the car. In addition, the openpyxl module and the xlrd module are used to read the Excel configuration table, automatically generate regular expressions, and then generate the declaration definition and function processing logic function code of the indicator light processing function. By modifying the configuration information in the Excel table, the indicator light requirements of different projects can be quickly adapted, which improves work efficiency and project maintainability. Reducing repetitive coding work allows developers to devote more energy to the development of core functions. Automated scripts reduce the errors that may occur in manual coding and improve the reliability of the code. When the project requirements change, you only need to modify the Excel table configuration to quickly generate new indicator light control signals, which is convenient for system maintenance and upgrades. The automated script reduces labor costs and improves the overall efficiency of project development.

[0036] like Figure 2 As shown, in a more specific embodiment, executing method S110 further specifically includes executing steps S111 - S112 .

[0037] S111. Acquire function information and control logic information of the indicator light to be controlled in the configuration requirement information.

[0038] S112. Create a new working directory in Excel according to the indicator light attribute information and create a process format for indicator light control.

[0039] Specifically, engineers first need to clarify the specific functional requirements and control logic of each indicator light, which includes understanding the specific role, control method, trigger conditions, etc. of the indicator light in the vehicle. This ensures the accuracy and completeness of the configuration information, provides the necessary premise for subsequent automated configuration, and avoids configuration errors caused by unclear understanding of requirements. In Excel, create a new working directory based on the attribute information of the indicator light, and design a clear process format, which will guide how to fill in and organize the configuration data of the indicator light. The standardized working directory and process format make the configuration process more orderly and easy to manage and review. The traditional disordered configuration method is prone to information confusion, and the standardized process improves the efficiency and accuracy of the configuration. Through these two steps, the implementation of S110 becomes more specific and detailed, laying a solid foundation for the smooth progress of the entire automated configuration process. This implementation method ensures that the configuration of each indicator light is based on clear requirements and logic, thereby improving the reliability and efficiency of the entire system configuration.

[0040] According to the specific needs of different projects, the system configuration management engineer needs to configure the various attribute information of the indicator light in detail in the indicator light configuration table named `tt_configure_table.xlsx`. The following is the attribute information that needs to be filled in during the configuration process: Indicator light ID definition: assign a unique identifier to each indicator light. Indicator light ID index number: the index position of the indicator light in the system, usually used for the index of arrays or other data structures. Whether the indicator light is used: mark whether the indicator light is enabled in the current project. Whether the indicator light supports offline configuration: whether the indicator light supports being disabled under specific conditions. Whether the indicator light needs to be powered on and self-tested: whether the indicator light needs to perform self-test when the vehicle is powered on. Indicator light working power supply conditions: the power supply conditions required for the indicator light to work normally. The CAN signal ID name corresponding to the trigger of the indicator light: the name or ID of the CAN signal associated with the indicator light. The function algorithm logic corresponding to the trigger of the indicator light: the algorithm description of the indicator light display logic. Indicator light output value mode: the display mode of the indicator light, such as constant light, flashing, etc. After completing the filling of the configuration table, the engineer will run the automation script file of the present invention. After obtaining the configuration information, the script will automatically generate the declaration definition of the indicator light processing function and the function processing logic function code. The generated code will be written to the configuration header file and source file in the specified directory of the project code. When the project requirements change, engineers only need to update the indicator light configuration table without manually writing code. The automated script reduces repetitive coding work, allowing engineers to devote more energy to the development of core functions. The automated process reduces the errors that may occur in manual coding and improves the reliability of the code. Modifying the configuration table is simpler and safer than directly modifying the code, which facilitates the long-term maintenance and upgrade of the project. This method provides an efficient, flexible and reliable solution for the configuration of automotive instrument indicator lights, greatly improving the development efficiency and quality of automotive electronic systems.

[0041] like Figure 3 As shown, in a more specific embodiment, executing method S130 further specifically includes executing steps S131-S132.

[0042] S131, respectively load the indicator light attribute information in the Excel configuration table through the openpyxl module and the xlrd module in the reading module to obtain configuration sample data.

[0043] S132. Write a regular expression according to the configuration sample data.

[0044] Specifically, using the two Python modules openpyxl and xlrd, the first script loads the data in the Excel configuration table. openpyxl is used to read the latest format of the Excel file, while xlrd is used to read the old format. Through these two modules, the script can access each cell in the table, extract the attribute information of the indicator light and form the configuration sample data. It ensures that Excel files of different formats can be read correctly, improves the compatibility of the script, and avoids reading errors caused by incompatible Excel file formats. Once the configuration sample data is obtained, the script will write a regular expression based on this data. Regular expressions are used to match and parse specific string patterns to ensure that the format of the indicator light attribute information is correct. The use of regular expressions improves the accuracy of data verification and ensures the standardization of configuration information. It reduces configuration errors caused by incorrect data format and improves the processing efficiency and accuracy of the automated script. The implementation of S130 ensures that the indicator light attribute information read from the Excel table can be accurately parsed and processed, laying the foundation for the subsequent generation of the declaration definition and function processing logic function code of the indicator light processing function. Such an implementation method not only improves the automation of the configuration process, but also enhances the stability and reliability of the entire configuration process.

[0045] In a more specific embodiment, executing method S140 further specifically includes executing the steps:

[0046] Write the declaration definition of the indicator light processing function according to the configuration sample data to generate the corresponding header file template;

[0047] Write the declaration definition into the header file template and save it to the specified directory of the Excel configuration table.

[0048] Specifically, using the configuration sample data extracted from the Excel configuration table, the automation script will write the declaration definition of the indicator light processing function. These declaration definitions are part of the function interface, describing the function name, parameter type and return type, which is the basis for function implementation. The automatically generated function declaration provides a clear interface definition for the further implementation of the code. Manually writing function declarations is prone to errors, and the automation process improves the consistency and maintainability of the code. The written function declaration will be written into a header file template. This template is a predefined file structure for storing function declarations and other related macro definitions or type definitions. After writing, the script will save this header file to the specified directory where the Excel configuration table is located. The generation and preservation of the header file template facilitates the organization of the project code and subsequent compilation and linking. Traditional manual management of header files is prone to version control and file synchronization problems, and the automation process simplifies this process. Through these two steps, the implementation of S140 ensures that the declaration definition of the indicator light processing function can be correctly generated and organized into the project, which not only improves the efficiency of code generation but also ensures the consistency and readability of the code structure. Such an implementation method provides a basis for subsequent code implementation and system integration.

[0049] Preferably, in a more specific embodiment, executing method S150 further specifically includes executing the steps:

[0050] Parse the source file template to obtain source file structure information and source file operation requirement information;

[0051] Determine the placeholders and code blocks in the source file template according to the source file structure information;

[0052] Select based on placeholders and code blocks to determine where to insert the function code in the source file template;

[0053] Write corresponding function processing logic function code according to indicator light attribute information;

[0054] Insert the function processing logic function code into the source file template according to the insertion position;

[0055] Run the source file template to generate the complete indicator light configuration code.

[0056] The second script first parses the source file template to understand the structure of the file, including which parts are fixed framework codes and which parts are placeholders for inserting custom codes, ensuring that the custom codes can be accurately inserted into the correct position in the source file, avoiding program operation abnormalities caused by errors in the code insertion position. The script identifies the placeholders in the source file template, which are the places for the subsequent insertion of the function processing logic function code. It provides accurate position markers for automatic code insertion. Manual determination of the placeholder position is prone to errors, and the automation process improves accuracy. The script selects the appropriate insertion point based on the position of the placeholder and the definition of the code block. It ensures that each function processing logic function code is inserted into the correct position. Errors in the insertion position may cause the code to fail to execute correctly. The script writes the corresponding function processing logic function code based on the attribute information of the indicator light. The function code that matches the indicator light attribute is generated to ensure the correct implementation of the function. Manually writing function code is inefficient and prone to errors. The written function processing logic function code is inserted into the corresponding position of the source file template. The filling of the source file template is completed and a compilable source code file is generated. The manual code insertion process is cumbersome and prone to omissions or insertion errors. Finally, the script runs the source file template to generate the complete indicator light configuration code. A complete source code file that can be directly used for compilation is provided. The manual code integration process is complicated, and the automation process simplifies this step and improves development efficiency. Through these steps, S150 ensures that the functional processing logic of the indicator light can be efficiently and accurately integrated into the project, thereby greatly improving the automation and reliability of the configuration of the vehicle instrument indicator light.

[0057] Specifically, the script determines the storage path and file format of the indicator light function configuration table in the project to ensure that the configuration data can be correctly read and written. It ensures the correct import and export of configuration data. It avoids the inability to use the configuration data due to path or format errors. The structure of the configuration table is analyzed to determine the names and data types of each column in the table, which is crucial for subsequent data processing. It ensures the accuracy and consistency of the configuration data. The mismatch between the data column name and the data type will lead to data processing errors. According to the previously generated indicator light configuration code, the corresponding configuration data is generated in the configuration table. The configuration data that matches the code is generated to provide support for the control signal of the indicator light. Manual generation of configuration data is prone to errors, and the automation process improves efficiency. The generated configuration code is inserted into the preset positions of the configuration table, which are usually corresponding to specific indicators or functions. The configuration code is correctly placed in the configuration table for easy reading and use by the system. Manual insertion of configuration code is prone to errors, while the automation process improves accuracy and efficiency. Finally, the script integrates the configuration code and other data in the configuration table to generate the final control signal. The completion of the generation of the indicator light control signal provides a complete configuration for the function implementation of the indicator light. The manual data integration process is complex and prone to errors, and the automation process simplifies this step, improving development efficiency and reliability. Through these steps, S160 ensures that the indicator light configuration code can be correctly integrated into the indicator light function configuration table and can generate control signals for controlling the indicator lights, thus realizing the automation and intelligence of indicator light configuration.

[0058] Figure 4 1 is a schematic block diagram of a vehicle instrument indicator light configuration device provided by an embodiment of the present application. As shown in the figure, corresponding to the above vehicle instrument indicator light configuration method, the present application also provides a vehicle instrument indicator light configuration device 100. The vehicle instrument indicator light configuration device includes a unit for executing the above vehicle instrument indicator light configuration method, and the device can be configured in a desktop computer, tablet computer, laptop computer, etc. For details, please refer to Figure 4The automobile instrument indicator light configuration device 100 includes a first configuration unit 110, which is used to perform a first configuration of each indicator light attribute information in a preset Excel configuration table according to preset configuration requirement information; a script acquisition unit 120, which is used to acquire an automation script matching the configuration requirement information, and the automation script includes a first script and a second script; a first running unit 130, which is used to run the first script to read the Excel configuration table through a reading module in the first script, and generate a regular expression according to the read table information; a second configuration unit 140, which is used to perform a second configuration of the indicator light attribute information according to the regular expression, so as to generate a declaration definition of the indicator light processing function and write it into a header file template generated based on the first script; a second running unit 150, which is used to run the second script, so as to read the indicator light attribute information that has been configured for the second time through the second script, and generate a function processing logic function code according to the indicator light attribute information and a source file template corresponding to the second script, and write the function processing logic function code into the source file template to generate an indicator light configuration code; a control unit 160, which is used to configure the indicator light configuration code in the indicator light function configuration table to generate a corresponding indicator light control signal. More specifically, the device also includes an information acquisition unit, which is used to obtain the functional information and control logic information of the indicator light to be controlled in the configuration requirement information; and a format creation unit, which is used to create a new working directory in Excel and create a process format for indicator light control according to the indicator light attribute information.

[0059] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned automobile instrument indicator light configuration device and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.

[0060] The above-mentioned automobile instrument indicator light configuration device can be implemented in the form of a computer program. The computer program can be used in Figure 5 Runs on the computer device shown.

[0061] See also Figure 5 , which shows a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 can be a terminal or a server, wherein the terminal can be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server can be an independent server or a server cluster composed of multiple servers.

[0062] The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0063] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a method for configuring an automobile instrument indicator light.

[0064] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0065] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for configuring an automobile instrument indicator light.

[0066] The network interface 505 is used to communicate with other devices over the network. Figure 5 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0067] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0068] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0069] Therefore, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the following steps:

[0070] Perform a first configuration of each indicator light attribute information in a preset Excel configuration table according to preset configuration requirement information; obtain an automation script matching the configuration requirement information, the automation script including a first script and a second script; run the first script to read the Excel configuration table through the reading module in the first script, and generate a regular expression according to the read table information; perform a second configuration of the indicator light attribute information according to the regular expression to generate a declaration definition of the indicator light processing function and write it into a header file template generated based on the first script; run the second script to read the indicator light attribute information that has completed the second configuration through the second script, and generate a function processing logic function code according to the indicator light attribute information and a source file template corresponding to the second script, and write the function processing logic function code into the source file template to generate an indicator light configuration code; configure the indicator light configuration code in the indicator light function configuration table to generate a corresponding indicator light control signal.

[0071] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0072] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0073] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0074] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0075] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0076] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for configuring an automobile instrument indicator light, characterized in that: include: In the preset Excel configuration table, configure the attribute information of each indicator light for the first time according to the preset configuration requirement information; Acquire an automation script that matches the configuration requirement information, the automation script comprising a first script and a second script; Run the first script to read the Excel configuration table through the reading module in the first script, and generate a regular expression according to the read table information; Performing a second configuration on the indicator light attribute information according to the regular expression to generate a declaration definition of the indicator light processing function and writing the declaration definition into a header file template generated based on the first script; Run the second script to read the indicator light attribute information that has been configured for the second time through the second script, generate a function processing logic function code according to the indicator light attribute information and a source file template corresponding to the second script, and write the function processing logic function code into the source file template to generate an indicator light configuration code; The indicator light configuration code is configured in the indicator light function configuration table to generate a corresponding indicator light control signal.

2. The method for configuring the automobile instrument indicator light according to claim 1, characterized in that: The first configuration of each indicator light attribute information according to the preset configuration requirement information in the preset Excel configuration table includes: Obtaining function information and control logic information of the indicator light to be controlled in the configuration requirement information; A new working directory is created in Excel according to the indicator light attribute information and a process format for indicator light control is created.

3. The method for configuring the automobile instrument indicator light according to claim 1, characterized in that: The step of running the first script to read the Excel configuration table through a reading module in the first script and generating a regular expression according to the read table information includes: Load the indicator light attribute information in the Excel configuration table through the openpyxl module and the xlrd module in the reading module to obtain configuration sample data; Compile a regular expression based on the configuration sample data.

4. The method for configuring the automobile instrument indicator light according to claim 2, characterized in that: The second configuration of the indicator light attribute information according to the regular expression to generate a declaration definition of the indicator light processing function and write it into the header file template generated based on the first script includes: Compile a declaration definition of the indicator light processing function according to the configuration sample data to generate a corresponding header file template; Write the declaration definition into the header file template and save it to the specified directory of the Excel configuration table.

5. The method for configuring the automobile instrument indicator light according to claim 1, characterized in that: The step of generating a function processing logic function code according to the indicator light attribute information and a source file template corresponding to the second script, and writing the function processing logic function code into the source file template to generate an indicator light configuration code comprises: Parsing the source file template to obtain source file structure information and source file running requirement information; Determine the placeholders and code blocks in the source file template according to the source file structure information; Select according to the placeholder and the code block to determine the insertion position of the function code in the source file template; Write corresponding function processing logic function code according to the indicator light attribute information; Inserting the functional processing logic function code into the source file template according to the insertion position; Run the source file template to generate the complete indicator light configuration code.

6. A device for configuring an automobile instrument indicator light, using the method for configuring an automobile instrument indicator light according to any one of claims 1 to 5, characterized in that: include: A first configuration unit, used to perform a first configuration of attribute information of each indicator light according to preset configuration requirement information in a preset Excel configuration table; A script acquisition unit, used to acquire an automation script matching the configuration requirement information, wherein the automation script includes a first script and a second script; A first running unit, configured to run the first script to read the Excel configuration table through a reading module in the first script, and generate a regular expression according to the read table information; A second configuration unit, configured to perform a second configuration on the indicator light attribute information according to the regular expression, so as to generate a declaration definition of the indicator light processing function and write the declaration definition into a header file template generated based on the first script; a second running unit, configured to run the second script, so as to read the indicator light attribute information that has been configured for the second time through the second script, generate a function processing logic function code according to the indicator light attribute information and a source file template corresponding to the second script, and write the function processing logic function code into the source file template to generate an indicator light configuration code; The control unit is used to configure the indicator light configuration code in the indicator light function configuration table to generate a corresponding indicator light control signal.

7. The automobile instrument indicator light configuration device according to claim 6, characterized in that: The device also includes: An information acquisition unit, used to acquire function information and control logic information of the indicator light to be controlled in the configuration requirement information; The format creation unit is used to create a new working directory in Excel and create a process format for indicator light control according to the indicator light attribute information.

8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 5 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 5 can be implemented.