CN112825032A - Software parameter configuration method and device with storage function - Google Patents

Software parameter configuration method and device with storage function Download PDF

Info

Publication number
CN112825032A
CN112825032A CN201911143491.4A CN201911143491A CN112825032A CN 112825032 A CN112825032 A CN 112825032A CN 201911143491 A CN201911143491 A CN 201911143491A CN 112825032 A CN112825032 A CN 112825032A
Authority
CN
China
Prior art keywords
parameter
type
software
parameters
current setting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911143491.4A
Other languages
Chinese (zh)
Inventor
谭长合
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Peking Technology Co ltd
Original Assignee
Beijing Peking Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Peking Technology Co ltd filed Critical Beijing Peking Technology Co ltd
Priority to CN201911143491.4A priority Critical patent/CN112825032A/en
Publication of CN112825032A publication Critical patent/CN112825032A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a software parameter configuration method and a device with a storage function. The software parameter configuration method comprises the following steps: acquiring a parameter file of software; acquiring a first parameter from a parameter file; matching the type of the first parameter with a preset type; if the matching is successful, acquiring a configuration strategy corresponding to the type; and configuring the first parameter according to the configuration strategy. By the method, the same configuration strategy can be adopted for the same type of parameters, and can be realized through the same code module, so that the processing such as setting, modification, storage and the like of the same type of parameters can be realized through the same code module and the same software interface, the software development and test complexity and workload can be reduced, the development cost can be reduced, and the development period can be shortened.

Description

Software parameter configuration method and device with storage function
Technical Field
The present application relates to the field of computer technologies, and in particular, to a software parameter configuration method and a device with a storage function.
Background
When a software developer develops software, the software developer usually needs to set and modify software parameters to realize software functions.
The inventor of the present application finds, in long-term research and development work, that, in the prior art, a corresponding software modification interface is usually developed for each set of software parameters, and each software parameter is read, set and stored using a different code. However, software development and testing in this manner is complicated and labor intensive.
Disclosure of Invention
The technical problem mainly solved by the application is to provide a software parameter configuration method and a device with a storage function, so as to reduce the complexity and workload of software development and test, further reduce the development cost and shorten the development period.
In order to solve the technical problem, the application adopts a technical scheme that: a software parameter configuration method is provided. The parameter configuration method comprises the following steps: acquiring a parameter file of the software; acquiring a first parameter from the parameter file; matching the type of the first parameter with a preset type; if the matching is successful, acquiring a configuration strategy corresponding to the type; and configuring the first parameters according to the configuration strategy.
Before the step of obtaining the parameter file of the software, the software parameter configuration method further includes: defining a plurality of second parameters of the software; carrying out normalization processing on the plurality of second parameters to obtain the first parameters; and saving the first parameter to the parameter file.
Wherein the step of normalizing the plurality of second parameters comprises: and setting attributes for the second parameter, wherein the attributes comprise parameter identification and parameter description, and the parameter description comprises type, value range and parameter description.
Wherein the step of obtaining the configuration policy corresponding to the type comprises: reading the current setting value of the first parameter; acquiring a configuration strategy corresponding to the type; the step of configuring the first parameter comprises: verifying the current setting value according to the configuration strategy; and if the verification is successful, saving the current setting value of the first parameter to the parameter file.
Wherein, if the verification is successful, the step of saving the current setting value of the first parameter to the parameter file comprises: if the verification is successful, returning to the step of acquiring the first parameters from the parameter file until all the first parameters in the parameter file are verified; judging whether all the first parameters are successfully verified; and if so, saving the current setting values of all the first parameters to the parameter file.
Wherein the type at least comprises a character type, a numerical type, a character selection type or a numerical selection type.
Wherein the step of verifying the current setting value according to a configuration policy comprises: if the type is a character type, judging whether the length of the character string of the current setting value is within a preset length range and judging whether the current setting value meets a regular expression; if yes, the verification is successful; or if the type is a digital type, judging whether the numerical value of the current setting value is in a preset numerical value range; if yes, the verification is successful; or if the type is a character selection type, judging whether the current setting value is in a to-be-selected item; if yes, the verification is successful; or if the type is a digital selection type, judging whether the current setting value is in a to-be-selected item; if yes, the verification is successful.
Wherein, the software parameter configuration method further comprises: defining the parameter identification and the parameter description of the parameter to be added; and storing the parameter identification and the parameter description of the parameter to be added to the parameter file.
Wherein, the software parameter configuration method further comprises: acquiring a parameter identifier of a parameter to be deleted; and deleting the parameters corresponding to the parameter identifications from the parameter file.
In order to solve the above technical problem, another technical solution adopted by the present application is: an apparatus having a storage function is provided. The device stores program data that can be executed to implement the software parameter configuration method described above.
The beneficial effect of this application is: different from the prior art, the software parameter configuration method in the embodiment of the application includes: acquiring a parameter file of software; acquiring a first parameter from a parameter file; matching the type of the first parameter with a preset type; and if the matching is successful, acquiring a configuration strategy corresponding to the type to configure the first parameter. By the method, the same configuration strategy can be adopted for the same type of parameters, and can be realized through the same code module, so that the processing of setting, modifying, saving and the like of the same type of parameters can be realized through the same code module and the same software interface, the software development and test complexity and workload can be reduced, the development cost is reduced, and the development period is shortened.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a relational diagram of a software parameter file and a configuration code module;
FIG. 2 is a schematic diagram of a software parameter configuration process flow;
FIG. 3 is a flowchart illustrating an embodiment of a software parameter configuration method according to the present application;
FIG. 4 is a flowchart illustrating an embodiment of a software parameter configuration method according to the present application;
FIG. 5 is a flowchart illustrating a specific process of step S407 in the embodiment of FIG. 4;
FIG. 6 is a flowchart illustrating a specific process of step S502 in the embodiment of FIG. 5;
FIG. 7 is a flowchart illustrating a specific process of step S503 in the embodiment of FIG. 5;
FIG. 8 is a partial flow diagram of an embodiment of a software parameter configuration method of the present application;
FIG. 9 is a partial flow chart of an embodiment of a software parameter configuration method of the present application;
FIG. 10 is a diagram illustrating the relationship between software parameter files and configuration code modules of the present application;
FIG. 11 is a schematic flow chart of the software parameter reading of the present application;
FIG. 12 is a schematic flow chart of the software parameter saving of the present application;
FIG. 13 is a schematic structural diagram of an embodiment of a device with a storage function according to the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be noted that the following examples are only illustrative of the present application, and do not limit the scope of the present application. Likewise, the following examples are only some examples and not all examples of the present application, and all other examples obtained by a person of ordinary skill in the art without any inventive step are within the scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the prior art, to implement parameter setting and modification of software, different software interfaces are usually developed for different sets of parameters, and different codes are used for reading, setting, storing and the like for different parameters. This approach has a number of disadvantages: 1) different parameters need to be realized by using different codes, different groups of parameters need different software interfaces, and the workload of software development and test is increased; 2) with the increase of the parameters, the code amount and the software interface are correspondingly increased, and the software complexity is also correspondingly increased; 3) when the parameters are deleted, the positions of other parameters in the parameter file are influenced, so that the whole code module needs to be modified; 4) different parameters of the same software and codes of the same parameters in different software cannot be multiplexed, and the code multiplexing degree is low.
The relationship between the existing software parameter file and the code module is shown in fig. 1, and when the parameters are read and stored in different parameter files, each parameter needs to be processed differently to avoid the situation that the parameters are incorrect.
The existing software parameter processing flow is shown in fig. 2, and it can be seen from fig. 2 that, because there is no general parameter processing method, the larger the number of parameters is, the longer the processing flow is. For example, in large-scale industrial software, the number of parameters is large, resulting in a large workload of parameter setting.
Based on the above disadvantages, the existing software parameter configuration method inevitably causes the need of investing more manpower and time in the development and testing process of the software project, thereby causing the development cost of the whole software project to be increased and the development period to be prolonged.
To solve the above problem, the present application first proposes a software parameter configuration method, as shown in fig. 3, and fig. 3 is a schematic flow chart of a first embodiment of the software parameter configuration method of the present application. The software parameter configuration method of the embodiment specifically comprises the following steps:
step S301: and acquiring a parameter file of the software.
Wherein, the parameter file comprises the parameters of the software, and the parameters refer to the data items needed by the software in operation; before using the software, when the parameter configuration is needed to be performed on the software, the software parameters are firstly saved in a disk in a format of a parameter file, then the software is operated, the parameters in the parameter file are loaded to a memory from the disk, and finally the specific attributes of the parameters can be set, modified, saved and the like through a corresponding software interface.
Step S302: and acquiring a first parameter from the parameter file.
The first parameter at least comprises information such as parameter identification, parameter description and the like. The parameter identification can be a number or a character string, but in each parameter file, the parameter identification of each first parameter is unique; the parameter description is mainly used for normalizing the parameters, each first parameter has to correspond to a parameter type, the parameter explains and sets a corresponding value range, and the parameter description includes but is not limited to information such as the parameter type and the value range.
Step S303: and matching the type of the first parameter with a preset type.
The preset type at least comprises a character string display type, a numeric type, a character selection type or a numeric selection type.
The character string display type is mainly used for information display, and the value range setting items of the character string display type comprise information such as maximum character length and regular expressions; regular expressions are used to verify that string input complies with a certain rule, e.g. [ a-z ] + meaning that only lower case letters can be input.
The digital type is mainly used for calculation, and the value range setting items comprise information such as a maximum value, a minimum value, decimal point digits and the like.
The character string selection type is mainly used for displaying specific information, and only one character string is allowed to be selected from the set candidate items when the type parameter is set.
The number selection type is mainly used for some discrete number parameters, and the discrete parameters can be named, for example, 1 corresponds to "yes", 0 corresponds to "no", and the like, and when the type of parameters is set, only one value can be selected from set band options. Since the boolean type has a prototype of 0 or 1, it can be defined as a number selection type, true is 1 and false is 0.
The preset type may be stored in a preset table in advance.
Specifically, the type of a first parameter is obtained, and the type is compared with a preset type in a first preset table; if the type of the first parameter is the same as the preset type, judging that the type of the first parameter is matched with the preset type, namely, the matching is successful; if the type of the first parameter is different from the preset type, judging that the type of the first parameter is not matched with the preset type, namely, the matching fails.
Step S304: and if the matching is successful, acquiring a configuration strategy corresponding to the type.
The configuration strategy and the mapping relation between the configuration strategy and the preset type are stored in a second preset table.
Step S305: and configuring the first parameter according to the configuration strategy.
And if the type of the first parameter is successfully matched with the preset type, acquiring a configuration strategy corresponding to the type of the first parameter from a second preset table to configure the first parameter.
And if the matching of the type of the first parameter and the preset type fails, ending or prompting an error to a software developer.
Different from the prior art, the embodiment can configure the same type of parameters by using the same configuration strategy, and can realize the configuration strategy through the same code module, so that the processing such as setting, modification, storage and the like of the same type of parameters can be realized through the same code module and the same software interface, the software development and test complexity and workload can be reduced, the development cost is reduced, and the development period is shortened.
The present application further provides a software parameter configuration method according to another embodiment, as shown in fig. 4, the software parameter configuration method specifically includes the following steps:
step S401: a plurality of second parameters of the software are defined.
In the early stage of software development by a software developer, various functions of the software need to be preset, and parameters of the software are set according to information such as the functions of the software, so that the functions of the software are realized through the parameters.
Step S402: and carrying out normalization processing on the plurality of second parameters to obtain the first parameters.
Specifically, in this embodiment, an attribute may be set for the second parameter, where the attribute includes information such as a parameter identifier and a parameter description, and the parameter description includes information such as a parameter type, a value range, and a parameter description. The embodiments have been described above with respect to parameter identifiers, parameter descriptions, parameter types, and the like, and are not described herein again.
Step S403: and saving the first parameter to a parameter file.
The embodiment may save the first parameter to the parameter file through a dedicated burning program or a dedicated software application.
Steps S401 to S403 are used to define a parameter file of the software according to the functional requirements of the software and the like before configuring the software.
Step S404: and acquiring a parameter file of the software.
Step S405: and acquiring a first parameter from the parameter file.
Step S406: and matching the type of the first parameter with a preset type.
Step S407: and if the matching is successful, acquiring a configuration strategy corresponding to the type.
Step S408: and configuring the first parameter according to the configuration strategy.
Steps S404 to S408 are used to configure the parameters in the parameter file.
Steps S404 to S408 are similar to steps S301 to S305, and are not described herein again.
And if the matching of the type of the first parameter and the preset type fails, ending or prompting an error to a software developer.
On the basis of the above embodiment, the first parameter is formed after the second parameter is normalized and self-described, so that a plurality of first parameters can be uniformly processed by the same code module and software interface, the code reuse rate can be improved, the complexity and workload of software development and test can be further reduced, the development cost can be further reduced, and the development period can be further shortened.
Specifically, the present embodiment may implement step S407 through step S501 and step S502 as shown in fig. 5, and implement step S408 through step S503 and step S504:
step S501: the current setting value of the first parameter is read.
The current setting value of the first parameter represents the real value of the current setting of the first parameter, the current setting value is stored in a text format, and the current setting value is converted into a corresponding data type according to the parameter type before the value range is judged.
The current setting value of the first parameter may be obtained through a software interface.
Step S502: and acquiring a configuration strategy corresponding to the type.
Step S503: and verifying the current setting value according to the configuration strategy.
Specifically, the present embodiment may implement step S503 by the method as shown in fig. 6, and the method of the present embodiment includes step S601 to step S606.
Step S601: if the type is a character type, judging whether the length of the character string of the current setting value is within a preset length range and judging whether the current setting value meets a regular expression; if yes, go to step S605, otherwise go to step S606.
Step S602: if the type is digital, judging whether the numerical value of the current setting value is in a preset numerical value range; if yes, go to step S605, otherwise go to step S606.
Step S603: if the type is a character selection type, judging whether the current setting value is in the option to be selected; if yes, go to step S605, otherwise go to step S606.
Step S604: if the type is a digital selection type, judging whether the current setting value is in the option to be selected; if yes, go to step S605, otherwise go to step S606.
Step S605: and the verification is successful.
Step S606: the verification fails.
Step S504: and if the verification is successful, saving the current setting value of the first parameter to the parameter file.
If the verification fails, the method is ended, or an error is prompted to a software developer.
Specifically, the present embodiment may implement step S504 through steps S701 to S703.
Step S701: if the verification is successful, the step S405 is returned until all the first parameters in the parameter file are verified.
Step S702: and judging whether all the first parameters are successfully verified.
Step S703: and if all the first parameters are verified successfully, saving the current setting values of all the first parameters to the parameter file.
Usually, a plurality of first parameters of a piece of software are provided, the present application can realize setting of current setting values of all first parameters of the software through a software interface, and the current setting values are saved to a parameter file only after all the first parameters of the software are successfully verified, so as to avoid that part of the first parameters are successfully configured, and the other part of the first parameters are failed to be configured or are not set, so as to avoid missing the first parameters.
In another embodiment, as shown in fig. 8, the method of the present embodiment further includes step S801 and step S802 based on the above embodiment.
Step S801: and defining parameter identification and parameter description of the parameter to be added.
Step S802: and storing the parameter identification and the parameter description of the parameter to be added into the parameter file.
In this way, the parameters can be added to the software and stored in the parameter file to update the software configuration. The embodiment can save the added parameters to the parameter file through a software interface or a downloader and the like.
Specifically, when a parameter needs to be added, an unused parameter identifier is selected first, and the parameter item is added to a parameter file, so that the parameter type and the value range (including the parameter identifier and the parameter description) can be defined; then add the parameter to the parameter file (for example, add a node to the XML), and after saving the parameter file, reload the parameter file to see the newly added parameter.
In another embodiment, as shown in fig. 9, the method of the present embodiment further includes step S901 and step S902 on the basis of the above embodiment.
Step S901: and acquiring the parameter identifier of the parameter to be deleted.
Step S902: and deleting the parameters corresponding to the parameter identifications from the parameter file.
In this way, software parameters can be deleted.
Specifically, when the parameter needs to be deleted, the parameter item is directly deleted in the configuration file.
Since the parameter setting is completely standardized, the addition and deletion of the parameters are very easy to operate.
In one application scenario, as shown in fig. 10, fig. 10 is a schematic diagram of a relationship between a software parameter file and a configuration code module according to the present application. As can be seen from fig. 10, a plurality of normalized and self-described parameters of the software of the present application can be uniformly processed by the same code module, which can reduce the complexity and workload of software development and test, and further reduce the development cost and shorten the development period.
In an application scenario, as shown in fig. 11, fig. 11 is a schematic flow chart of software parameter reading according to the present application. In the parameter file, each node represents a parameter, including the contents of parameter identification, parameter description and the like. And after reading the nodes from the parameter file, judging the parameter type, verifying the set parameter value according to the parameter type, if the verification is passed, displaying the parameter value on a software interface, and otherwise, carrying out error processing. The determination of the parameter types is similar to the above embodiments, and is not described herein again.
When the parameter is read, after one node is processed, another node is continuously read from the parameter file until all the nodes of the parameter file are read.
In an application scenario, as shown in fig. 12, fig. 12 is a schematic flow chart of software parameter saving according to the present application. Specifically, before the parameters are written into the parameter file, each parameter needs to find the corresponding parameter type and parameter range, the input data is verified according to the corresponding information, if all the parameters are verified, the parameters are stored in the parameter file, and otherwise, error processing is performed. Data verification is similar to the above embodiments and is not described in detail here.
According to the embodiment of the application, the workload of code development and test can be reduced, so that the development and maintenance cost can be reduced, and the development period can be shortened. For example, a large software project has 10 parameters, and by adopting the conventional configuration method, source codes need to be developed and tested for the 10 parameters, whereas by adopting the configuration method of the present application, the 10 parameters only need to generate parameter files according to rules, and source codes and tests do not need to be developed separately.
The present application further provides a device with a storage function, as shown in fig. 13, fig. 13 is a schematic structural diagram of an embodiment of the device with a storage function of the present application. The device 1301 with a storage function of the present embodiment is configured to store the related data 1302 and the program data 1303 of the above embodiments, where the related data 1302 at least includes the preset type, the configuration policy, and the like, and the program data 1303 can be implemented by the software parameter configuration method. The related data 1302 and the program data 1303 have been described in detail in the above method embodiments, and are not described herein again.
The device 1301 with a storage function in this embodiment may be, but is not limited to, a usb disk, an SD card, a PD optical drive, a mobile hard disk, a mass floppy drive, a flash memory, a multimedia memory card, a server, and the like.
Different from the prior art, the software parameter configuration method in the embodiment of the application includes: acquiring a parameter file of software; acquiring a first parameter from a parameter file; matching the type of the first parameter with a preset type; if the matching is successful, acquiring a configuration strategy corresponding to the type; and configuring the first parameter according to the configuration strategy. By the method, the same configuration strategy can be adopted for the same type of parameters, and can be realized through the same code module, so that the processing such as setting, modification, storage and the like of the same type of parameters can be realized through the same code module and the same software interface, the software development and test complexity and workload can be reduced, the development cost can be reduced, and the development period can be shortened.
In addition, if the above functions are implemented in the form of software functions and sold or used as a standalone product, the functions may be stored in a storage medium readable by a mobile terminal, that is, the present application also provides a storage device storing program data, which can be executed to implement the method of the above embodiments, the storage device may be, for example, a usb disk, an optical disk, a server, etc. That is, the present application may be embodied as a software product, which includes several instructions for causing an intelligent terminal to perform all or part of the steps of the methods described in the embodiments.
In the description of the present application, reference to the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be viewed as implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device (e.g., a personal computer, server, network device, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions). For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application or are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A software parameter configuration method is characterized by comprising the following steps:
acquiring a parameter file of the software;
acquiring a first parameter from the parameter file;
matching the type of the first parameter with a preset type;
if the matching is successful, acquiring a configuration strategy corresponding to the type;
and configuring the first parameters according to the configuration strategy.
2. The method of claim 1, wherein before the step of obtaining the parameter file of the software, the method further comprises:
defining a plurality of second parameters of the software;
carrying out normalization processing on the plurality of second parameters to obtain the first parameters;
and saving the first parameter to the parameter file.
3. The method according to claim 2, wherein the step of normalizing the plurality of second parameters comprises:
and setting attributes for the second parameter, wherein the attributes comprise parameter identification and parameter description, and the parameter description comprises type, value range and parameter description.
4. The software parameter configuration method of claim 3, wherein the step of obtaining the configuration policy corresponding to the type comprises:
reading the current setting value of the first parameter;
acquiring a configuration strategy corresponding to the type;
the step of configuring the first parameter comprises:
verifying the current setting value according to the configuration strategy;
and if the verification is successful, saving the current setting value of the first parameter to the parameter file.
5. The method according to claim 4, wherein the step of saving the current setting value of the first parameter to the parameter file if the verification is successful comprises:
if the verification is successful, returning to the step of acquiring the first parameters from the parameter file until all the first parameters in the parameter file are verified;
judging whether all the first parameters are successfully verified;
and if so, saving the current setting values of all the first parameters to the parameter file.
6. The method of claim 4, wherein the type includes at least a character type, a numerical type, a character selection type, or a numerical selection type.
7. The method of claim 6, wherein the step of verifying the current setting value according to the configuration policy comprises:
if the type is a character type, judging whether the length of the character string of the current setting value is within a preset length range and judging whether the current setting value meets a regular expression;
if yes, the verification is successful; or
If the type is a digital type, judging whether the numerical value of the current setting value is in a preset numerical value range;
if yes, the verification is successful; or
If the type is a character selection type, judging whether the current setting value is in a to-be-selected item;
if yes, the verification is successful; or
If the type is a digital selection type, judging whether the current setting value is in a to-be-selected item;
if yes, the verification is successful.
8. The software parameter configuration method of claim 1, further comprising:
defining parameter identification and parameter description of the parameter to be added;
and storing the parameter identification and the parameter description of the parameter to be added to the parameter file.
9. The software parameter configuration method of claim 1, further comprising:
acquiring a parameter identifier of a parameter to be deleted;
and deleting the parameters corresponding to the parameter identifications from the parameter file.
10. An apparatus having a storage function, wherein the apparatus stores program data executable to implement the software parameter configuration method of any one of claims 1-9.
CN201911143491.4A 2019-11-20 2019-11-20 Software parameter configuration method and device with storage function Pending CN112825032A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911143491.4A CN112825032A (en) 2019-11-20 2019-11-20 Software parameter configuration method and device with storage function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911143491.4A CN112825032A (en) 2019-11-20 2019-11-20 Software parameter configuration method and device with storage function

Publications (1)

Publication Number Publication Date
CN112825032A true CN112825032A (en) 2021-05-21

Family

ID=75907075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911143491.4A Pending CN112825032A (en) 2019-11-20 2019-11-20 Software parameter configuration method and device with storage function

Country Status (1)

Country Link
CN (1) CN112825032A (en)

Similar Documents

Publication Publication Date Title
CN107273286B (en) Scene automatic test platform and method for task application
CN104391725B (en) Page display method and page presentation device
US8869111B2 (en) Method and system for generating test cases for a software application
CN110188135B (en) File generation method and equipment
CN104679532B (en) kernel module loading method and device
CN106874176B (en) Intelligent test method and device
WO2018209958A1 (en) Upgradable file upgrading method, set top box and storage medium
CN110673847A (en) Configuration page generation method and device, electronic equipment and readable storage medium
CN105095074B (en) Upgrade test method and device for configuration file
CN109614325B (en) Method and device for determining control attribute, electronic equipment and storage medium
CN106844772A (en) The update method and device of application database
CN113157315A (en) Method, device, equipment and medium for identifying difference information of different versions of software
CN110888804B (en) Interface test method and interface test platform
CN111124872A (en) Branch detection method and device based on difference code analysis and storage medium
CN112597023A (en) Case management method and device based on guide picture, computer equipment and storage medium
CN112825032A (en) Software parameter configuration method and device with storage function
CN116303589A (en) Workflow construction method, device, equipment and readable storage medium
CN116048609A (en) Configuration file updating method, device, computer equipment and storage medium
CN116010347A (en) Resource updating method, device, system, electronic equipment and storage medium
CN106557337A (en) Interface updating method and terminal
CN104536887A (en) Communication data detection method and device
CN113672509A (en) Automatic testing method, device, testing platform and storage medium
CN106681914B (en) Television picture quality debugging method and device
CN115543227B (en) Cross-system data migration method, system, electronic device and storage medium
CN112559444A (en) SQL (structured query language) file migration method and device, storage medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination