Software configuration method and device, equipment and storage medium
By planning the software's logic and configuration data, setting default values, and compiling and merging the code to address the different needs of various products, the problem of unified configuration and personalized differentiation within the same product series was solved. This enabled rapid differentiation and reduced development costs and time.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies make it difficult to achieve unified software configuration and personalized differentiation across the same series of products, resulting in high development costs and long development times.
By planning the software's logic and configuration data, setting default values, and compiling and merging the components to meet the different needs of various products, personalized software configurations can be created.
It enables unified configuration and rapid differentiation of products within the same series, reducing development costs and shortening development time.
Smart Images

Figure CN114860198B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software configuration management technology, and in particular to a software configuration method, apparatus, device, and storage medium. Background Technology
[0002] With the development of technology and the progress of society, people have more and more requirements for product functions, and they are becoming more and more personalized. In order to reduce development costs and shorten development time, it is necessary for products in the same series to use only one set of software, and then determine the differences between products through different configurations.
[0003] Based on the above background, it is necessary to provide a configuration method that can be applied to multiple products and software development platforms. This method can configure a software that is compatible with all products in the same series, and can also be used to quickly distinguish different products in the same series. Summary of the Invention
[0004] This invention provides a software configuration method, apparatus, device, and storage medium for configuring a software that is compatible with all products in the same series, and for quickly distinguishing different products in the same series through this software.
[0005] In a first aspect, embodiments of the present invention provide a software configuration method, including:
[0006] S1, the logic part of the planning software and configuration data;
[0007] S2, based on the different needs of different products, plans the target data that needs to be stored in the configuration data of each product;
[0008] S3 sets the default value for each configuration data and sets the target data that each product needs to store;
[0009] S4 combines the software's logic and default configuration data into a single file for compilation, resulting in a compiled file.
[0010] S5, for any product, replace the default value of the target data that the product needs to store in the compilation file with the set value;
[0011] S6, merge the target data that has been replaced with the set value with the compiled file to obtain the software corresponding to the product.
[0012] Preferably, the configuration data of the planning software mentioned in step S1 includes: planning the data of the configuration part of the software, and configuring a separate data segment to store the data of the configuration part.
[0013] Preferably, the step S2 of planning the target data to be stored in the configuration data of each product includes: planning the target data to be stored in the configuration data of each product, and defining the label for using the target data; when planning the target data, at least the space occupied by the target data, the meaning of the data, the range of the data, and the requirements referenced by the data need to be planned.
[0014] Preferably, in step S3, setting the target data to be stored for each product includes: setting the target data setting value for each data in the target data to be stored for each product according to the different needs of different products.
[0015] Preferably, the software corresponding to the product in step S4 includes a logic part and a configuration part; wherein, the logic part includes the functions of the product, and the configuration part configures all functions of the product by setting unique configuration items.
[0016] Secondly, embodiments of the present invention also provide a software configuration device, comprising:
[0017] The software planning module is used to plan the logical parts of the software and its configuration data.
[0018] The configuration planning module is used to plan the target data that needs to be stored in the configuration data of each product based on the different needs of different products.
[0019] The settings module is used to set the default values for each configuration data and to set the target data that each product needs to store.
[0020] The compilation module is used to combine the logical parts of the software and the default values of the configuration data into a single compilation file.
[0021] The replacement module is used to replace the default value of the target data that the product needs to store in the compilation file with a set value for any product.
[0022] The merging module is used to merge the target data, which has been replaced with a set value, with the compiled file to obtain the software corresponding to the product.
[0023] Thirdly, embodiments of the present invention provide an electronic device, including a processor, a memory, a communication interface, and a bus; wherein the processor, the memory, and the communication interface communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor can execute the software configuration method provided in the first aspect embodiment by calling the program instructions.
[0024] Fourthly, embodiments of the present invention provide a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, is implemented to perform the software configuration method provided in the first aspect embodiment.
[0025] The software configuration method, apparatus, device, and storage medium provided in this invention can configure a software that is compatible with all products in the same series, and can also quickly distinguish different products in the same series, making it convenient and fast to use. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic flowchart of a software configuration method provided in an embodiment of the present invention;
[0028] Figure 2 A software configuration structure diagram provided for embodiments of the present invention;
[0029] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0031] Figure 1 This is a schematic diagram of the software configuration method provided in an embodiment of the present invention, such as... Figure 1 As shown, the software configuration method provided in this embodiment of the invention includes, but is not limited to, the following steps:
[0032] S1, the logic part of the planning software and configuration data.
[0033] The software consists of a logic section and a configuration section. The configuration data in S1 is the data from the configuration section.
[0034] In this embodiment, the configuration data of the software is planned and stored in a separate data segment. The storage space for the configuration data depends on the complexity of the software functions and the amount of configuration data required. Sufficient storage space needs to be reserved for software upgrades and functional expansion. Optionally, the space allocated for the configuration data should account for less than 80% of the total data space.
[0035] S2, based on the different needs of different products, plans the target data that needs to be stored in the configuration data of each product.
[0036] Specifically, based on the different needs of different products, the target data that needs to be stored in the configuration data of each product is planned, and the labels for using the target data are defined. When planning the target data, at least the space occupied by the target data, the meaning of the data, the scope of the data, and the requirements referenced by the data need to be planned, so as to facilitate the maintenance and expansion of the data in the configuration section.
[0037] S3 sets the default value for each configuration data and sets the target data that each product needs to store.
[0038] In step S3, a default value is set for each configuration data. The function of this default value is to enable the software to compile successfully. Specifically, during software compilation, the default values of the logic part and the data part are combined into one for compilation. Without a default value, the data will have no value, causing the software to fail to compile.
[0039] In this embodiment, it is also necessary to set the set value of each data in the target data that each product needs to store, according to the different needs of different products.
[0040] S4 combines the software's logic and default configuration data into a single file for compilation, resulting in a compiled file.
[0041] S5, for any product, replace the default value of the target data that the product needs to store in the compilation file with the set value.
[0042] S6, merge the target data that was replaced with the set value in S5 with the compiled file obtained in S4 to obtain the software corresponding to the product.
[0043] Figure 2 The software configuration structure diagram provided in the embodiments of the present invention is shown below. Figure 2The software corresponding to the product described in S6 includes a logic section and a configuration section. The logic section contains the product's functions, with different functions distinguished by different configuration items. The configuration section configures all functions of the product with unique configuration items (configuration of function presence / absence, function differences, etc.) for different product categories. In this embodiment, different products use a common logic section and their corresponding unique configuration section, which are combined into one to form the software corresponding to that product. (Refer to...) Figure 2 The software corresponding to product ① and product ② has the same logical part, but different configuration parts.
[0044] The software that differentiates different products based on their configurations is mainly done through the following methods:
[0045] ① For the parts of the software that are the same, use the same software; for the parts that are different, use pre-compiled macros to distinguish the software of different products.
[0046] ② For the parts of the software that are the same, use the same software. For the parts of the software that are different, set different configuration items in non-volatile memory (DTF or EEPROM). For products with different software, use non-volatile memory with different configurations.
[0047] ③ Combining ① and ② above, depending on the importance of the function, some software uses pre-compiled macros for differentiation, while others use configuration items for differentiation.
[0048] The software configuration method provided in this invention can configure a software that is compatible with all products in the same series, and can also quickly distinguish different products in the same series, making it convenient and fast to use.
[0049] In one embodiment, the present invention also provides a software configuration apparatus for executing the software configuration methods in the foregoing embodiments. The apparatus includes:
[0050] The software planning module is used to plan the logical parts of the software and its configuration data.
[0051] The configuration planning module is used to plan the target data that needs to be stored in the configuration data of each product based on the different needs of different products.
[0052] The settings module is used to set the default values for each configuration data and to set the target data that each product needs to store.
[0053] The compilation module is used to combine the logical parts of the software and the default values of the configuration data into a single compilation file.
[0054] The replacement module is used to replace the default value of the target data that the product needs to store in the compilation file with a set value for any product.
[0055] The merging module is used to merge the target data, which has been replaced with a set value, with the compiled file to obtain the software corresponding to the product.
[0056] It is understood that the software configuration device provided by the present invention corresponds to the software configuration method provided in the foregoing embodiments, and the relevant technical features of the software configuration system can be referred to the relevant technical features of the software configuration method. The embodiments of the present invention will not be repeated here.
[0057] In one embodiment, the present invention provides an electronic device, such as... Figure 3 As shown, the electronic device may include a processor 301, a communications interface 302, a memory 303, and a communication bus 304. The processor 301, communications interface 302, and memory 303 communicate with each other via the communication bus 304. The processor 301 can call logical instructions in the memory 303 to execute the steps of the software configuration method provided in the above embodiments, such as: S1, planning the logical part of the software and configuration data; S2, planning the target data to be stored in the configuration data of each product according to the different requirements of different products; S3, setting default values for each configuration data and setting the set values for the target data to be stored for each product; S4, combining the logical part of the software and the default values of the configuration data into a single unit for compilation to obtain a compiled file; S5, for any product, replacing the default values of the target data to be stored in the compiled file with the set values; S6, merging the target data replaced with the set values with the compiled file to obtain the software corresponding to the product.
[0058] In one embodiment, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps of the software configuration method provided in the above embodiments, including, for example: S1, planning the logical part of the software and configuration data; S2, planning the target data to be stored in the configuration data of each product according to the different requirements of different products; S3, setting the default value of each configuration data and setting the set value of the target data to be stored for each product; S4, combining the logical part of the software and the default value of the configuration data into a whole and compiling it to obtain a compiled file; S5, for any product, replacing the default value of the target data to be stored in the compiled file with the set value; S6, merging the target data replaced with the set value with the compiled file to obtain the software corresponding to the product.
[0059] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0060] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0061] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0062] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0063] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0064] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0065] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A software configuration method characterized by, Comprise: S1, the logical part of the planning software and configuration data; S2, according to the requirement difference of different products, the target data stored in the configuration data of each product is planned; S3, the default value of each configuration data is set, and the set value of the target data stored in each product is set; S4, the logical part of the software and the default value of the configuration data are combined and compiled to obtain a compiled file; S5, for any product, the default value of the target data stored in the product in the compiled file is replaced by the set value; S6, the target data replaced by the set value is merged with the compiled file to obtain the software corresponding to the product; In step S3, the set value of the target data stored in each product is set, comprising: according to the requirement difference of different products, the set value of each data in the target data stored in each product is set; The software corresponding to the product in step S4 includes a logical part and a configuration part; wherein the logical part includes the function of the product, and the configuration part configures the unique configuration item of all functions of the product.
2. The software configuration method of claim 1, wherein, The configuration data of the software in step S1 comprises: the data of the configuration part of the software is planned, and a separate data segment is stored to store the data of the configuration part.
3. The software configuration method of claim 1, wherein, The target data stored in the configuration data of each product in step S2 comprises: the target data stored in the configuration data of each product is planned, and the label of using the target data is defined; when planning the target data, at least the occupied space, data meaning, data range and data reference requirement of the target data need to be planned.
4. A software configuration apparatus characterized by comprising: Comprise: Software planning module, for planning the logical part of the software and configuration data; Configuration planning module, for planning the target data stored in the configuration data of each product according to the requirement difference of different products; Setting module, for setting the default value of each configuration data, and setting the set value of the target data stored in each product; Compiling module, for combining and compiling the logical part of the software and the default value of the configuration data to obtain a compiled file; Replacement module, for replacing the default value of the target data stored in the product in the compiled file with the set value for any product; merging module, for merging the target data replaced by the set value with the compiled file to obtain the software corresponding to the product; The set value of the target data stored in each product is set, comprising: according to the requirement difference of different products, the set value of each data in the target data stored in each product is set; The software corresponding to the product includes a logical part and a configuration part; wherein the logical part includes the function of the product, and the configuration part configures the unique configuration item of all functions of the product.
5. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to realize the steps of the software configuration method in any one of claims 1 to 3. 6.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the software configuration method in any one of claims 1 to 3.
Citation Information
Patent Citations
Differentiated Android software generation method and differentiated Android software generation system
CN110990049A