Adapter file classification configuration method and device, electronic equipment and medium

By classifying and configuring templates of the BMC software to be adapted, and generating application configuration files, the problems of high adaptation difficulty and maintenance costs in the existing technology are solved, and a more stable and low-cost adaptation process is achieved.

CN119847590AInactive Publication Date: 2025-04-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510340608.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-04-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, when BMC software adapts to different server models, the configuration file formats are different, which increases the adaptation difficulty and operation cost, and has high maintenance costs, which can easily lead to configuration errors that affect software stability.

Method used

By classifying the adaptive files, setting the configuration template and the classified file, using the configuration template to describe the file configuration parameters, forming configuration rules, and parsing and generating application configuration files.

Benefits of technology

It reduces the operation complexity and error rate of the adaptation process, improves the operation stability of the software, and reduces the maintenance cost. By combining configuration templates and adaptation configuration files, the frequency of analyzing module code modifications is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847590A_ABST
    Figure CN119847590A_ABST
Patent Text Reader

Abstract

The invention discloses an adaptive file classification configuration method and device, electronic equipment and a medium, and relates to the technical field of servers, firstly, adaptive files in a controller are classified, parameter type characteristics of the classified adaptive files are combined, a configuration template is adopted to be associated with the classified to-be-adapted files, and the to-be-adapted files are matched with the to-be-adapted files; the method comprises the following steps of: acquiring a to-be-adapted file, describing the to-be-adapted file by adopting a configuration template to obtain a configuration rule of the adaptive file, analyzing the to-be-adapted file by combining the configuration rule in the configuration template to obtain an application configuration file, and executing a running process in a controller according to specific information in the application configuration file. The technical problem that different mirror image versions need to be compiled and generated for different server models is solved, and the technical effect of finally generating various types of corresponding application configuration files is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of servers, and in particular to a method, device, electronic device and medium for configuring adaptive file classification. Background Art

[0002] BMC (Baseboard Management Controller) is a dedicated controller used to monitor and manage servers. In order to enable BMC to be applied to different server models, the BMC software needs to be configured during the development process to ensure that it is compatible with different systems.

[0003] In some related technologies, independent adaptation modules are designed and the configuration files to be used later are included in the adaptation modules. Since the forms of the configuration files are different, the difficulty of adaptation is increased, which greatly increases the operating cost of subsequent applications. At the same time, since the adaptation forms in different adaptation modules are different, it is necessary to accurately master the process of how to use the configuration files in the adaptation module in order to realize the relevant functions. In addition, in order to adapt to different server models, different image versions need to be compiled and generated. At the same time, with other user needs, more versions need to be developed and maintained, which further increases the maintenance cost. Due to the existence of various types of server models, the number of configuration files to be configured is also large, and the storage is scattered. During the adaptation process, the relevant operations of the configuration files cannot be accurately performed, which is prone to errors, thus affecting the running stability of the software product. Summary of the invention

[0004] The present application provides an adaptation file classification configuration method, device, electronic device and medium, which classify and process the type characteristics of configuration files of different modules respectively, and introduce specific configuration template conversion to adapt different types of configuration files for easy parsing, and finally generate corresponding application configuration files of various types. Through the above scheme, at least the problem of complex operation and easy error in the adaptation process in the related technology is solved.

[0005] In a first aspect, the present application provides an adaptation file classification configuration method, which is applied to a controller, and the method includes: Acquire the to-be-adapted files of the controller, and classify the to-be-adapted files in combination with the configuration modes of the to-be-adapted files; Associating a configuration template with the classified files to be adapted, and using the configuration template to describe configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; The classified files to be adapted are parsed in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

[0006] In a specific embodiment, the file to be adapted is divided into a general adaptation file and a project adaptation file based on the correlation between the file to be adapted and the server model; the general adaptation file includes a fixed configuration file adapted to the server model, and the project adaptation file includes an adjustable configuration file adapted to the server model; the fixed configuration file and the adjustable configuration file are respectively associated with the configuration template.

[0007] In a specific embodiment, setting the configuration template to be associated with the classified file to be adapted specifically includes: storing the configuration attributes and configuration information in the general adaptation file to the same file to be adapted, and associating the general adaptation file with the configuration template and the application configuration file in a one-to-one correspondence; setting the project adaptation file to be associated with the configuration template; setting the configuration template to be associated with the application configuration file.

[0008] In a specific embodiment, a configuration template is used to describe the configuration parameters of the classified file to be adapted, specifically including: obtaining a configuration framework in the configuration template, and setting a first keyword of the configuration framework to represent a hierarchical relationship, and setting a second keyword of the configuration framework to represent a hierarchical code; in response to the completion of the description of the configuration framework, using the configuration information in the configuration template to describe the field value range in the application configuration file, and confirming the configuration rules associated with the field value range.

[0009] In a specific embodiment, the use of the configuration information in the configuration template to describe the value range of the field in the application configuration file specifically includes: obtaining the key name in the configuration template and the associated value of the key name; and describing the associated value type, the value source of the associated value, and the associated value conversion rule respectively.

[0010] In a specific embodiment, the file names, storage directories and associated configuration templates of the files to be adapted in the general adaptation file and the project adaptation file are parsed; and a configuration file list is formed by combining the file names, storage directories and associated configuration templates.

[0011] In a specific embodiment, the universal adapter file in the configuration file list is copied to a temporary directory; in response to confirming that the universal adapter file in the temporary directory has not been processed, the universal adapter file to be processed is traversed; the universal adapter file to be processed is parsed to obtain configuration-related information, and whether the imported information is legal; in response to confirming that the imported information is legal, the configuration template is copied to the temporary directory, and the conversion of the universal adapter file is performed in combination with the configuration-related information.

[0012] In a specific embodiment, confirm that the configuration template exists, and continue to determine whether the configuration format in the configuration template is correct; in response to confirming that the configuration format is correct, confirm that the imported information is legal, store the configuration association information in the memory, and process other universal adaptation files to be processed.

[0013] In a specific embodiment, the project adaptation file in the configuration file list is copied to the temporary directory; in response to confirming that the project adaptation file in the temporary directory has not been processed, the project association information in the project adaptation file to be processed is extracted, and the project association information is imported into the storage location.

[0014] In a specific embodiment, the hierarchical description information in the configuration framework is obtained, and an application configuration framework is generated in combination with the hierarchical description information; in response to the generation of the application configuration framework, the associated fields in the file to be adapted are parsed in combination with the key fields in the configuration template; and the associated fields are filled into the information points of the application configuration framework to form the application configuration file.

[0015] In a specific embodiment, the running process in the controller performs a first operation according to the running parameters in the application configuration file; And / or, receiving updated configuration parameters from a user, updating the application configuration file in combination with the updated configuration parameters to obtain an updated application configuration file, and performing a second operation according to the updated application configuration file.

[0016] In a second aspect, the present application also provides an adaptation file classification configuration device, including: A classification module, used for acquiring the to-be-adapted files of the controller, and classifying the to-be-adapted files in combination with the configuration mode of the to-be-adapted files; A configuration module, used to associate a configuration template with the classified files to be adapted, and use the configuration template to describe the configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; A parsing module is used to parse the classified files to be adapted in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

[0017] In a third aspect, the present application further provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned adaptation file classification configuration methods when executing the computer program, including: Acquire the to-be-adapted files of the controller, and classify the to-be-adapted files in combination with the configuration modes of the to-be-adapted files; Associating a configuration template with the classified files to be adapted, and using the configuration template to describe configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; The classified files to be adapted are parsed in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

[0018] In a fourth aspect, the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of implementing any of the above-mentioned methods for configuring the classification of adaptation files include: Acquire the to-be-adapted files of the controller, and classify the to-be-adapted files in combination with the configuration modes of the to-be-adapted files; Associating a configuration template with the classified files to be adapted, and using the configuration template to describe configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; The classified files to be adapted are parsed in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

[0019] In a fifth aspect, the present application further provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the steps of the method for implementing any of the above-mentioned methods for configuring the classification of adaptation files include: Acquire the to-be-adapted files of the controller, and classify the to-be-adapted files in combination with the configuration modes of the to-be-adapted files; Associating a configuration template with the classified files to be adapted, and using the configuration template to describe configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; The classified files to be adapted are parsed in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

[0020] Through the solution in the present application, all adaptation files in the controller are classified according to their purpose and configuration method to form general adaptation files and project adaptation files. All adaptation files are in json format, which reduces the difficulty of adaptation; and the relevant information in the above-classified adaptation files is described through configuration templates respectively, so that when the relevant operation process is subsequently implemented, it is only necessary to configure the information in the general adaptation file and the project adaptation file according to the relevant rules, thereby solving the problem that the adaptation process is complex and error-prone.

[0021] At the same time, the combination of configuration templates and adaptation configuration files reduces the frequency of code modification of the parsing module. That is, after a single development is completed, only the configuration and configuration template need to be modified without modifying the code logic, and the maintainability of the entire adaptation system is low. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only 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.

[0023] Figure 1 A schematic diagram of a method for classifying and configuring an adaptation file provided in an embodiment of the present application; Figure 2 A schematic diagram of the classification process of files to be adapted provided in an embodiment of the present application; Figure 3 A schematic diagram of the process of parsing a universal adaptation file provided in an embodiment of the present application; Figure 4 A schematic diagram of the process of parsing project adaptation files provided in an embodiment of the present application; Figure 5 A schematic diagram of an adaptation file classification configuration device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] 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 only 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.

[0025] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0026] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0027] The embodiment of the present application provides an adaptation file classification configuration method, which is applied to a controller. In this embodiment, the controller is configured as a BMC. By processing the adaptation files corresponding to different functional modules in the BMC, the software in the BMC can be adapted to different server models, such as Figure 1 As shown, the method comprises the following steps: Step 1: Obtain the files to be adapted of the controller, and classify the files to be adapted according to the configuration methods of the files to be adapted.

[0028] like Figure 2 As shown, first obtain several adaptation files in the BMC for executing related functions. Since the BMC needs to implement different functional processes, the forms of the files to be adapted are also different. Some use configuration files in json format, some use configuration files in yaml format, and some use configuration files in key-value pairs directly. The above adaptation files are classified according to their uses and configuration methods, including: dividing the files to be adapted into general adaptation files and project adaptation files according to the relevance between the files to be adapted and the server model; general adaptation files include fixed configuration files that are not adapted with the server model, and project adaptation files include adjustable configuration files that are adapted with the server model; respectively set the fixed configuration files and adjustable configuration files to be associated with the configuration template.

[0029] After the files to be adapted are divided into general adaptation files and project adaptation files, the two are respectively associated with their corresponding configuration modules to achieve subsequent configuration and analysis for different types of adaptation files, so as to improve the classification processing efficiency of various types of adaptation files in the BMC in this embodiment.

[0030] Among them, the general adaptation file is configured to have a low level of relevance to the server model, that is, the information in the general adaptation file is a fixed configuration file that does not adapt to the server model, and the fixed configuration file includes but is not limited to power-on policy configuration parameters, process configuration parameters, or default user class parameters. The project adaptation file is configured to have a high level of relevance to the server model, that is, the information in the project adaptation file is an adjustable configuration file that adapts to the server model. Adjustable configuration files include but are not limited to GPIO configurations of servers of different server models, i2c topology configurations or sdr parameters; GPIO refers to General Purpose Input / output, which is a general input / output interface mainly used for data interaction and control between microcontrollers and other electronic devices; i2c refers to Inter-Integrated Circuit, which is a bus protocol that is a widely used serial communication protocol; sdr parameters refer to single data rate. Combined with the correlation between the above parameters and hardware, the adjustable configuration files are further divided into software configuration parameters and hardware configuration parameters, where software configuration parameters refer to pure software configuration parameters that are independent of hardware, such as sdr parameters or heat dissipation configuration parameters, and hardware configuration parameters refer to configuration parameters that are strongly related to hardware, such as the definition of GPIO in different processes, i2c topology parameters, GPIO configuration parameters or kernel driver configuration.

[0031] Step 2: Associating a configuration template with the classified files to be adapted, and using the configuration template to describe configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted.

[0032] It should be noted that the configuration template in this embodiment is used to describe the conversion rules between the application configuration files that are ultimately generated by the adapted files, and the correspondence between the conversion fields, so that the converted and parsed configuration files can be applicable to different server models and different functional processes, thereby reducing the possibility of inaccurate configuration file-related operations during the adaptation process and improving the operating stability of the software product.

[0033] After the files to be adapted are classified and stored separately, the storage paths of the files to be adapted include, for example, "Generalcfg\defuser.json", "Generalcfg\logger.json", "Generalcfg\policy.json", "Generalcfg\Pricfg1\ Hard \adccfg.json" or "Generalcfg\Pricfg2\Soft \i2ccfg.json". All configuration information in the general adaptation files that is not related to the project adaptation is stored in json format.

[0034] In order to ensure that the universal adaptation file can be used for functional processes of different server models, it is necessary to set up the universal adaptation file to perform the following operations: the configuration information in the universal adaptation file is fixed, and it will not be adapted as the project increases, and the configuration information therein only needs to be configured once for different server models. The configuration information in the universal adaptation file contains all the configuration information in the converted application configuration file and only contains the configuration information of the application configuration file. There is a one-to-one correspondence between the universal adaptation file and the configuration template.

[0035] Before the configuration template describes the configuration parameters of the classified files to be adapted, it is necessary to set the association between the configuration template and the classified files to be adapted, that is, to configure the following corresponding association architecture: store the configuration attributes and configuration information in the general adaptation file to the same file to be adapted, and associate the general adaptation file with the configuration template and the application configuration file in a one-to-one correspondence; in this embodiment, it is also necessary to set the corresponding association between the project adaptation file and the configuration template; set the corresponding association between the configuration template and the application configuration file, and there is a one-to-one correspondence.

[0036] Among them, the general adaptation file corresponds one-to-one to the configuration template and the application configuration file; a configuration template can correspond to one or more project adaptation files, and a project configuration file can correspond to one or more configuration templates; a configuration template must correspond to more than one application configuration file, that is, to ensure that the parsing process is carried out in sequence and reduce the complexity of the adaptation process operation.

[0037] In this embodiment, a configuration template is used to describe the configuration parameters of the classified files to be adapted, specifically including: obtaining a configuration framework in the configuration template, and setting the first keyword of the configuration framework to represent the hierarchical relationship, and setting the second keyword of the configuration framework to represent the hierarchical encoding; in response to the completion of the configuration framework description, the configuration information in the configuration template is used to describe the field value range in the application configuration file, and the configuration rules associated with the field value range are confirmed.

[0038] The configuration information in the configuration template is used to describe the value range of the field in the application configuration file, specifically including: obtaining the key name and the associated value of the key name in the configuration template; describing the associated value type, the value source of the associated value and the associated value conversion rule respectively.

[0039] It should be noted that the configuration framework in the configuration template includes a first field and a second field, wherein the first field is used to describe the detailed information of the configuration framework in the application configuration file, and the second field is used to describe the field value information. Each layer sentence in the configuration framework of the first field includes an information point, and each information point includes four preset keywords. The four preset keywords respectively represent the name of the level, the number of levels, the number of string components, and the string array. Through the setting of the above configuration template, the unified configuration of different functional processes in the controller and the unified configuration of different server models can be achieved, ensuring that the subsequently output configuration files are suitable for various application scenarios.

[0040] Exemplarily, the structure of the configuration template is shown in the following code: "{"FrameWorkDesc":}{"KeysTableDesc":}".

[0041] In this embodiment, the first field refers to "FrameWorkDesc", and the second field refers to "KeysTableDesc", where the first field is used to describe the detailed information of the configuration framework in the application configuration file, and the keyword LevelNM is used to indicate the hierarchical relationship, and the following NM respectively indicates the hierarchical depth and the encoding of the same level. For example, the keyword Level00 indicates the first information point of level 0, and Level15 indicates the fifth information point of level 1, where each information point of each level is composed of four keywords, namely, the fields LName, Type, Num, and Keys. The specific meanings of the above keywords are shown in Table 1.

[0042] Table 1 Keyword meanings

[0043] According to the description of the meaning of the keywords in Table 1, the information describing the configuration framework in one of the configuration template files is shown in the following code: "{"FrameWorkDesc": "Level00": "Type": "Struct" "LName": "LName0" "Num":1, "Keys": ["Level10", "Level11"] }: "Level10": "Type": "Array" "LName": "LNamel" "Num":2, "Keys": ["ExampleKey1", "ExampleKey2" ] "Level11": "Type": "Element" "LName": "LName2" "Num":1, "Keys": ["ExampleKey3" ] }, "KeysTableDesc" } ”.

[0044] For example, if the configuration file to be adapted is in json format, the json format configuration framework generated according to the above configuration template is as shown in the following code: "LName0": "LNamel": "ExampleKey1":"xxx""ExampleKey2": true "ExampleKey1": "yyy" "ExampleKey2": false 7"ExampleKey3":"zzz"" The specific types of ExampleKey1 to ExampleKey3 are described in the second field, so it is temporarily assumed that the type and value of the corresponding key are the information shown in the above code.

[0045] For example, if the configuration file to be adapted is in the YAML file format, the YAML file configuration framework generated according to the above configuration template is as shown in the following code: "LName0: LName1: ExampleKey1:"xxx" ExampleKey2: true ExampleKey1: "yyy" ExampleKey2: falser falserExampleKey3: "zzz"” For example, if the configuration file to be adapted is a key-value pair format file, the configuration framework of the key-value pair format type generated according to the above configuration template is shown in the following code: "[LName0 LName1 0] Example Keyl="xxX Example Key2=true [LName0 LNamel 1] Example Key1="yyy' Example Key2=false LName0 Example Key2="zzz" After completing the description of the configuration framework according to the above process, start describing the configuration information in the configuration template, and use the configuration information in the configuration template to describe the field value range in the application configuration file. Specifically, for the description of the value corresponding to each key name, the description of the value includes the description of the value type, the description of the value source, the description of the value conversion rule, etc. Therefore, in the configuration template, various information descriptions of the value are all carried out in the second field, and the description information format of the second field KeysTableDesc is shown in Table 2.

[0046] Table 2 Information description format of the value in the second field

[0047] Combined with the description information format of the second field KeysTableDesc in Table 2, the configuration information description in one of the configuration templates is obtained as shown in the following code: “KeysTableDesc”: "Level10 0 ExampleKey1": "Type": "Str" "SrcFile": "i2ccfg.json", "SrcKey": "i2c-0 switch desc", "Rule": 0, "RuleExtInfo": null "Level10 0 ExampleKey2": "Type":"B00l""SrcFile":"i2ccfg.json" "SrcKey":"i2c-0enabled" "Rule":1."RuleExtInfo":[{"SrcVal": "Disabled","DesVal": false},{"SrcVal": "Enabled","DesVal": true}] "Level10 1 ExampleKey": "Type":"Str" "SrcFile":"i2ccfg.json" "SrcKey":"i2c-l switch desc" "Rule": 0,"RuleExtInfo": null "Level10 1 ExampleKey2": "Type":"Bool" "SrcFile":"i2ccfg.json" "SrcKey":"i2c-1abled" "Rule":1."RuleExtInfo":[{"SrcVal": "Disabled","DesVal": false},{"SrcVal": "Enabled","DesVal": true}]".

[0048] It should be noted that the general adaptation file can be associated with the configuration template by specifying the storage path of the adaptation file, the name of the application configuration file after the adaptation file is converted, the format of the converted application configuration file, and the configuration template used in the general adaptation file. Exemplarily, the format of the general adaptation file is shown in Table 3.

[0049] Table 3 uses the format of the adaptation file

[0050] Combined with the format of the universal adaptation file in Table 3, and taking defuser.json as an example, the information of the universal adaptation file in the configuration module is shown in the following code: "{"CfgPath":"... / .. / meta-commer / recipes-phosphor / settings / ", "CfgName":"defaultuser.yaml", "CfgFormat": "yaml" "CfgMod": "mod xxx.json", ["Usero": {"UserName": "root", "Password": "root", "Privilege":"Administrator", "FirstLogin": true} ]}".

[0051] The project adaptation file is a configuration file that is strongly related to the server model, and specifically includes: obtaining the project adaptation directory according to the classification results of the files to be adapted, and setting subdirectories and preset files in the project adaptation directory, where the subdirectories are used to store hardware-related adaptation information, and the preset files are used to store information related to configuration templates and parsing, so as to support the subsequent description of template parameters.

[0052] Exemplarily, according to the definition of configuration classification, each adaptation project directory contains Hard, Soft, and Project.cfg subdirectories and files, wherein the Hard subdirectory stores hardware-related adaptation information, and the Soft subdirectory stores software-related adaptation information. Project.cfg is essentially a json format file, which stores some information related to adaptation and configuration parsing. The Project.cfg file stores the boardid information and project name information of the project. The description of the Project.cfg file format is shown in Table 4.

[0053] Table 4 Format description of preset files

[0054] Combined with the preset file format in Table 4, and taking the content in the Project.cfg file as an example, according to the information of each field described in Table 4, the following code is shown: "BoardId":0x82"BomId":0x01, "PrjName":"NF5280M7" "Cfg1": "CfgPath":"... / .. / meta-commer / commer-hal / commer-hal / " "NamePreFix": "Topo" "CfgFormat": "yaml" "CfgMod": "xxx.mod" "CfgList":"adccfg.json""gpiocfg.json""i2ccfg.json"".

[0055] In actual application, after configuring the corresponding project adapter file Project.cfg according to the above code, the parsing process can be carried out.

[0056] Step 3: Parse the classified files to be adapted in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

[0057] In a specific embodiment, the file names, storage directories and associated configuration templates of the files to be adapted in the general adaptation files and the project adaptation files are first parsed, and the configuration file list is formed by combining the file names, storage directories and associated configuration templates. Then, the general adaptation files and the project adaptation files are parsed separately.

[0058] In this embodiment, the parsing process of the universal adapter file includes: copying the universal adapter files in the configuration file list to a temporary directory; in response to confirming that the universal adapter files in the temporary directory have not been processed, traversing the universal adapter files to be processed; parsing the universal adapter files to be processed to obtain configuration-related information, and determining whether the imported information is legal; in response to confirming that the imported information is legal, copying the configuration template to the temporary directory, and performing conversion of the universal adapter file in combination with the configuration-related information.

[0059] Further, confirm that the configuration template exists, and continue to determine whether the configuration format in the configuration template is correct; in response to confirming that the configuration format is correct, confirm that the imported information is legal, store the configuration-related information in the memory, and process other general adaptation files to be processed.

[0060] like Figure 3 As shown, when parsing the universal adaptation file, key information is first parsed out therefrom, then an application configuration file is created under a preset storage directory, and the template name associated with the universal adaptation file is obtained, and the configuration template is queried according to the template name to obtain the preset configuration template, and the default user information is obtained, and the default user information is written into the preset file according to the preset configuration template to obtain the application configuration file associated with the corresponding default user information.

[0061] Exemplarily, in combination with the information in the universal adaptation configuration file in Table 3, four key information, namely CfgPath, CfgName, CfgFormat and CfgMod, can be parsed therefrom, and then an application configuration file defaultuser.yaml can be first created in the CfgPath directory, and then the template corresponding to the name is found in the template module according to the template name configured in the CfgMod field, and the following default user information is converted into corresponding configuration information according to the template and written into the created yaml file. The specific conversion process and processing logic can refer to the specific description of the parsing module later. The file information of the converted file defaultuser.yaml is shown in the following code: "Usero:UselName: "root"Passwd: "root"Priv: "Admin"FirstLogin: true", that is, the application configuration file is located in .. / .. / meta-commer / recipes-phosphor / settings / , and the file name is defaultuser.yaml.

[0062] First, copy the universal adaptation file to a preset temporary directory to realize the conversion of the universal adaptation file in the temporary directory to avoid affecting the data in the original file to be adapted during the conversion process. After traversing the universal adaptation files to be processed, parse the corresponding configuration-related information from each universal adaptation file, wherein the configuration-related information includes the configuration file path, configuration file name, configuration format, template configuration file and configuration information, etc., and store the configuration-related information in the memory. Further, determine the legality of the imported content. If it is legal, continue to process other universal adaptation files. If it is not legal, report an error directly in the early conversion stage of compilation to facilitate manual troubleshooting of adaptation problems. After the attribute information and configuration information of all universal adaptation files are verified and imported into the memory, it is confirmed that the parsing process of the universal adaptation file is completed, and the information after parsing in the memory is temporarily stored as original data.

[0063] Among them, parsing the project adaptation file includes: copying the project adaptation file in the configuration file list to a temporary directory; in response to confirming that the project adaptation file in the temporary directory has not been processed, extracting the project association information in the project adaptation file to be processed, and importing the project association information to the storage location.

[0064] like Figure 4As shown, the parsing process of the project adaptation file in this embodiment specifically includes: copying all project adaptation files to a preset temporary directory, and judging whether the project adaptation files have been processed, that is, confirming whether the project adaptation files in the project directory exist, that is, judging whether the Project.cfg file exists; if so, extracting the project association information of the project adaptation file, including Boardld, Bomld and project name; then judging whether the project configuration information has been processed, if so, continuing to process the next project adaptation file; if not, extracting the project configuration information into the memory, wherein the project configuration information includes the configuration path, configuration file prefix, file format, configuration template file and adaptation list, until the configuration information in all project configuration files has been processed.

[0065] For example, in combination with the information in Table 4 and taking the content in the Project.cfg file as an example, the project adaptation file is parsed according to the information of each field described in Table 4, including: the BoardId of the current project parsed is 0x82, the BomId is 0x01, the configuration file name prefix is ​​Topo, the file format to be generated is a yaml file, the storage path is .. / .. / meta-commer / comer-hal / comer-hal / directory, and the file name is Topo_0x82_0x01.yaml, and the template xxx.mod needs to be referred to for parsing. The configuration files that need to be applied during the parsing process are adccfg.json, gpiocfg.json and i2ccfg.json, so that the final project configuration file can be generated and stored in the corresponding directory.

[0066] In a specific embodiment, generating the final application configuration file in combination with the above-mentioned configuration template and the classified files to be adapted includes: obtaining the hierarchical description information in the configuration framework, and generating the application configuration framework in combination with the hierarchical description information; in response to generating the application configuration framework, parsing the associated fields in the files to be adapted in combination with the key fields in the configuration template; and filling the associated fields into the information points of the application configuration framework to form an application configuration file.

[0067] like Figure 5 As shown, there are N generated application configuration files, including configuration file 1 to configuration file N. The above application configuration files are application configuration files of each functional module. Through the above application configuration files, different running processes in the BMC can be supported to perform related operations.

[0068] The application configuration file prepared in this embodiment can ensure that the running process in the controller executes the first operation according to the running parameters in the application configuration file; when the application configuration file needs to be updated or modified, the application configuration file is updated by receiving the updated configuration parameters from the user, combining the updated configuration parameters to obtain an updated application configuration file, and performing the second operation according to the updated application configuration file.

[0069] It should be noted that when adjusting the user's update configuration parameters, you only need to configure the general adaptation file once in combination with the configuration template. For the project adaptation file, you need to adapt each project separately based on the project's feature code to obtain the updated and adjusted adaptation configuration file.

[0070] Through the solution in this embodiment, a specific configuration template conversion is introduced to adapt to different types of configuration files for easy parsing, and finally corresponding application configuration files of various types are generated. Through the above solution, at least the problem that the adaptation process in the related technology is complex and error-prone can be solved.

[0071] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0072] The embodiment of the present application also provides an adaptation file classification configuration device, such as Figure 5 As shown, including: A classification module is used to obtain the files to be adapted of the controller and classify the files to be adapted according to the configuration mode of the files to be adapted; A configuration module, used to associate a configuration template with the classified files to be adapted, and use the configuration template to describe the configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; The parsing module is used to parse the classified files to be adapted in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

[0073] In a specific embodiment, the classification module is specifically used to divide the files to be adapted into general adaptation files and project adaptation files based on the correlation between the files to be adapted and the server model; the general adaptation files include fixed configuration files adapted to the server model, and the project adaptation files include adjustable configuration files adapted to the server model; the fixed configuration files and the adjustable configuration files are respectively associated with the configuration templates.

[0074] In a specific embodiment, the configuration module is also used to store the configuration attributes and configuration information in the general adaptation file to the same file to be adapted, and the general adaptation file is associated with the configuration template and the application configuration file one by one; the project adaptation file is set to be associated with the configuration template; and the configuration template is set to be associated with the application configuration file.

[0075] In a specific embodiment, the configuration module is specifically used to obtain a configuration framework in a configuration template, and set a first keyword of the configuration framework to represent a hierarchical relationship, and set a second keyword of the configuration framework to represent a hierarchical code; in response to the completion of the configuration framework description, the configuration information in the configuration template is used to describe the field value range in the application configuration file, and the configuration rules associated with the field value range are confirmed.

[0076] In a specific embodiment, the configuration module is further used to obtain the key name and the associated value of the key name in the configuration template; and describe the associated value type, the value source of the associated value and the associated value conversion rule respectively.

[0077] In a specific embodiment, the parsing module is also used to parse the file names, storage directories and associated configuration templates of the files to be adapted in the general adaptation files and project adaptation files; and form a configuration file list by combining the file names, storage directories and associated configuration templates.

[0078] In a specific embodiment, the parsing module also includes a general parsing module and a project parsing module, wherein the general parsing module is also used to copy the general adaptation files in the configuration file list to a temporary directory; in response to confirming that the general adaptation files in the temporary directory have not been processed, traverse the general adaptation files to be processed; parse the general adaptation files to be processed to obtain configuration association information, and determine whether the imported information is legal; in response to confirming that the imported information is legal, copy the configuration template to the temporary directory, and perform conversion of the general adaptation file in combination with the configuration association information.

[0079] In a specific embodiment, the general parsing module is also used to confirm the existence of the configuration template and continue to determine whether the configuration format in the configuration template is correct; in response to confirming that the configuration format is correct, confirming that the imported information is legal, storing the configuration-related information in the memory, and processing other general adaptation files to be processed.

[0080] In a specific embodiment, the project parsing module is used to copy the project adaptation files in the configuration file list to a temporary directory; in response to confirming that the project adaptation files in the temporary directory have not been processed, extract the project association information in the project adaptation files to be processed, and import the project association information to a storage location.

[0081] In a specific embodiment, the parsing module is also used to obtain hierarchical description information in the configuration framework, and generate an application configuration framework in combination with the hierarchical description information; in response to the generated application configuration framework, the associated fields in the file to be adapted are parsed in combination with the key fields in the configuration template; and the associated fields are filled into the information points of the application configuration framework to form an application configuration file.

[0082] In a specific embodiment, it also includes an execution module, which is used to control the running process in the controller to perform a first operation according to the running parameters in the application configuration file; and / or, receive updated configuration parameters from the user, update the application configuration file in combination with the updated configuration parameters to obtain an updated application configuration file, and perform a second operation according to the updated application configuration file.

[0083] For the description of the features in the embodiment corresponding to the adaptation file classification configuration device, reference can be made to the relevant description of the embodiment corresponding to the adaptation file classification configuration method, which will not be repeated here.

[0084] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of any of the above-mentioned adaptation file classification configuration methods, and the steps specifically include: Step 101: Obtain the to-be-adapted files of the controller, and classify the to-be-adapted files according to the configuration mode of the to-be-adapted files; Step 102: Associating a configuration template with the classified files to be adapted, and using the configuration template to describe configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; Step 103: parse the classified files to be adapted in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

[0085] In a specific embodiment, the files to be adapted are divided into general adaptation files and project adaptation files based on the relevance between the files to be adapted and the server models; the general adaptation files include fixed configuration files adapted to the server models, and the project adaptation files include adjustable configuration files adapted to the server models; the fixed configuration files and the adjustable configuration files are respectively associated with the configuration templates.

[0086] In a specific embodiment, the configuration attributes and configuration information in the general adaptation file are stored in the same file to be adapted, and the general adaptation file is associated with the configuration template and the application configuration file one by one; the project adaptation file is associated with the configuration template; and the configuration template is associated with the application configuration file.

[0087] In a specific embodiment, a configuration framework in a configuration template is obtained, and a first keyword of the configuration framework is set to represent a hierarchical relationship, and a second keyword of the configuration framework is set to represent a hierarchical encoding; in response to completion of the configuration framework description, the configuration information in the configuration template is used to describe the field value range in the application configuration file, and the configuration rules associated with the field value range are confirmed.

[0088] In a specific embodiment, a key name and an associated value of the key name in a configuration template are obtained; and the associated value type, the value source of the associated value, and the associated value conversion rule are described respectively.

[0089] In a specific embodiment, the file names, storage directories and associated configuration templates of the files to be adapted in the general adaptation file and the project adaptation file are parsed; and the file names, storage directories and associated configuration templates are combined to form a configuration file list.

[0090] In a specific embodiment, the universal adapter files in the configuration file list are copied to a temporary directory; in response to confirming that the universal adapter files in the temporary directory have not been processed, the universal adapter files to be processed are traversed; the universal adapter files to be processed are parsed to obtain configuration-related information, and it is determined whether the imported information is legal; in response to confirming that the imported information is legal, the configuration template is copied to the temporary directory, and the conversion of the universal adapter files is performed in combination with the configuration-related information.

[0091] In a specific embodiment, confirm that the configuration template exists, and continue to determine whether the configuration format in the configuration template is correct; in response to confirming that the configuration format is correct, confirm that the imported information is legal, store the configuration-related information in the memory, and process other general adaptation files to be processed.

[0092] In a specific embodiment, the project adaptation files in the configuration file list are copied to a temporary directory; in response to confirming that the project adaptation files in the temporary directory have not been processed, the project association information in the project adaptation files to be processed is extracted, and the project association information is imported into the storage location.

[0093] In a specific embodiment, the hierarchical description information in the configuration framework is obtained, and the application configuration framework is generated in combination with the hierarchical description information; in response to the generated application configuration framework, the associated fields in the file to be adapted are parsed in combination with the key fields in the configuration template; the associated fields are filled into the information points of the application configuration framework to form an application configuration file.

[0094] In a specific embodiment, the running process in the controller performs a first operation according to the running parameters in the application configuration file; and / or receives updated configuration parameters from the user, updates the application configuration file in combination with the updated configuration parameters to obtain an updated application configuration file, and performs a second operation according to the updated application configuration file.

[0095] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in any of the above-mentioned adaptation file classification configuration methods when running, and the steps specifically include: Step 201: Obtain the to-be-adapted files of the controller, and classify the to-be-adapted files according to the configuration mode of the to-be-adapted files; Step 202: Associating a configuration template with the classified files to be adapted, and using the configuration template to describe configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; Step 203: parse the classified files to be adapted in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

[0096] In a specific embodiment, the files to be adapted are divided into general adaptation files and project adaptation files based on the relevance between the files to be adapted and the server models; the general adaptation files include fixed configuration files adapted to the server models, and the project adaptation files include adjustable configuration files adapted to the server models; the fixed configuration files and the adjustable configuration files are respectively associated with the configuration templates.

[0097] In a specific embodiment, the configuration attributes and configuration information in the general adaptation file are stored in the same file to be adapted, and the general adaptation file is associated with the configuration template and the application configuration file one by one; the project adaptation file is associated with the configuration template; and the configuration template is associated with the application configuration file.

[0098] In a specific embodiment, a configuration framework in a configuration template is obtained, and a first keyword of the configuration framework is set to represent a hierarchical relationship, and a second keyword of the configuration framework is set to represent a hierarchical encoding; in response to completion of the configuration framework description, the configuration information in the configuration template is used to describe the field value range in the application configuration file, and the configuration rules associated with the field value range are confirmed.

[0099] In a specific embodiment, a key name and an associated value of the key name in a configuration template are obtained; and the associated value type, the value source of the associated value, and the associated value conversion rule are described respectively.

[0100] In a specific embodiment, the file names, storage directories and associated configuration templates of the files to be adapted in the general adaptation file and the project adaptation file are parsed; and the file names, storage directories and associated configuration templates are combined to form a configuration file list.

[0101] In a specific embodiment, the universal adapter files in the configuration file list are copied to a temporary directory; in response to confirming that the universal adapter files in the temporary directory have not been processed, the universal adapter files to be processed are traversed; the universal adapter files to be processed are parsed to obtain configuration-related information, and it is determined whether the imported information is legal; in response to confirming that the imported information is legal, the configuration template is copied to the temporary directory, and the conversion of the universal adapter files is performed in combination with the configuration-related information.

[0102] In a specific embodiment, confirm that the configuration template exists, and continue to determine whether the configuration format in the configuration template is correct; in response to confirming that the configuration format is correct, confirm that the imported information is legal, store the configuration-related information in the memory, and process other general adaptation files to be processed.

[0103] In a specific embodiment, the project adaptation files in the configuration file list are copied to a temporary directory; in response to confirming that the project adaptation files in the temporary directory have not been processed, the project association information in the project adaptation files to be processed is extracted, and the project association information is imported into the storage location.

[0104] In a specific embodiment, the hierarchical description information in the configuration framework is obtained, and the application configuration framework is generated in combination with the hierarchical description information; in response to the generated application configuration framework, the associated fields in the file to be adapted are parsed in combination with the key fields in the configuration template; the associated fields are filled into the information points of the application configuration framework to form an application configuration file.

[0105] In a specific embodiment, the running process in the controller performs a first operation according to the running parameters in the application configuration file; and / or receives updated configuration parameters from the user, updates the application configuration file in combination with the updated configuration parameters to obtain an updated application configuration file, and performs a second operation according to the updated application configuration file.

[0106] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0107] The embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the steps in any one of the above-mentioned adaptation file classification configuration method embodiments are implemented, and the steps specifically include: Step 301: Obtain the to-be-adapted files of the controller, and classify the to-be-adapted files according to the configuration mode of the to-be-adapted files; Step 302: Associating a configuration template with the classified files to be adapted, and using the configuration template to describe configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; Step 303: parse the classified files to be adapted in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

[0108] In a specific embodiment, the files to be adapted are divided into general adaptation files and project adaptation files based on the relevance between the files to be adapted and the server models; the general adaptation files include fixed configuration files adapted to the server models, and the project adaptation files include adjustable configuration files adapted to the server models; the fixed configuration files and the adjustable configuration files are respectively associated with the configuration templates.

[0109] In a specific embodiment, the configuration attributes and configuration information in the general adaptation file are stored in the same file to be adapted, and the general adaptation file is associated with the configuration template and the application configuration file one by one; the project adaptation file is associated with the configuration template; and the configuration template is associated with the application configuration file.

[0110] In a specific embodiment, a configuration framework in a configuration template is obtained, and a first keyword of the configuration framework is set to represent a hierarchical relationship, and a second keyword of the configuration framework is set to represent a hierarchical encoding; in response to completion of the configuration framework description, the configuration information in the configuration template is used to describe the field value range in the application configuration file, and the configuration rules associated with the field value range are confirmed.

[0111] In a specific embodiment, a key name and an associated value of the key name in a configuration template are obtained; and the associated value type, the value source of the associated value, and the associated value conversion rule are described respectively.

[0112] In a specific embodiment, the file names, storage directories and associated configuration templates of the files to be adapted in the general adaptation file and the project adaptation file are parsed; and the file names, storage directories and associated configuration templates are combined to form a configuration file list.

[0113] In a specific embodiment, the universal adapter files in the configuration file list are copied to a temporary directory; in response to confirming that the universal adapter files in the temporary directory have not been processed, the universal adapter files to be processed are traversed; the universal adapter files to be processed are parsed to obtain configuration-related information, and it is determined whether the imported information is legal; in response to confirming that the imported information is legal, the configuration template is copied to the temporary directory, and the conversion of the universal adapter files is performed in combination with the configuration-related information.

[0114] In a specific embodiment, confirm that the configuration template exists, and continue to determine whether the configuration format in the configuration template is correct; in response to confirming that the configuration format is correct, confirm that the imported information is legal, store the configuration-related information in the memory, and process other general adaptation files to be processed.

[0115] In a specific embodiment, the project adaptation files in the configuration file list are copied to a temporary directory; in response to confirming that the project adaptation files in the temporary directory have not been processed, the project association information in the project adaptation files to be processed is extracted, and the project association information is imported into the storage location.

[0116] In a specific embodiment, the hierarchical description information in the configuration framework is obtained, and the application configuration framework is generated in combination with the hierarchical description information; in response to the generated application configuration framework, the associated fields in the file to be adapted are parsed in combination with the key fields in the configuration template; the associated fields are filled into the information points of the application configuration framework to form an application configuration file.

[0117] In a specific embodiment, the running process in the controller performs a first operation according to the running parameters in the application configuration file; and / or receives updated configuration parameters from the user, updates the application configuration file in combination with the updated configuration parameters to obtain an updated application configuration file, and performs a second operation according to the updated application configuration file.

[0118] Professionals may further 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 the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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.

[0119] The above is a detailed introduction to an adaptation file classification configuration method, device, electronic device and medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A method for classifying and configuring an adaptation file, applied to a controller, characterized in that: The method comprises: Acquire the to-be-adapted files of the controller, and classify the to-be-adapted files in combination with the configuration modes of the to-be-adapted files; Associating a configuration template with the classified files to be adapted, and using the configuration template to describe configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; The classified files to be adapted are parsed in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

2. The method for classifying and configuring the adaptation file according to claim 1, characterized in that: The method further comprises: Dividing the files to be adapted into general adaptation files and project adaptation files based on the relevance between the files to be adapted and the server model; The general adaptation file includes a fixed configuration file adapted to the server model, and the project adaptation file includes an adjustable configuration file adapted to the server model; The fixed configuration file and the adjustable configuration file are respectively associated with the configuration template.

3. The method for classifying and configuring the adaptation file according to claim 2, characterized in that: Before setting the configuration template to be associated with the classified files to be adapted, the steps specifically include: Storing the configuration attributes and configuration information in the universal adaptation file into the same file to be adapted, and associating the universal adaptation file with the configuration template and the application configuration file in a one-to-one correspondence; Setting the project adaptation file to correspond to the configuration template; The configuration template is set to correspond to the application configuration file.

4. The method for classifying and configuring the adaptation file according to claim 1 or 2, characterized in that: The configuration template is used to describe the configuration parameters of the classified files to be adapted, specifically including: Acquire a configuration framework in the configuration template, and set a first keyword of the configuration framework to represent a hierarchical relationship, and set a second keyword of the configuration framework to represent a hierarchical code; In response to the configuration framework description being completed, the configuration information in the configuration template is used to describe the field value range in the application configuration file, and the configuration rule associated with the field value range is confirmed.

5. The method for classifying and configuring the adaptation file according to claim 4, characterized in that: The adopting of the configuration information in the configuration template to describe the value range of the field in the application configuration file specifically includes: Obtaining a key name in the configuration template and an associated value of the key name; The associated value type, the value source of the associated value and the associated value conversion rule are described respectively.

6. The method for classifying and configuring the adaptation file according to claim 2, characterized in that: The method further comprises: Parsing the file names, storage directories and associated configuration templates of the files to be adapted in the general adaptation file and the project adaptation file; A configuration file list is formed by combining the file name, the storage directory and the associated configuration template.

7. The method for classifying and configuring the adaptation file according to claim 6, characterized in that: The method further comprises: Copy the universal adapter file in the configuration file list to a temporary directory; In response to confirming that the universal adaptation file in the temporary directory has not been processed, traversing the universal adaptation files to be processed; Parsing the general adaptation file to be processed to obtain configuration-related information, and determining whether the imported information is legal; In response to confirming that the imported information is legal, the configuration template is copied to the temporary directory, and the conversion of the universal adaptation file is performed in combination with the configuration association information.

8. The method for classifying and configuring the adaptation files according to claim 7, characterized in that: The method further comprises: Confirm that the configuration template exists, and continue to determine whether the configuration format in the configuration template is correct; In response to confirming that the configuration format is correct, confirming that the imported information is legal, storing the configuration association information in a memory, and processing other universal adaptation files to be processed.

9. The method for classifying and configuring the adaptation files according to claim 7, characterized in that: The method further comprises: Copying the project adaptation file in the configuration file list to the temporary directory; In response to confirming that the project adaptation file in the temporary directory has not been processed, extracting the project association information in the project adaptation file to be processed, and importing the project association information into a storage location.

10. The method for classifying and configuring the adaptation file according to claim 4, characterized in that: The method further comprises: Acquire the hierarchical description information in the configuration framework, and generate an application configuration framework in combination with the hierarchical description information; In response to generating the application configuration framework, parsing the associated fields in the to-be-adapted file in combination with the key fields in the configuration template; Fill the associated fields into the information points of the application configuration framework to form the application configuration file.

11. The method for classifying and configuring the adaptation file according to claim 1 or 2, characterized in that: The method further comprises: The running process in the controller performs a first operation according to the running parameters in the application configuration file; And / or, receiving updated configuration parameters from a user, updating the application configuration file in combination with the updated configuration parameters to obtain an updated application configuration file, and performing a second operation according to the updated application configuration file.

12. An adaptation file classification configuration device, used to implement the adaptation file classification configuration method according to any one of claims 1 to 11, characterized in that: The device comprises: A classification module, used for acquiring the to-be-adapted files of the controller, and classifying the to-be-adapted files in combination with the configuration mode of the to-be-adapted files; A configuration module, used to associate a configuration template with the classified files to be adapted, and use the configuration template to describe configuration parameters of the classified files to be adapted to form configuration rules for the files to be adapted; A parsing module is used to parse the classified files to be adapted in combination with the configuration rules to obtain an application configuration file for executing the running process in the controller.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the adaptation file classification configuration method as described in any one of claims 1 to 11 when executing the computer program.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the adaptation file classification configuration method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the adaptation file classification configuration method as described in any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Configuration file generation method and device

    CN111181758A

  • Server configuration method and device based on yaml, terminal and storage medium

    CN113805960A

  • Vehicle-mounted system configuration method, device and system, vehicle, electronic equipment and medium

    CN114924785A

  • Method and system for automatically adapting BMC firmware to mainboard sensor

    CN116820432A

  • Deployment method and device of bastion host, electronic equipment and storage medium

    CN119449354A