[go: up one dir, main page]

CN110825425B - Configuration data management method and device, electronic equipment and storage medium - Google Patents

Configuration data management method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110825425B
CN110825425B CN201810903412.4A CN201810903412A CN110825425B CN 110825425 B CN110825425 B CN 110825425B CN 201810903412 A CN201810903412 A CN 201810903412A CN 110825425 B CN110825425 B CN 110825425B
Authority
CN
China
Prior art keywords
configuration data
acquisition request
data acquisition
client
configuration
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.)
Active
Application number
CN201810903412.4A
Other languages
Chinese (zh)
Other versions
CN110825425A (en
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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810903412.4A priority Critical patent/CN110825425B/en
Publication of CN110825425A publication Critical patent/CN110825425A/en
Application granted granted Critical
Publication of CN110825425B publication Critical patent/CN110825425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to a configuration data management method and device, electronic equipment and storage medium, and relates to the technical field of computers, wherein the method comprises the following steps: receiving a configuration data acquisition request aiming at a client, and judging whether the configuration data acquisition request is a gray level strategy or not; if the configuration data acquisition request belongs to the gray scale strategy, returning gray scale configuration data corresponding to the configuration data acquisition request; and if the configuration data acquisition request belongs to a non-gray level strategy, returning the online configuration data corresponding to the configuration data acquisition request. The present disclosure enables configuration data grayscale changes and reduces the impact on an online user.

Description

Configuration data management method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a configuration data management method, a configuration data management apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of e-commerce platform services, on-line configuration data is changed more and more frequently, for example, configuration documents are frequently modified and partial functions are degraded. Any misoperation caused by configuration change can have a certain influence on the online environment, and the user experience can be influenced when serious, even the online environment cannot be ordered and paid.
In the related art, the function of notifying the data change in real time can be realized through a watch mechanism of the zookeeper, all configuration data of the zookeeper can be loaded into a memory when a service system is started, the memory data can be updated when the data is changed, and the service system only reads the configuration data from the memory. In the scheme, any change of configuration data is full, and gray level changes such as a white list, a client and a version cannot be realized; errors caused by manual operation can cause full quantity to take effect to influence on-line users, and verification and full quantity operation can not be performed, so that a certain risk exists in configuration of the system.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure aims to provide a configuration data management method and apparatus, an electronic device, and a storage medium, so as to overcome at least to some extent the problem that configuration data does not support gray level change due to limitations and drawbacks of the related art.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to one aspect of the present disclosure, there is provided a configuration data management method including: receiving a configuration data acquisition request aiming at a client, and judging whether the configuration data acquisition request is a gray level strategy or not; if the configuration data acquisition request belongs to the gray scale strategy, returning gray scale configuration data corresponding to the configuration data acquisition request; and if the configuration data acquisition request belongs to a non-gray level strategy, returning the online configuration data corresponding to the configuration data acquisition request.
In one exemplary embodiment of the present disclosure, before receiving the configuration data acquisition request for the client, the method further includes: adding gray nodes into a storage structure in a configuration system; and adding gray level storage for the storage structure of the client memory data according to the gray level node so as to generate the gray level configuration data.
In an exemplary embodiment of the present disclosure, determining whether the configuration data acquisition request is a gray scale policy includes: judging whether the configuration data acquisition request is the gray level policy or not according to a request parameter in the configuration data acquisition request, wherein the request parameter comprises at least one of memory white list data, client data and version data.
In an exemplary embodiment of the present disclosure, determining, by a request parameter in the configuration data acquisition request, whether the configuration data acquisition request is the grayscale policy includes: comparing the memory white list data in the request parameters with reference white list data of a client; and if the memory white list data is matched with the reference white list data, determining that the configuration data acquisition request belongs to the gray scale strategy.
In an exemplary embodiment of the present disclosure, determining, by a request parameter in the configuration data acquisition request, whether the configuration data acquisition request is the grayscale policy includes: comparing the client data contained in the request parameters with the reference data of the client; and if the client data contained in the request parameters are matched with the reference data of the client, determining that the configuration data acquisition request belongs to the gray scale strategy.
In one exemplary embodiment of the present disclosure, the client data includes a version of the client.
In one exemplary embodiment of the present disclosure, the request parameters in the configuration data acquisition request are stored into the thread cache through a filter.
In an exemplary embodiment of the present disclosure, the method further comprises: and if the gray scale configuration data or the on-line configuration data is not read, returning default configuration data corresponding to the configuration data acquisition request.
According to an aspect of the present disclosure, there is provided a configuration data management apparatus including: the request judging module is used for receiving a configuration data acquisition request aiming at the client and judging whether the configuration data acquisition request is a gray level strategy or not; the gray level configuration module is used for returning gray level configuration data corresponding to the configuration data acquisition request if the configuration data acquisition request belongs to the gray level strategy; and the online configuration module is used for returning online configuration data corresponding to the configuration data acquisition request if the configuration data acquisition request belongs to a non-gray level strategy.
According to one aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the configuration data management method of any one of the above via execution of the executable instructions.
According to one aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the configuration data management method of any one of the above.
In the configuration data management method, the configuration data management device, the electronic device and the computer readable storage medium provided in the exemplary embodiments of the present disclosure, on one hand, by judging whether a configuration data acquisition request is a gray scale policy, determining to return gray scale configuration data or online configuration data, the configuration data can support gray scale change; on the other hand, by judging whether the corresponding configuration data is returned for the gray level strategy, the problem that the whole configuration data is effective when the configuration data is modified is avoided, the influence on-line users is avoided, the safety of the configuration system is improved, and meanwhile, the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 schematically illustrates a system architecture diagram for implementing configuration data management in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a configuration data management method in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a system block diagram of a configuration change in an exemplary embodiment of the present disclosure;
FIG. 4 schematically illustrates a configuration system storage architecture diagram in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a particular flow diagram for acquiring configuration data in an exemplary embodiment of the present disclosure;
FIG. 6 schematically illustrates a particular flow diagram for initializing configuration data in an exemplary embodiment of the present disclosure;
FIG. 7 schematically illustrates a particular flow diagram for altering configuration data in an exemplary embodiment of the present disclosure;
FIG. 8 schematically illustrates a block diagram of a configuration data management apparatus in an exemplary embodiment of the present disclosure;
FIG. 9 schematically illustrates a block diagram of an electronic device in an exemplary embodiment of the present disclosure;
Fig. 10 schematically illustrates a program product in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
In this exemplary embodiment, a system architecture for implementing a configuration data management method is provided first, and may be applied to an application scenario for generating configuration data for a client. As shown with reference to fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send request instructions or the like. Various communication client applications, such as a picture processing application, a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (merely an example) that processes a configuration data acquisition request transmitted by a user with the terminal devices 101, 102, 103. And may feed back the processing result (e.g., the matching result, etc.) to the terminal device.
It should be noted that, the configuration data management method provided by the embodiment of the present application is generally executed by the server 105, and accordingly, the configuration data management apparatus is generally disposed in the terminal device 101.
Based on the system architecture 100 described above, a configuration data management method is provided in this example, and referring to fig. 2, the configuration data management method may include the following steps:
In step S210, a configuration data acquisition request for a client is received, and whether the configuration data acquisition request is a gray scale policy is determined;
In step S220, if the configuration data acquisition request belongs to the gray scale policy, gray scale configuration data corresponding to the configuration data acquisition request is returned;
In step S230, if the configuration data acquisition request belongs to a non-gray scale policy, on-line configuration data corresponding to the configuration data acquisition request is returned.
In the configuration data management method provided in the present exemplary embodiment, on the one hand, by determining whether the configuration data acquisition request is a gray scale policy, it is determined to return gray scale configuration data or online configuration data, so that the configuration data can support gray scale change; on the other hand, by judging whether the corresponding configuration data is returned for the gray level strategy, the problem that the whole configuration data is effective when the configuration data is modified is avoided, the influence on-line users is avoided, the safety of the configuration system is improved, and meanwhile, the user experience is improved.
Next, specific steps of the configuration data management method in the present exemplary embodiment are further explained with reference to the drawings.
In step S210, a configuration data acquisition request for a client is received, and it is determined whether the configuration data acquisition request is a gray scale policy.
In the present exemplary embodiment, the client refers to an application program corresponding to a server, which provides a local service to a user. Referring to fig. 3, the system mainly includes an SOA (service-orientedarchitecture, service oriented architecture), client memory data, and a configuration system. Among these, service Oriented Architecture (SOA) is a component model that links the different functional units of an application program through well-defined interfaces and contracts between these services. The memory data of the client refers to a storage structure of the memory data in the client.
In the present exemplary embodiment, the configuration function for the client may be implemented by an open source configuration system such as Feature, consul, etcd, eureka, zookeeper. Wherein, eureka needs to explicitly configure health check support when in use; zookeeper, etcd the task is unhealthy in the event of loss of connectivity to the service process. Consul accomplish synchronization across data centers via the Gossip protocol of the WAN. Except Eureka, other configuration systems can support KV storage services externally, a server side is supported by a choice Zookeeper in CAP theory in product design to push changes, and Eureka, consul, etcd realizes the perception of the changes in a long polling mode.
In this example, the configuration system is exemplified as a Zookeeper configuration system. Referring to fig. 3, the system mainly includes an SOA, client memory data, a Zookeeper configuration system and a watch mechanism of the Zookeeper configuration system, so as to detect data change through the watch mechanism. Referring to fig. 4, the configuration system includes an on-line node, where the on-line node includes an application, and the application specifically includes an on-line service configuration and an on-line switch configuration. In order to realize gray distribution, a gray function is added to a configuration system, so that gray configuration data is generated. Specifically, gray nodes are added to the storage structure of the configuration system Zookeeper on the basis of on-line nodes, such as shown in fig. 4. Based on the added gray level nodes, gray level storage can be added for the storage structure of the client memory data, so that gray level configuration data can be generated. The gray node includes an application, and the application specifically includes white list data, client data, version data, and the like, and may include an on-line service configuration and an on-line switch configuration.
The configuration data acquisition request may include a request parameter describing the client, where the request parameter includes, but is not limited to, at least one of memory whitelist data, client data, and version data. After obtaining the request parameters, it may be determined whether the configuration data acquisition request is a gray scale policy according to the request parameters. The gray scale policy herein refers to gray scale distribution, which is a distribution manner that enables smooth transition between black and white. For example, AB test is a gray level distribution mode, which allows a part of users to continue using a and a part of users to start using B, and if the users have no objection to B, the range is gradually expanded, and all users are migrated to B. The stability of the whole system can be ensured through gray level release, problems can be found and adjusted in the initial gray level, and new functional modification can be rapidly verified so as to ensure the influence degree.
Specifically, whether the configuration data acquisition request is a gray scale policy may be determined by a request parameter in the configuration data acquisition request. Specifically, three modes can be included, for example, judging only through the memory white list data, judging only through the client data, or judging through the memory white list data and the client data at the same time. The in-memory white list data refers to a predetermined account pin, that is, a user account of the client. The client data includes specific data of a client type and a version number corresponding to each client type, such as a name, version number, identification, and the like. The client type may include IOS, android, and page type H5, and the version number refers to different versions corresponding to the application program, and may include a test version, a stable version, a formal version, and so on. Or client 1 a Zhuo Ban 9.2.2, client 2 IOS version 9.2, etc.
It should be noted that, request parameters such as memory whitelist data and client data included in the configuration data acquisition request may be stored in a thread cache in advance through a filter, and the thread cache may create a copy for each thread for the variables, for example ThreadLocal, threadLocal, so that each thread may access its own internal copy variable, thereby ensuring data security. In the present exemplary embodiment, by storing the request parameter in the thread cache, the request parameter stored in the thread cache may be directly compared with the reference value stored in the client, thereby improving the operation efficiency. The precondition for storing the request parameters in the thread cache is to define the parameter format with the configuration data acquisition requester or to implement a defined interface by the requester itself, which also encapsulates the memory white list data and the client data.
Next, a specific description will be given of whether or not the gradation strategy is determined. In the first mode, when the memory white list data is used for judging whether the configuration data acquisition request is a gray scale policy, the memory white list data in the request parameters can be compared with the reference white list data of the client; and if the memory white list data is matched with the reference white list data, determining that the configuration data acquisition request belongs to the gray scale strategy. The reference white list data of the client may be, for example, a user account number belonging to the white list data determined according to the historical data in the client, and the reference white list data may include account number 1, account number 2, account number 3, account number 4, and so on. The memory white list data in the request parameter may or may not be completely consistent with the reference white list data. The memory white list data is different for different clients. For example, the memory white list data in the request parameter includes account number 2, and since the memory white list data exists in the reference white list data of the client, the matching of the request parameter and the reference white list data can be considered successful, so that the configuration data acquisition request can be determined to belong to the gray scale policy. For another example, the white list data in the request parameter includes account number 5, and since the white list data in the reference white list data of the client does not exist, it may be determined that the configuration data acquisition request does not belong to the gray policy.
In a second mode, the specific steps when using the client data to determine whether the client data is a gray scale policy include: comparing the client data contained in the request parameters with the reference data of the client; and if the client data contained in the request parameters are matched with the reference data of the client, determining that the configuration data acquisition request belongs to the gray scale strategy. Since it is not necessary to apply a gray scale policy to all versions of the client, the client data in this example refers to a certain version of each type of client, and in particular, which version may be determined according to actual needs. For example, the client data is the name, version number, and identifier of the client 1a Zhuo Ban 9.2.2, and the reference data of the client is the data of a client of a certain version, such as the name, version number, and identifier corresponding to the client 1a Zhuo Ban 9.2.2. Next, the client data of the client 1a Zhuo Ban 9.2.2 contained in the request parameter can be compared and matched with the name, version number, identification and the like corresponding to the client 1a Zhuo Ban 9.2.2, and if the matching is successful, the configuration data acquisition request can be determined to belong to the gray level strategy; if any one of the client data fails to match, determining that the configuration data acquisition request does not belong to the gray scale policy.
In addition, whether the configuration data acquisition request belongs to the gray level policy can be judged by combining the memory white list data with the client data, and the specific process is similar to the process of only using the memory white list data and only using the client data, so that the detailed description is omitted here.
In the present exemplary embodiment, gray scale storage is added to the storage structure of the configuration system, so that the problem that the service function cannot partially gray scale is solved. In addition, the verification process of the gray level strategy is added, so that the configuration data supports white list verification and gray level change, and the configuration data is distributed according to the gray level of the client and the version.
In step S220, if the configuration data acquisition request belongs to the gray scale policy, gray scale configuration data corresponding to the configuration data acquisition request is returned.
In the present exemplary embodiment, the gray scale configuration data refers to configuration data of a client that satisfies a gray scale policy, and may be, for example, configuration data for a client in an internal measurement phase, and the range of the gray scale configuration data may be larger than that for a formally online client. In this example, the gray scale configuration data is specifically generated by adding gray scale nodes to the storage structure of the Zookeeper configuration system, and adding gray scale storage to the storage structure of the client memory data based on the added gray scale nodes. The grayscale configuration data may include, but is not limited to, configuration parameters such as the name of the client, version number, profile, logo, icon, billing status, screenshot, time and number of grayscale release, and user attribute information of the object to be delivered. When the configuration data is manually changed, only the gradation configuration data may be changed without affecting other configuration data. And if the configuration data acquisition request meets the gray level strategy, performing gray level release on the client according to the gray level configuration data.
By the method in the exemplary embodiment, the problem that the total quantity is effective after misoperation caused by manual modification of the configuration data is avoided, and the influence on-line users is avoided, so that the change range of the configuration data is controllable, the configuration system is more sound, and the user experience is improved.
In step S230, if the configuration data acquisition request belongs to a non-gray scale policy, on-line configuration data corresponding to the configuration data acquisition request is returned.
In this exemplary embodiment, if the memory white list data in the request parameter does not match the reference white list data of the client, or if the client data in the request parameter does not match the reference data of the client, the configuration data acquisition request of the client may be considered not to belong to the gray scale policy. The online configuration data refers to configuration data corresponding to a client that is online, and the online configuration data may include, but is not limited to, configuration parameters such as a name, version number, profile, identifier, icon of the client, charging condition, screenshot, time and number of gray release, and user attribute information of the object to be released, but specific values of the configuration parameters may be different from the gray configuration data. And if the configuration data acquisition request does not meet the gray scale strategy, reading the on-line configuration data.
It should be added that if neither the gradation configuration data nor the on-line configuration data is read, default configuration data corresponding to the configuration data acquisition request is returned. The default configuration data may be set in advance according to actual requirements, which is not limited herein.
Through the addition of the gray level storage to the storage structure of the configuration system in the present exemplary embodiment, the problem that the service function cannot change part of gray levels is solved. In addition, the verification process of the gray level strategy is increased, so that the verification process supports white list verification, and the gray level strategy is released according to the gray level of the client and the version. In addition, the problem that the configuration data is fully effective after misoperation is manually modified is avoided, and the influence on an online user is avoided, so that the change range of the configuration data is controllable, the configuration system is more sound, and the user experience is improved.
Specific flowcharts for managing configuration data are shown in fig. 5 to 7, wherein fig. 5 includes a process for acquiring configuration data, and specific steps include:
Step S500, acquiring configuration data. In step S501, request parameters such as the memory white list data, the client data, and the version data are read. Step S502, comparing and judging whether the configuration data acquisition request is a gray scale strategy according to the request parameters. Step S503, determining whether the configuration data acquisition request is a gray scale policy. Step S504, if the gray scale strategy is adopted, the gray scale configuration data is returned. Step S505, if it does not belong to the gray scale policy, returns the on-line configuration data. Step S506, determining whether the gray configuration data and the on-line configuration data are read. If so, the entire process is ended. Step S507, if the gradation configuration data and the on-line configuration data are not read, the default configuration data is returned.
The process of initializing configuration data is shown in fig. 6, and specifically includes: step S610, initializing a configuration file. In step S611, the configuration data is read from the configuration system Zookeeper. Step S612, judging whether the reading is successful. If the reading is successful, step S613 is performed to load the configuration data into the memory. In step S614, the gray scale storage is added to the gray scale data storage structure for the memory data storage structure in the client. In step S615, it is determined whether the loading into the memory is successful. In step S616, data change snooping is added. If the reading fails, step S617 is performed to obtain configuration data from the local file. Step S618 judges whether the reading from the local file is successful. If successful, go to step S613. If so, the process proceeds to step S619 to determine a startup failure.
In addition, the process of changing configuration data in fig. 7 specifically includes: step S720, change the configuration data. In step S721, the configuration data change is determined by the configuration system Zookeeper. In step S722, the listener is notified of the change. In step S723, the memory data is controlled to be changed. Step S724, the change node is monitored again.
By the configuration data management method in fig. 5 to 7, the problem that the total quantity is effective after misoperation caused by manual modification of the configuration data is avoided, and the influence on an online user is avoided, so that the change range of the configuration data is controllable, the configuration system is more sound, and the user experience is improved.
In an exemplary embodiment of the present disclosure, there is also provided a configuration data management apparatus, referring to fig. 8, the apparatus 800 includes:
a request judging module 801, configured to receive a configuration data acquisition request for a client, and judge whether the configuration data acquisition request is a gray level policy;
A gray level configuration module 802, configured to return gray level configuration data corresponding to the configuration data acquisition request if the configuration data acquisition request belongs to the gray level policy;
an online configuration module 803 is configured to return online configuration data corresponding to the configuration data acquisition request if the configuration data acquisition request belongs to a non-gray scale policy.
In an exemplary embodiment of the present disclosure, before receiving the configuration data acquisition request for the client, the apparatus further includes: the node adding module is used for adding gray nodes into a storage structure in the configuration system; and the storage structure adjustment module is used for adding gray level storage for the storage structure of the client memory data according to the gray level node so as to generate the gray level configuration data.
In one exemplary embodiment of the present disclosure, the request judging module includes: the judging control module is used for judging whether the configuration data acquisition request is the gray level strategy or not according to the request parameters in the configuration data acquisition request, wherein the request parameters comprise at least one of memory white list data, client data and version data.
In one exemplary embodiment of the present disclosure, the judgment control module includes: the first comparison module is used for comparing the memory white list data in the request parameters with the reference white list data of the client; and the first determining module is used for determining that the configuration data acquisition request belongs to the gray scale policy if the memory white list data is matched with the reference white list data.
In one exemplary embodiment of the present disclosure, the judgment control module includes: the second comparison module is used for comparing the client data contained in the request parameters with the reference data of the client; and the second determining module is used for determining that the configuration data acquisition request belongs to the gray scale strategy if the client data contained in the request parameters are matched with the reference data of the client.
In one exemplary embodiment of the present disclosure, the client data includes a version of the client.
In one exemplary embodiment of the present disclosure, the request parameters in the configuration data acquisition request are stored into the thread cache through a filter.
In an exemplary embodiment of the present disclosure, the apparatus further comprises: and the default reading module is used for returning default configuration data corresponding to the configuration data acquisition request if the gray level configuration data or the on-line configuration data are not read.
It should be noted that, the specific details of each module in the above configuration data management apparatus have been described in detail in the corresponding configuration data management method, so that the details are not repeated here.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 900 according to such an embodiment of the invention is described below with reference to fig. 9. The electronic device 900 shown in fig. 9 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 9, the electronic device 900 is embodied in the form of a general purpose computing device. Components of electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, and a bus 930 connecting the different system components (including the storage unit 920 and the processing unit 910).
Wherein the storage unit stores program code that is executable by the processing unit 910 such that the processing unit 910 performs steps according to various exemplary embodiments of the present invention described in the above-described "exemplary methods" section of the present specification. For example, the processing unit 910 may perform the steps as shown in fig. 2.
The storage unit 920 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 9201 and/or cache memory 9202, and may further include Read Only Memory (ROM) 9203.
The storage unit 920 may also include a program/utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus 930 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 900 may also communicate with one or more external devices 1100 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 900, and/or with any device (e.g., router, modem, etc.) that enables the electronic device 900 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 950. Also, electronic device 900 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 over the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 900, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
Referring to fig. 10, a program product 1000 for implementing the above-described method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (8)

1. A method of configuration data management, comprising:
Adding gray nodes into a storage structure in a configuration system, wherein the gray nodes comprise applications, and the applications comprise white list data, client data and version data, on-line service configuration and on-line switch configuration;
adding gray level storage for a storage structure of client memory data according to the gray level node to generate gray level configuration data;
receiving a configuration data acquisition request aiming at the client and judging whether the configuration data acquisition request is a gray scale strategy or not;
If the configuration data acquisition request belongs to the gray scale strategy, returning gray scale configuration data corresponding to the configuration data acquisition request;
if the configuration data acquisition request belongs to a non-gray level strategy, returning online configuration data corresponding to the configuration data acquisition request;
wherein determining whether the configuration data acquisition request is a gray scale policy comprises:
Judging whether the configuration data acquisition request is the gray level strategy or not according to request parameters in the configuration data acquisition request, wherein the request parameters comprise memory white list data, client data and version data;
and storing the request parameters of the memory white list data and the client data included in the configuration data acquisition request into a thread cache through a filter, wherein the thread cache creates a copy for the variable in each thread, and each thread accesses the copy variable in the thread.
2. The configuration data management method according to claim 1, wherein determining whether the configuration data acquisition request is the grayscale policy by a request parameter in the configuration data acquisition request includes:
comparing the memory white list data in the request parameters with reference white list data of a client;
And if the memory white list data is matched with the reference white list data, determining that the configuration data acquisition request belongs to the gray scale strategy.
3. The configuration data management method according to claim 1, wherein determining whether the configuration data acquisition request is the grayscale policy by a request parameter in the configuration data acquisition request includes:
Comparing the client data contained in the request parameters with the reference data of the client;
And if the client data contained in the request parameters are matched with the reference data of the client, determining that the configuration data acquisition request belongs to the gray scale strategy.
4. A method of configuration data management according to claim 3, wherein the client data comprises a version of the client.
5. The configuration data management method according to claim 1, characterized in that the method further comprises:
And if the gray scale configuration data or the on-line configuration data is not read, returning default configuration data corresponding to the configuration data acquisition request.
6. A configuration data management apparatus, comprising:
The request judging module is used for adding gray nodes into a storage structure in the configuration system, wherein the gray nodes comprise applications, and the applications comprise white list data, client data and version data, on-line service configuration and on-line switch configuration; adding gray level storage for a storage structure of client memory data according to the gray level node to generate gray level configuration data; receiving a configuration data acquisition request aiming at a client, and judging whether the configuration data acquisition request is a gray scale strategy, wherein the judging whether the configuration data acquisition request is the gray scale strategy comprises the following steps: judging whether the configuration data acquisition request is the gray level strategy or not according to request parameters in the configuration data acquisition request, wherein the request parameters comprise memory white list data, client data and version data; storing request parameters of memory white list data and client data included in the configuration data acquisition request into thread caches through a filter, wherein the thread caches create a copy for variables in each thread, and each thread accesses internal copy variables;
The gray level configuration module is used for returning gray level configuration data corresponding to the configuration data acquisition request if the configuration data acquisition request belongs to the gray level strategy;
And the online configuration module is used for returning online configuration data corresponding to the configuration data acquisition request if the configuration data acquisition request belongs to a non-gray level strategy.
7. An electronic device, comprising:
A processor; and
A memory for storing executable instructions of the processor;
wherein the processor is configured to perform the configuration data management method of any of claims 1-5 via execution of the executable instructions.
8. A computer readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the configuration data management method of any of claims 1-5.
CN201810903412.4A 2018-08-09 2018-08-09 Configuration data management method and device, electronic equipment and storage medium Active CN110825425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810903412.4A CN110825425B (en) 2018-08-09 2018-08-09 Configuration data management method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810903412.4A CN110825425B (en) 2018-08-09 2018-08-09 Configuration data management method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110825425A CN110825425A (en) 2020-02-21
CN110825425B true CN110825425B (en) 2024-09-20

Family

ID=69541576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810903412.4A Active CN110825425B (en) 2018-08-09 2018-08-09 Configuration data management method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110825425B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113495747B (en) * 2020-04-07 2023-09-26 北京京东振世信息技术有限公司 Gray scale release method and device
CN111538529A (en) * 2020-04-27 2020-08-14 中国银行股份有限公司 Gray scale publishing method and device
CN111881402B (en) * 2020-08-05 2024-06-14 卓米私人有限公司 Configuration data release method and device and electronic equipment
CN111897887B (en) * 2020-08-06 2024-09-20 北京沃东天骏信息技术有限公司 Parameter configuration method, device, system, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105515872A (en) * 2015-12-23 2016-04-20 北京奇虎科技有限公司 Method, apparatus and system for updating configuration information
CN107920112A (en) * 2017-11-01 2018-04-17 重庆金融资产交易所有限责任公司 Support configuration file method for pushing, central server and the storage medium of grayscale mode

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099988B (en) * 2014-04-24 2018-11-27 阿里巴巴集团控股有限公司 Method, access method and device and system for supporting gray scale to issue
US9886258B2 (en) * 2014-08-12 2018-02-06 Xiaomi Inc. Method and device for grayscale-upgrading
CN105677404B (en) * 2015-12-31 2019-03-19 拉扎斯网络科技(上海)有限公司 Zookeeper-based configuration updating method and device
CN106502874B (en) * 2016-10-26 2019-05-10 南京途牛科技有限公司 A call chain tracking method
CN106998369A (en) * 2017-05-26 2017-08-01 努比亚技术有限公司 Gray scale dissemination method, gateway blocker and computer-readable recording medium
CN107818024A (en) * 2017-11-22 2018-03-20 北京汇通金财信息科技有限公司 A kind of request ID transmission methods and system based on spring blockers

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105515872A (en) * 2015-12-23 2016-04-20 北京奇虎科技有限公司 Method, apparatus and system for updating configuration information
CN107920112A (en) * 2017-11-01 2018-04-17 重庆金融资产交易所有限责任公司 Support configuration file method for pushing, central server and the storage medium of grayscale mode

Also Published As

Publication number Publication date
CN110825425A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
CN108153670B (en) Interface testing method and device and electronic equipment
CN110825425B (en) Configuration data management method and device, electronic equipment and storage medium
US20230036357A1 (en) Method and apparatus for authority control, computer device and storage medium
CN111880826A (en) Cloud service application upgrading method and device, electronic equipment and storage medium
US10789111B2 (en) Message oriented middleware with integrated rules engine
US20180146072A1 (en) Creation of a binding based on a description associated with a server
CN113127430B (en) Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment
CN108400929B (en) Data processing method, device, computing equipment and medium
CN113722007B (en) Configuration method, device and system of VPN branch equipment
CN113434230A (en) Jump control method and device for H5 page, storage medium and electronic device
CN110955438A (en) Method, device and equipment for monitoring performance of small program and storage medium
CN112764729A (en) Application software development method and device, computer equipment and readable storage medium
US10884845B2 (en) Increasing processing capacity of processor cores during initial program load processing
CN114968337A (en) Information configuration method, device, equipment and storage medium
CN112491940A (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
CN113760356B (en) Differential configuration method, device, equipment and medium of program product
CN111090442A (en) Application updating method and device and storage medium
US20240311097A1 (en) Cloud Technology-Based Graphics Program Online Development Method and System, and Related Device
KR20210040333A (en) Request processing method, apparatus, device and computer storage medium
CN118394641A (en) Code coverage rate testing method, device and system
CN110795137B (en) Authority configuration method, device, system, electronic equipment and readable medium
CN113220507B (en) Version consistency checking method and device for double-master control system
CN106155722A (en) A kind of software method for updating pages and terminal
CN113515328B (en) Page rendering method, device, electronic equipment and storage medium
CN109245938B (en) Method and equipment for executing resource configuration operation of user

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
GR01 Patent grant
GR01 Patent grant