CN113282327A - Configuration method, device and equipment of application program configuration items and storage medium - Google Patents

Configuration method, device and equipment of application program configuration items and storage medium Download PDF

Info

Publication number
CN113282327A
CN113282327A CN202110720116.2A CN202110720116A CN113282327A CN 113282327 A CN113282327 A CN 113282327A CN 202110720116 A CN202110720116 A CN 202110720116A CN 113282327 A CN113282327 A CN 113282327A
Authority
CN
China
Prior art keywords
configuration
configuration item
item
client
target
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
CN202110720116.2A
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202110720116.2A priority Critical patent/CN113282327A/en
Publication of CN113282327A publication Critical patent/CN113282327A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

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

Abstract

The application belongs to the technical field of data processing, and provides a configuration method, a device, equipment and a storage medium for application program configuration items, wherein the method comprises the following steps: responding to a configuration request of an application program sent by a client, and acquiring an original configuration item of the application program; extracting attribute information of the client from the configuration request; determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item; acquiring a configuration strategy corresponding to a target configuration item, matching attribute information of a client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result; and returning the configuration value and the target configuration item to the client, so that the client reconfigures the original configuration item based on the configuration value and the target configuration item. According to the method and the device, different target configuration items and configuration values can be returned according to the clients with different attributes, so that flexible configuration of different clients is realized.

Description

Configuration method, device and equipment of application program configuration items and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for configuring an application configuration item.
Background
The configuration center is a background service for managing the configuration items acquired by the application program, and can provide functions of unified management, real-time updating, historical configuration inquiry, backtracking and the like of the configuration items.
The existing updating mode for the application program configuration items is usually configured only for application programs in different environments, cannot perform corresponding configuration on the application program configuration items of clients with different attributes, and is poor in configuration flexibility.
Disclosure of Invention
The present application mainly aims to provide a method, an apparatus, a device and a storage medium for configuring an application configuration item, so as to improve the flexibility of configuration of the application configuration item.
In order to achieve the above object, the present application provides a method for configuring an application configuration item, which includes the following steps:
responding to a configuration request of an application program sent by a client, and acquiring an original configuration item of the application program;
extracting attribute information of the client from the configuration request;
determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item;
acquiring a configuration strategy corresponding to the target configuration item, matching the attribute information of the client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result;
and returning the configuration value and the target configuration item to the client, so that the client reconfigures the original configuration item based on the configuration value and the target configuration item.
Preferably, the step of determining the latest configuration item corresponding to the original configuration item according to the attribute information includes:
acquiring a timestamp of the original configuration item;
judging whether the original configuration item is the latest configuration item or not according to the timestamp of the original configuration item;
if not, updating the failure time of the original configuration item to the current time, and acquiring the configuration item with the timestamp closest to the current time to obtain the latest configuration item.
Further, before the step of obtaining the configuration policy corresponding to the target configuration item, the method further includes:
newly adding a rule space of the item to be configured of the application program; the rule space is used for setting and storing the configuration rules of the configuration items;
and acquiring fact data required by the configuration rule, and generating the configuration strategy of the configuration item according to the fact data.
Preferably, the step of generating the configuration policy of the configuration item according to the fact data includes:
determining rule dimensions, relation operators and input dimension attribute comparison values according to the fact data;
and taking the rule dimension, the relation operator and the input dimension attribute comparison value as a plurality of rule patterns, forming a condition by the rule patterns, forming a configuration rule by the conditions, and generating the configuration strategy containing the configuration rule.
Preferably, the step of matching the attribute information of the client with the configuration policy corresponding to the target configuration item includes:
acquiring a target configuration rule of a configuration strategy corresponding to a target configuration item and an original configuration rule of a configuration strategy of an original configuration item;
and matching the target configuration rule with the original configuration rule, wherein if all conditions in the target configuration rule and the original configuration rule are matched in a rule mode, the attribute information of the client is matched with the configuration strategy corresponding to the target configuration item.
Preferably, when the target configuration rule includes a plurality of configuration rules, the step of matching the attribute information of the client with the configuration policy corresponding to the target configuration item includes:
determining a priority of the target configuration rule;
and matching the attribute information of the client with the configuration strategies corresponding to the target configuration items in sequence according to the priority level.
Further, after the step of returning the configuration value and the target configuration item to the client and causing the client to reconfigure the original configuration item based on the configuration value and the target configuration item, the method further includes:
acquiring the abstract value of the configuration item of the client;
acquiring reference abstract values of all configuration items of the client, and comparing and checking the reference abstract values with the abstract values;
and if the reference abstract value is the same as the abstract value, the verification is passed.
The present application further provides a device for configuring an application configuration item, comprising:
the acquisition module is used for responding to a configuration request of an application program sent by a client and acquiring an original configuration item of the application program;
the extracting module is used for extracting the attribute information of the client from the configuration request;
the determining module is used for determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item;
the matching module is used for acquiring the configuration strategy corresponding to the target configuration item, matching the attribute information of the client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result;
and the return module is used for returning the configuration value and the target configuration item to the client so that the client reconfigures the original configuration item based on the configuration value and the target configuration item.
The present application further provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of any of the above methods when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any of the methods described above.
According to the configuration method, device, equipment and storage medium of the application program configuration item, the original configuration item of the application program is obtained by responding to the configuration request of the application program sent by a client; extracting attribute information of the client from the configuration request; determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item; acquiring a configuration strategy corresponding to a target configuration item, matching attribute information of a client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result; and returning the configuration value and the target configuration item to the client, so that the client reconfigures the original configuration item based on the configuration value and the target configuration item. According to the method and the device, the configuration items are managed in a finer-grained manner, and different target configuration items and configuration values can be returned according to the clients with different attributes, so that the clients can reconfigure the original configuration items based on the configuration values and the target configuration items, and flexible configuration of different clients is achieved.
Drawings
Fig. 1 is a flowchart illustrating a configuration method of an application configuration item according to an embodiment of the present application;
FIG. 2 is a block diagram illustrating an exemplary configuration apparatus for configuring an application configuration item according to an embodiment of the present disclosure;
fig. 3 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, the present application provides a configuration method of an application configuration item, which takes a configuration center composed of at least one computer device as an execution subject, wherein in an embodiment, the configuration method of the application configuration item includes the following steps:
s11, responding to the configuration request of the application program sent by the client, and acquiring the original configuration item of the application program;
s12, extracting the attribute information of the client from the configuration request;
s13, determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item;
s14, acquiring a configuration strategy corresponding to the target configuration item, matching the attribute information of the client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result;
and S15, returning the configuration value and the target configuration item to the client, and enabling the client to reconfigure the original configuration item based on the configuration value and the target configuration item.
As described in step S11, the client may send the configuration request of the application program to the configuration center at regular time, so as to actively perform timely update configuration on the original configuration item of the application program of the client itself, and the configuration center does not need to initiate configuration item update to the client one by one, and after receiving the configuration request, the configuration center determines the original configuration item, that is, the current configuration item, of the application program according to the configuration request.
In the configuration, in the system development process, some parameters, variables and the like of the application program which need to be changed are usually separated from the code and independently managed, and exist in the form of independent configuration files. The aim is to better adapt static system artifacts or deliverables (e.g., WAR, JAR package, etc.) to the actual physical operating environment. Configuration management is typically included in the system deployment process, and is done by a system administrator or operation and maintenance personnel. Configuration changes are one of the effective means to adjust the behavior of the system at runtime.
A configuration item may refer to a configurable parameter and its value range, e.g., an adjustment to a parameter of an application to conform to the operating environment of the application. In addition, the method can also be used for specific items such as pictures, texts, videos, emoticons and the like.
As described in the above steps S12 and S13, the configuration request includes some attribute information of the client, such as a timestamp of the original configuration item, parameter information of the configuration item, running parameter information of the application program, and environment information. And then inquiring the latest configuration item corresponding to the original configuration item according to the attribute information to determine the latest configuration item corresponding to the original configuration item, and taking the latest configuration item as a target configuration item. For example, all reference parameters of the latest configuration item and all parameters of the original configuration item in the database can be extracted, all reference parameters of the latest configuration item are compared with all parameters of the original configuration item one by one, and if all reference parameters of the latest configuration item are matched with all parameters of the original configuration item, it is indicated that the original configuration item of the application program is not updated, and the original configuration item does not need to be reconfigured; if the parameter which is not matched with the latest configuration item exists in the original configuration item, the original configuration item of the application program is indicated to be updated, and the original configuration item needs to be reconfigured by using the latest configuration item.
As described in step S14, when the configuration policy corresponding to the target configuration item is obtained, a relationship operator (e.g., greater than or less than) and a target reference value are selected according to a plurality of attribute dimensions that are pre-stored in the system to generate a complex policy based on different dimensions, then matching is performed between attribute information of the client and the attribute dimensions in the configuration policy, and a configuration value is determined according to a matching result, that is, the configuration policy is a scheme for configuring the configuration item based on different attribute dimensions, where the attribute dimensions correspond to the attribute information of the client, so as to further determine whether the configuration policy configuring the target configuration item corresponds to the attribute information of the client. For example, assuming that the application program is a game, the attribute dimension is operation parameter information of the game, and may specifically be definition of a display interface, if the definition of the display interface is low during the operation of the game, the configuration policy should contain a configuration scheme for improving the definition of the display interface, and if the configuration policy does not contain a configuration scheme for improving the definition of the display interface, it is determined that a matching result is mismatching, and a configuration value corresponding to the mismatching result is returned, and if the configuration value is 0, the configuration value is set as a mismatching result; setting the configuration value of 1 as the matching result of the match.
And the configuration value is used for evaluating the legality of the target configuration item, and only when the target configuration item is detected to be illegal, the original configuration item in the application program is replaced and updated according to the target configuration item, and the application program is started, so that the normal starting of the application program is ensured.
As described in step S15, after determining the configuration value according to the matching result, the configuration center may obtain the user information stored in the system according to the parameter information of the client, then calculate the rule policy, return the newly added configuration items on the matching to the client, after the client verifies the configuration value, determine whether to refresh the target configuration item, and cache the time for obtaining the configuration item for obtaining the incremental configuration next time. For example, when the configuration value received by the client is 1, replacing and updating the original configuration item in the application program according to the target configuration item, and starting the application program; when the configuration value received by the client is 0, the original configuration item is not reconfigured for the moment. According to the configuration method of the application program configuration item, the original configuration item of the application program is obtained by responding to the configuration request of the application program sent by the client; extracting attribute information of the client from the configuration request; determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item; acquiring a configuration strategy corresponding to a target configuration item, matching attribute information of a client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result; and returning the configuration value and the target configuration item to the client, so that the client reconfigures the original configuration item based on the configuration value and the target configuration item. According to the method and the device, the configuration items are managed in a finer-grained manner, and different target configuration items and configuration values can be returned according to the clients with different attributes, so that the clients can reconfigure the original configuration items based on the configuration values and the target configuration items, and flexible configuration of different clients is achieved.
In an embodiment, in step S13, the step of determining the latest configuration item corresponding to the original configuration item according to the attribute information may specifically include:
s131, acquiring a time stamp of the original configuration item;
s132, judging whether the original configuration item is the latest configuration item according to the timestamp of the original configuration item;
and S133, if not, updating the failure time of the original configuration item to the current time, and acquiring the configuration item with the timestamp closest to the current time to obtain the latest configuration item.
In this embodiment, the timestamp of the original configuration item configured last time by the application program may be obtained, the timestamp of the latest configuration item in the current database is extracted, whether the timestamp of the original configuration item is consistent with the timestamp of the latest configuration item is determined, and if yes, the original configuration item does not need to be reconfigured; otherwise, updating the failure time of the original configuration item to the current time, and acquiring the configuration item with the timestamp closest to the current time as the latest configuration item.
In addition, the configuration center can configure each configuration item of the configuration page of the application program, one configuration item can configure different configuration values, respectively specify a configuration policy (wherein, the configuration value of one default configuration item is provided, and when all the configuration policies are not matched, the default configuration is returned), the configuration item is stored after the configuration policy of the configuration value is specified, the failure time of the previous configuration item is reconfigured to be the current time when the configuration item is stored, so that the old configuration item is failed, and the original configuration item of which the configuration values are completely configured is stored, and the latest configuration item is obtained.
In an embodiment, before step S14, that is, before the step of obtaining the configuration policy corresponding to the target configuration item, the method may further include:
newly adding a rule space of the item to be configured of the application program; the rule space is used for setting and storing the configuration rules of the configuration items;
and acquiring fact data required by the configuration rule, and generating the configuration strategy of the configuration item according to the fact data.
In this embodiment, the rule space is a control granularity when the rules are matched, and for the same application program, the matched rules sometimes consume redundant computation, so that the rule space is divided for different scenes, and only the rules in the rule space are matched for a specific scene, such as three rule spaces of a configuration item policy issuing scene, a static resource policy issuing scene, and a dynamic data policy issuing scene.
Specifically, in a scenario of configuration item management, it is assumed that an application needs to access configuration item management, a developer needing the application first newly adds a rule space of an item to be configured of the application in a configuration center, develops a fact data acquisition interface, synchronizes fact data needed to be used by a matching rule to a database, subsequently acquires fact data needed by the configuration rule, and generates a configuration policy of the configuration item according to the fact data.
Fact data is input for rule matching, and may be user attributes obtained from different users (or other entities) in the database, or may be environmental attributes of front-end references. The fact key is included in the fact data and is used for acquiring the unique identification of the fact data of the user (or other entities).
In an embodiment, the step of generating the configuration policy of the configuration item according to the fact data may specifically include:
determining rule dimensions, relation operators and input dimension attribute comparison values according to the fact data;
and taking the rule dimension, the relation operator and the input dimension attribute comparison value as a plurality of rule patterns, forming a condition by the rule patterns, forming a configuration rule by the conditions, and generating the configuration strategy containing the configuration rule.
Wherein, the rule dimension refers to a dimension used for reference in matching; the dimension attribute contrast value is a value of a certain rule dimension in a specific matching scene; a rule pattern is composed of rule dimensions, relation operators and dimension attribute comparison values, and by matching with fact data, each rule pattern has two results of matching and mismatching on a group of fact data. The comparison value is a value for comparing a certain dimension in the rule mode; the condition is composed of a plurality of rule patterns, and the condition is satisfied as long as one rule pattern is matched. The configuration rule generated by the configuration center is composed of one or more conditions, and if all subsequent conditions are met, the rule is matched so as to match from multiple dimensions, and the matching progress is improved.
The relational operator is similar to a greater-than-equal comparison relation, and can also be equal to, included in or supported by other subsequent extensions.
In an embodiment, in step S14, the step of matching the attribute information of the client with the configuration policy corresponding to the target configuration item may specifically include:
s141, acquiring a target configuration rule of a configuration strategy corresponding to the target configuration item and an original configuration rule of a configuration strategy of an original configuration item;
and S142, matching the target configuration rule with the original configuration rule, wherein if all conditions in the target configuration rule and the original configuration rule are matched in a regular mode, the attribute information of the client is matched with the configuration strategy corresponding to the target configuration item.
In the embodiment, a configuration center configures rules to a rule management interface according to requirements, selects rule dimensions, selects a relation operator and an input dimension attribute contrast value as a rule mode, configures a plurality of rule modes to form a condition, and configures a plurality of conditions to form rules; the client transmits the fact data, acquires the key and the environmental parameters, and performs rule matching, the configuration center firstly passes through the fact data and then acquires data corresponding to a rule space in the database, and matches the target configuration rule with the original configuration rule, if all the conditions are matched in a rule mode, the attribute information of the client is matched with the configuration strategy corresponding to the target configuration item, and therefore matching precision is improved.
In an embodiment, when the target configuration rule includes a plurality of configuration rules, the step of matching the attribute information of the client with the configuration policy corresponding to the target configuration item includes:
determining a priority of the target configuration rule;
and matching the attribute information of the client with the configuration strategies corresponding to the target configuration items in sequence according to the priority level.
In this embodiment, multithread processing rule matching may also be adopted, the priority is set for the rule pattern, the attribute information of the client is sequentially matched with the configuration policies corresponding to the plurality of target configuration items according to the priorities, and if the target configuration rule with the higher priority can be determined whether the attribute information of the client is matched with the configuration policies corresponding to the plurality of target configuration items, the matching of the target configuration rule with the lower priority is not required subsequently, so that redundant computation is reduced, and the processing efficiency of the computer is improved.
In an embodiment, after step S15, that is, after the step of returning the configuration value and the target configuration item to the client, and enabling the client to reconfigure the original configuration item based on the configuration value and the target configuration item, the method may further include:
acquiring the abstract value of the configuration item of the client;
acquiring reference abstract values of all configuration items of the client, and comparing and checking the reference abstract values with the abstract values;
and if the reference abstract value is the same as the abstract value, the verification is passed.
In this embodiment, in order to improve the accuracy and security of the updated content of the target configuration item, the configuration center obtains all configuration items that the client should obtain at the server side, calculates a digest value, and returns the digest value to the client side. When the client side obtains the newly added configuration item, the newly added configuration item is combined with the existing configuration item and the reference abstract value is calculated, and before the newly added configuration item is updated by the client side, whether the reference abstract value after the combination of the configuration items is consistent with the abstract value of the client side or not is checked.
If the updated content of the target configuration item does not meet the check rule, indicating that error information exists in the updated content of the target configuration item, and failing to check; if the updated content of the target configuration item meets the check rule, the error information does not exist in the updated content of the target configuration item, the check is passed, and the configuration center stores the updated content of the target configuration item.
Referring to fig. 2, an embodiment of the present application further provides a configuration apparatus for an application configuration item, including:
an obtaining module 11, configured to respond to a configuration request of an application sent by a client, and obtain an original configuration item of the application;
an extracting module 12, configured to extract attribute information of the client from the configuration request;
a determining module 13, configured to determine, according to the attribute information, a latest configuration item corresponding to the original configuration item, to obtain a target configuration item;
a matching module 14, configured to obtain a configuration policy corresponding to the target configuration item, match the attribute information of the client with the configuration policy corresponding to the target configuration item, and determine a configuration value according to a matching result;
and a returning module 15, configured to return the configuration value and the target configuration item to the client, so that the client reconfigures the original configuration item based on the configuration value and the target configuration item.
The client can send the configuration request of the application program to the configuration center at regular time so as to actively update and configure the original configuration item of the application program of the client in time, the configuration center does not need to initiate the update of the configuration item to the client one by one, and after receiving the configuration request, the configuration center determines the original configuration item of the application program, namely the current configuration item, according to the configuration request.
In the configuration, in the system development process, some parameters, variables and the like of the application program which need to be changed are usually separated from the code and independently managed, and exist in the form of independent configuration files. The aim is to better adapt static system artifacts or deliverables (e.g., WAR, JAR package, etc.) to the actual physical operating environment. Configuration management is typically included in the system deployment process, and is done by a system administrator or operation and maintenance personnel. Configuration changes are one of the effective means to adjust the behavior of the system at runtime.
A configuration item may refer to a configurable parameter and its value range, e.g., an adjustment to a parameter of an application to conform to the operating environment of the application. But also items such as specific pictures, text, video, emoticons, and the like.
The client can send the configuration request of the application program to the configuration center at regular time, and the configuration center determines the original configuration item, namely the current configuration item, of the application program according to the configuration request.
In addition, the configuration request includes some attribute information of the client, such as a timestamp of the original configuration item, parameter information of the configuration item, running parameter information of the application program, environment information, and the like. And then inquiring the latest configuration item corresponding to the original configuration item according to the attribute information to determine the latest configuration item corresponding to the original configuration item, and taking the latest configuration item as a target configuration item. For example, all reference parameters of the latest configuration item and all parameters of the original configuration item in the database can be extracted, all reference parameters of the latest configuration item are compared with all parameters of the original configuration item one by one, and if all reference parameters of the latest configuration item are matched with all parameters of the original configuration item, it is indicated that the original configuration item of the application program is not updated, and the original configuration item does not need to be reconfigured; if the parameter which is not matched with the latest configuration item exists in the original configuration item, the original configuration item of the application program is indicated to be updated, and the original configuration item needs to be reconfigured by using the latest configuration item.
When the configuration strategy corresponding to the target configuration item is obtained, a relationship operator (if larger than or smaller than) and a target reference value are selected according to a plurality of attribute dimensions which are pre-stored in the system to generate a complex strategy based on different dimensions, then matching is carried out on the attribute information of the client and the attribute dimensions in the configuration strategy, and the configuration value is determined according to the matching result, namely the configuration strategy is a scheme for configuring the configuration item based on different attribute dimensions, wherein the attribute dimensions correspond to the attribute information of the client, so that whether the configuration strategy for configuring the target configuration item corresponds to the attribute information of the client is further judged. For example, assuming that the application program is a game, the attribute dimension is operation parameter information of the game, and may specifically be definition of a display interface, if the definition of the display interface is low during the operation of the game, the configuration policy should contain a configuration scheme for improving the definition of the display interface, and if the configuration policy does not contain a configuration scheme for improving the definition of the display interface, it is determined that a matching result is mismatching, and a configuration value corresponding to the mismatching result is returned, and if the configuration value is 0, the configuration value is set as a mismatching result; setting the configuration value of 1 as the matching result of the match.
And the configuration value is used for evaluating the legality of the target configuration item, and only when the target configuration item is detected to be illegal, the original configuration item in the application program is replaced and updated according to the target configuration item, and the application program is started, so that the normal starting of the application program is ensured.
And determining a configuration value according to the matching result, acquiring user information stored in the system by the configuration center according to the transmission information of the client, calculating a rule strategy, returning the newly added configuration items on the matching to the client, verifying the configuration value by the client, determining whether to refresh the effective target configuration item, and caching the time for acquiring the configuration item for acquiring the incremental configuration next time. For example, when the configuration value received by the client is 1, replacing and updating the original configuration item in the application program according to the target configuration item, and starting the application program; when the configuration value received by the client is 0, the original configuration item is not reconfigured for the moment.
As described above, it can be understood that each component of the configuration apparatus for an application configuration item provided in the present application may implement the function of any one of the configuration methods for an application configuration item described above, and a detailed structure is not described again.
Referring to fig. 3, an embodiment of the present application further provides a computer device, and an internal structure of the computer device may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a storage medium and an internal memory. The storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and computer programs in the storage medium. The database of the computer device is used for storing data such as configuration items, configuration strategies and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of configuring an application configuration item.
The processor executes the configuration method of the application program configuration item, and the method comprises the following steps:
responding to a configuration request of an application program sent by a client, and acquiring an original configuration item of the application program;
extracting attribute information of the client from the configuration request;
determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item;
acquiring a configuration strategy corresponding to the target configuration item, matching the attribute information of the client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result;
and returning the configuration value and the target configuration item to the client, so that the client reconfigures the original configuration item based on the configuration value and the target configuration item.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements a method for configuring an application configuration item, including the steps of:
responding to a configuration request of an application program sent by a client, and acquiring an original configuration item of the application program;
extracting attribute information of the client from the configuration request;
determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item;
acquiring a configuration strategy corresponding to the target configuration item, matching the attribute information of the client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result;
and returning the configuration value and the target configuration item to the client, so that the client reconfigures the original configuration item based on the configuration value and the target configuration item.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), Synch Lnk DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
To sum up, the most beneficial effect of this application lies in:
according to the configuration method, device, equipment and storage medium of the application program configuration item, the original configuration item of the application program is obtained by responding to the configuration request of the application program sent by a client; extracting attribute information of the client from the configuration request; determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item; acquiring a configuration strategy corresponding to a target configuration item, matching attribute information of a client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result; and returning the configuration value and the target configuration item to the client, so that the client reconfigures the original configuration item based on the configuration value and the target configuration item. According to the method and the device, the configuration items are managed in a finer-grained manner, and different target configuration items and configuration values can be returned according to the clients with different attributes, so that the clients can reconfigure the original configuration items based on the configuration values and the target configuration items, and flexible configuration of different clients is achieved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and 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 which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A method for configuring an application configuration item, comprising the steps of:
responding to a configuration request of an application program sent by a client, and acquiring an original configuration item of the application program;
extracting attribute information of the client from the configuration request;
determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item;
acquiring a configuration strategy corresponding to the target configuration item, matching the attribute information of the client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result;
and returning the configuration value and the target configuration item to the client, so that the client reconfigures the original configuration item based on the configuration value and the target configuration item.
2. The method according to claim 1, wherein the step of determining the latest configuration item corresponding to the original configuration item according to the attribute information comprises:
acquiring a timestamp of the original configuration item;
judging whether the original configuration item is the latest configuration item or not according to the timestamp of the original configuration item;
if not, updating the failure time of the original configuration item to the current time, and acquiring the configuration item with the timestamp closest to the current time to obtain the latest configuration item.
3. The method according to claim 1, wherein the step of obtaining the configuration policy corresponding to the target configuration item further comprises, before the step of obtaining the configuration policy corresponding to the target configuration item:
newly adding a rule space of the item to be configured of the application program; the rule space is used for setting and storing the configuration rules of the configuration items;
and acquiring fact data required by the configuration rule, and generating the configuration strategy of the configuration item according to the fact data.
4. The method of claim 3, wherein the step of generating the configuration policy for the configuration item according to the fact data comprises:
determining rule dimensions, relation operators and input dimension attribute comparison values according to the fact data;
and taking the rule dimension, the relation operator and the input dimension attribute comparison value as a plurality of rule patterns, forming a condition by the rule patterns, forming a configuration rule by the conditions, and generating the configuration strategy containing the configuration rule.
5. The method according to claim 4, wherein the step of matching the attribute information of the client with the configuration policy corresponding to the target configuration item comprises:
acquiring a target configuration rule of a configuration strategy corresponding to a target configuration item and an original configuration rule of a configuration strategy of an original configuration item;
and matching the target configuration rule with the original configuration rule, wherein if all conditions in the target configuration rule and the original configuration rule are matched in a rule mode, the attribute information of the client is matched with the configuration strategy corresponding to the target configuration item.
6. The method according to claim 1, wherein when the target configuration rule includes a plurality of configuration rules, the step of matching the attribute information of the client with the configuration policy corresponding to the target configuration item includes:
determining a priority of the target configuration rule;
and matching the attribute information of the client with the configuration strategies corresponding to the target configuration items in sequence according to the priority level.
7. The method of claim 1, wherein after the step of returning the configuration values and the target configuration items to the client and enabling the client to reconfigure the original configuration items based on the configuration values and the target configuration items, the method further comprises:
acquiring the abstract value of the configuration item of the client;
acquiring reference abstract values of all configuration items of the client, and comparing and checking the reference abstract values with the abstract values;
and if the reference abstract value is the same as the abstract value, the verification is passed.
8. An apparatus for configuring an application configuration item, comprising:
the acquisition module is used for responding to a configuration request of an application program sent by a client and acquiring an original configuration item of the application program;
the extracting module is used for extracting the attribute information of the client from the configuration request;
the determining module is used for determining the latest configuration item corresponding to the original configuration item according to the attribute information to obtain a target configuration item;
the matching module is used for acquiring the configuration strategy corresponding to the target configuration item, matching the attribute information of the client with the configuration strategy corresponding to the target configuration item, and determining a configuration value according to a matching result;
and the return module is used for returning the configuration value and the target configuration item to the client so that the client reconfigures the original configuration item based on the configuration value and the target configuration item.
9. A computer device, comprising:
a processor;
a memory;
a computer program, wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program being configured to perform the method of configuring an application configuration item according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method of configuring an application configuration item according to any one of claims 1 to 7.
CN202110720116.2A 2021-06-28 2021-06-28 Configuration method, device and equipment of application program configuration items and storage medium Pending CN113282327A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110720116.2A CN113282327A (en) 2021-06-28 2021-06-28 Configuration method, device and equipment of application program configuration items and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110720116.2A CN113282327A (en) 2021-06-28 2021-06-28 Configuration method, device and equipment of application program configuration items and storage medium

Publications (1)

Publication Number Publication Date
CN113282327A true CN113282327A (en) 2021-08-20

Family

ID=77285685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110720116.2A Pending CN113282327A (en) 2021-06-28 2021-06-28 Configuration method, device and equipment of application program configuration items and storage medium

Country Status (1)

Country Link
CN (1) CN113282327A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157710A (en) * 2021-12-02 2022-03-08 中国电信股份有限公司 Communication strategy configuration method, device, storage medium and equipment
CN115858012A (en) * 2022-12-30 2023-03-28 广州市易鸿智能装备有限公司 Program variable configuration method, device, electronic equipment and storage medium
CN116009949A (en) * 2023-03-28 2023-04-25 税友软件集团股份有限公司 Numerical value acquisition method, device, equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157710A (en) * 2021-12-02 2022-03-08 中国电信股份有限公司 Communication strategy configuration method, device, storage medium and equipment
CN115858012A (en) * 2022-12-30 2023-03-28 广州市易鸿智能装备有限公司 Program variable configuration method, device, electronic equipment and storage medium
CN115858012B (en) * 2022-12-30 2023-10-20 广州市易鸿智能装备有限公司 Program variable configuration method, device, electronic equipment and storage medium
CN116009949A (en) * 2023-03-28 2023-04-25 税友软件集团股份有限公司 Numerical value acquisition method, device, equipment and storage medium
CN116009949B (en) * 2023-03-28 2023-08-29 税友软件集团股份有限公司 Numerical value acquisition method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113282327A (en) Configuration method, device and equipment of application program configuration items and storage medium
WO2007054129A1 (en) A system for maintaining data
CN110633160A (en) Interface calling method and device, computer equipment and storage medium
CN110224855B (en) Registration method and device of micro service instance, computer equipment and storage medium
US20070118507A1 (en) Managing software configuration of a wireless device
CN111984228B (en) Interface document processing method and device, computer equipment and storage medium
CN110276074B (en) Distributed training method, device, equipment and storage medium for natural language processing
CN112613993B (en) Transaction data processing method and device, computer equipment and storage medium
CN113326081A (en) Static resource processing method and device, computer equipment and storage medium
US9772834B2 (en) Exportable encoded identifications of networked machines
US20090150882A1 (en) System and method for software application installation
US9058313B2 (en) Test method for distributed processing system and distributed processing system
US20100235842A1 (en) Workflow processing system, and method for controlling same
CN112667272A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN111835504B (en) Identification code generation method and server
CN110543465B (en) Directory operation method and device, computer equipment and storage medium
CN111581063A (en) Data processing method, readable storage medium and electronic device
CN110647336A (en) Gray scale distribution method and device, computer equipment and storage medium
CN113489650B (en) Routing method, device and equipment of client and storage medium
CN114237633A (en) Application configuration method, device, equipment and storage medium
CN111814174B (en) Data access control method and device and computer equipment
US9998495B2 (en) Apparatus and method for verifying detection rule
CN114116064A (en) Configuration file processing method and device and server
CN115017538A (en) Data processing method and device, electronic equipment and storage medium
CN108897772B (en) Data source supplementing method and device, computer equipment and storage medium

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