CN112433783A - Configuration method and related equipment - Google Patents

Configuration method and related equipment Download PDF

Info

Publication number
CN112433783A
CN112433783A CN202011333942.3A CN202011333942A CN112433783A CN 112433783 A CN112433783 A CN 112433783A CN 202011333942 A CN202011333942 A CN 202011333942A CN 112433783 A CN112433783 A CN 112433783A
Authority
CN
China
Prior art keywords
configuration
environment
baseline
items
preset
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
CN202011333942.3A
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 Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011333942.3A priority Critical patent/CN112433783A/en
Publication of CN112433783A publication Critical patent/CN112433783A/en
Priority to PCT/CN2021/091449 priority patent/WO2022110646A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a configuration method and related equipment, wherein the configuration method comprises the following steps: acquiring a baseline configuration, wherein the baseline configuration comprises N preset configuration items; determining a first configuration corresponding to a first environment, comparing the first configuration with the baseline configuration, and if the first configuration is different from the baseline configuration, prompting a user to modify the first configuration according to the baseline configuration to obtain a second configuration; the second configuration comprises N second configuration items, the N second configuration items are the same as the N preset configuration items, and N is an integer greater than or equal to 1; the first environment is one of a development environment, a test environment, and a production environment. By implementing the embodiment of the application, the configuration items of different environments such as development, test and production can be effectively kept consistent, the mistakes and omissions of manual comparison are reduced, and the production problem is avoided.

Description

Configuration method and related equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a configuration method and a related device.
Background
At present, a micro service architecture is widely applied to Java backend server development, and a configuration center in a micro service mechanism can change configuration without redeploying service. However, since the existing configuration centers are often bound to the deployment environment, different environments such as a development environment, a test environment, and a production environment respectively have their corresponding configuration centers. Moreover, the configuration centers in different environments also have corresponding configuration pages, and the staff can set or modify corresponding configuration items (for example, IP addresses or mailbox addresses, etc.) through the configuration pages.
In actual work, the configuration centers of the environments are often maintained by different testers or developers, so that the configuration items in the configuration centers of the environments are easily inconsistent due to differences among different personnel, and thus production problems are caused. In order to ensure that the configuration items in each environment are consistent, the configuration items of each environment are often required to be compared one by a worker and are unified, so that the workload of the worker is greatly increased, and mistakes and omissions are easy to occur.
Therefore, how to efficiently and accurately ensure that the configuration items in each environment are consistent is a problem to be solved urgently.
Disclosure of Invention
In view of the above, the present application is proposed to provide an arrangement and a method that overcomes or at least partially solves the above mentioned problems.
In a first aspect, an embodiment of the present application provides a configuration method, which may include:
acquiring a baseline configuration, wherein the baseline configuration comprises N preset configuration items;
determining a first configuration corresponding to a first environment, comparing the first configuration with the baseline configuration, and if the first configuration is different from the baseline configuration, prompting a user to modify the first configuration according to the baseline configuration to obtain a second configuration; the second configuration comprises N second configuration items, the N second configuration items are the same as the N preset configuration items, and N is an integer greater than or equal to 1; the first environment is one of a development environment, a test environment, and a production environment.
By the method provided by the first aspect, the configuration of different environments such as development, test and production can be compared with the baseline configuration by introducing the baseline configuration, no matter developers or testers maintain the configuration, and different configuration items are automatically found out to prompt users to modify according to the baseline configuration, so that the configuration items of different environments such as development, test and production are kept consistent. From this, need artifically contrast one by one and make it unified to the configuration item of each environment among the contrast prior art, thereby lead to appearing the scheme of mistake hourglass and greatly increased work load easily, this application embodiment can contrast through the configuration automation with different environment and baseline configuration, the manpower that artifical contrast need consume has been avoided to very big degree, work efficiency is greatly improved, the mistake that artificial contrast probably leads to has been avoided simultaneously to miss, development has accurately, the high efficiency is guaranteed, the uniformity of the configuration of different environments such as test and production, thereby avoid causing the production problem.
In one possible implementation, the method further includes:
and carrying out format check on the N second configuration items in the second configuration, and prompting the user to modify one or more second configuration items which do not pass the format check in the N second configuration items.
In one possible implementation manner, the first configuration includes M first configuration items, where M is an integer greater than or equal to 1; if the first configuration is different from the baseline configuration, prompting a user to modify the first configuration according to the baseline configuration to obtain a second configuration, including:
if the first configuration is different from the baseline configuration, identifying different configuration items in the M first configuration items and the N preset configuration items according to a preset identification rule so as to prompt a user to modify the first configuration according to the baseline configuration to obtain a second configuration; the N preset configuration items comprise one or more of an Internet Protocol (IP) address, a mailbox and a json text.
In one possible implementation manner, the preset identification rule includes: compared with the N preset configuration items, redundant first configuration items are identified by first marks to prompt a user to delete; and compared with the N preset configuration items, the missing first configuration items are identified by second marks so as to prompt the user to add.
In one possible implementation, the method further includes:
determining a second environment to be deployed and matching the second configuration of the first environment to the second environment; the second environment is one of the development environment, the test environment, and the production environment.
In one possible implementation, the baseline configuration is a preset configuration; or, the baseline configuration is a configuration corresponding to the target environment; or the baseline is configured to be a configuration obtained after updating based on the preset configuration or the configuration corresponding to the target environment; the target environment is one of the development environment, the test environment, and the production environment.
In a second aspect, an embodiment of the present application provides a configuration apparatus, where the apparatus includes:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a baseline configuration, and the baseline configuration comprises N preset configuration items;
the comparison unit is used for determining a first configuration corresponding to a first environment, comparing the first configuration with the baseline configuration, and prompting a user to modify the first configuration according to the baseline configuration to obtain a second configuration if the first configuration is different from the baseline configuration; the second configuration comprises N second configuration items, the N second configuration items are the same as the N preset configuration items, and N is an integer greater than or equal to 1; the first environment is one of a development environment, a test environment, and a production environment.
In one possible implementation, the configuring further includes:
and the checking unit is used for carrying out format checking on the N second configuration items in the second configuration and prompting the user to modify one or more second configuration items which are not passed by the format checking in the N second configuration items.
In one possible implementation manner, the first configuration includes M first configuration items, where M is an integer greater than or equal to 1; the comparison unit is specifically configured to:
if the first configuration is different from the baseline configuration, identifying different configuration items in the M first configuration items and the N preset configuration items according to a preset identification rule so as to prompt a user to modify the first configuration according to the baseline configuration to obtain a second configuration; the N preset configuration items comprise one or more of an Internet Protocol (IP) address, a mailbox and a json text.
In one possible implementation manner, the preset identification rule includes: compared with the N preset configuration items, redundant first configuration items are identified by first marks to prompt a user to delete; and compared with the N preset configuration items, the missing first configuration items are identified by second marks so as to prompt the user to add.
In one possible implementation, the apparatus further includes:
a matching unit configured to determine a second environment to be deployed and match the second configuration of the first environment to the second environment; the second environment is one of the development environment, the test environment, and the production environment.
In one possible implementation, the baseline configuration is a preset configuration; or, the baseline configuration is a configuration corresponding to the target environment; or the baseline is configured to be a configuration obtained after updating based on the preset configuration or the configuration corresponding to the target environment; the target environment is one of the development environment, the test environment, and the production environment.
In a third aspect, an embodiment of the present application provides a computer device, including a storage component, a processing component and a communication component, where the storage component, the processing component and the communication component are connected to each other, where the storage component is used to store a computer program, and the communication component is used to perform information interaction with an external device; the processing component is configured to invoke a computer program to perform the method according to the first aspect, which is not described herein again.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is executed by a processor to implement the method in the first aspect, which is not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.
Fig. 1 is a schematic system architecture diagram of a configuration method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram illustrating a configuration method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of another configuration method provided by embodiments of the present application;
FIG. 4 is a schematic structural diagram of a configuration device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described below with reference to the drawings.
The terms "first," "second," and "third," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, "include" and "have" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
As used in this application, the terms "server," "unit," "system," and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, or software in execution. For example, a server may be, but is not limited to, a processor, a data processing platform, a computing device, a computer, two or more computers, and the like.
First, some terms in the present application are explained so as to be easily understood by those skilled in the art.
(1) The configuration center is a unified configuration management product developed by an Internet Technology (IT) infrastructure. Based on the configuration center, the workload of configuration management can be greatly reduced in scenes such as micro-service and the like, and the service capacity of configuration management is enhanced. Common configuration centers include, for example, Apollo (Apollo) and Git, where Apollo is a distributed configuration center, can centrally manage configurations of different environments and different clusters, can be pushed to an application end in real time after configuration modification, has characteristics of standard authority, process management, and the like, and is suitable for a microservice configuration management scenario.
Next, a system architecture of one of the configuration methods based on the embodiments of the present application is described.
Referring to fig. 1, fig. 1 is a schematic diagram of a system architecture of a configuration center according to an embodiment of the present disclosure. As shown in fig. 1, the system architecture may include a computer device 101 (exemplified by a desktop computer in fig. 1) and a server 201. As shown in fig. 1, the computer device 101 may establish a connection with the server 201 in a wired or wireless manner. The server 201 may be a configuration center server, which may be one server, or a server cluster composed of a plurality of servers, and the like, and this is not specifically limited in this embodiment of the application. Wherein the computer device 101 may provide a corresponding configuration page for configuration by a worker.
In the following, taking the computer device 101 and the server 201 as an example, a configuration method provided in the present application is described in detail. Specifically, the staff member may obtain, through the computer device, a preset baseline configuration, where the baseline configuration may include a plurality of preset configuration items (for example, an Internet Protocol Address, IP), a mailbox Address, a Media Access Control (MAC) Address, a json text, and the like). Alternatively, the baseline configuration may be stored locally on the computer device 101, or may also be stored in the server 201, and the computer device 101 may request the server 201 over the network to obtain the baseline cooperation. Optionally, the baseline configuration may be a configuration set by a worker in advance according to a requirement, or may also be a configuration of one of a development environment, a test environment, and a production environment directly as the baseline configuration, and the like, which is not specifically limited in this embodiment of the application. Then, the computer device 101 may obtain the configuration of any environment from the server 201, compare the baseline configuration with the configuration of any environment, and prompt the staff member to modify according to the baseline configuration if different configuration items exist between the configuration of any environment and the baseline configuration. For example, the baseline configuration includes an IP address, a mailbox address, and a MAC address, and the first configuration of the test environment (i.e., the initial configuration before modification) includes an IP address and a mailbox address, the computer device 101 may prompt the staff member through the corresponding configuration page to modify the configuration of the test environment according to the baseline configuration, and add the configuration item of the MAC address, so as to reach the second configuration of the test environment (i.e., the new configuration after modification), which is obviously the same as the baseline configuration in the second configuration of the test environment. The computer device 101 may then upload the modified second configuration of the testing environment to the server 201 to submit and validate the second configuration to the configuration center of the testing environment. In some possible implementation manners, before uploading the modified second configuration of the test environment to the server 201, the computer device 101 may further automatically perform format check on each configuration item in the second configuration, prompt a worker to modify a configuration item in which the format check fails, finally obtain a second configuration with a correct format, and submit the second configuration to a configuration center, and so on, which may specifically refer to the description of the embodiment corresponding to fig. 3 described below, and details are not repeated here.
Similarly, the computer device 101 may also compare and modify the configurations of the development environment and the production environment with the baseline configuration, which may specifically refer to the description of the test environment, and will not be described herein again. Therefore, according to the embodiment of the application, the configuration of each environment can be automatically compared with the baseline configuration by introducing the baseline configuration, different configuration items in the baseline configuration are found out, workers are prompted to modify, manpower consumed by manual comparison is avoided to the greatest extent, the working efficiency is greatly improved, and meanwhile mistakes and omissions possibly caused by manual comparison are avoided. And then the configuration consistency of different environments such as development, test and production is accurately and efficiently ensured, thereby avoiding the production problem.
The computer device in the embodiment of the present application may include, but is not limited to, any electronic product based on an intelligent operating system, which can perform human-computer interaction with a user through an input device such as a keyboard, a virtual keyboard, a touch pad, a touch screen, and a voice control device, such as a smart phone, a tablet computer, a notebook computer, and a desktop computer having the above functions. Smart operating systems include, but are not limited to, any operating system that enriches device functionality by providing various mobile applications to a mobile device, such as: android (Android)TM)、iOSTM、Windows PhoneTMAnd the like. Optionally, in the method according to the embodiment of the present application, a baseline configuration may also be obtained by the server 201, the server 201 compares a configuration of any environment with the baseline configuration, then the server 201 may send a result of the comparison to the computer device 101, and finally, a worker may modify a configuration item in the configuration of the environment, which is different from the baseline configuration, through a configuration page provided by the computer device 101, and submit the modified configuration to the server 201 through the computer device 101, and the like, which is not specifically limited in the embodiment of the present application. And alsoAlternatively, in some possible implementations, after obtaining the baseline configuration, the server 201 or the computer device 101 may further automatically modify the configuration of any environment into the baseline configuration, and submit the baseline configuration to the configuration center of each environment to enable the configuration center to take effect, and the like, which is not specifically limited in this embodiment of the present application.
It should also be understood that the system architecture of the configuration method shown in fig. 1 is only a partial exemplary implementation manner in the embodiment of the present application, and the system architecture of the configuration method in the embodiment of the present application includes, but is not limited to, the system architecture of the above configuration method.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a flow of a configuration method according to an embodiment of the present disclosure. Applicable to the system of fig. 1 described above, and described below in connection with fig. 2 from a single side of the computer device 101. The method may comprise the following steps S201-S202.
Step S201: acquiring a baseline configuration, wherein the baseline configuration comprises N preset configuration items.
Specifically, the computer device obtains a baseline configuration, which may include N preset configuration items, where N is an integer greater than or equal to 1.
Alternatively, the computer device may obtain the baseline configuration locally or may obtain the baseline configuration from a configuration center server over a network. In addition, the N preset configuration items in the baseline configuration may be configuration items set by a worker in advance, or may also be configuration items in configuration of any environment (for example, a development environment), that is, configuration of any environment (for example, a development environment) may be directly used as the baseline configuration, and the like, which is not specifically limited in this embodiment of the present application.
Optionally, referring to fig. 3 together, fig. 3 is a schematic flow chart of another configuration method provided in the present embodiment, which can be applied to the system in fig. 1. As shown in fig. 3, the baseline configuration may be updated at any time according to actual needs, and as shown in fig. 3, the baseline monitor may monitor the baseline configuration in real time, and if a worker needs to change the current baseline configuration, the baseline may be changed through a related configuration interface provided by the computer device, and the baseline monitor is notified. The baseline monitor can then push the updated baseline configuration to the text comparator, which can automatically compare the baseline configuration to the configuration of any environment, and so on. If the current baseline configuration is not changed, the baseline monitor can push the current baseline configuration to the text comparator, and the subsequent text comparator can automatically compare the baseline configuration with the configuration of any environment, and so on. As described above, the baseline monitor and the text comparator can be implemented by a pre-programmed program, and will not be described herein.
Step S202: determining a first configuration corresponding to a first environment, comparing the first configuration with the baseline configuration, and if the first configuration is different from the baseline configuration, prompting a user to modify the first configuration according to the baseline configuration to obtain a second configuration.
Specifically, the computer device determines a first configuration corresponding to a first environment, compares the first configuration with the baseline configuration, and prompts a user to modify the first configuration according to the baseline configuration to obtain a second configuration if the first configuration is different from the baseline configuration. The first configuration may include M first configuration items, where M is an integer greater than or equal to 1. The second configuration may include N second configuration items, and the N second configuration items are the same as the N preset configuration items. Wherein the first environment may be one of a development environment, a test environment, and a production environment.
Optionally, if the first configuration is different from the baseline configuration, the computer device may identify, according to a preset identification rule, a different configuration item of the M first configuration items and the N preset configuration items, so as to prompt the user to modify the first configuration according to the baseline configuration. Wherein, the preset identification rule may include: compared with the N preset configuration items, redundant first configuration items are marked by first marks to prompt a user to delete; the missing first configuration item is identified with a second marker compared to the N preset configuration items to prompt the user to add. The first mark and the second mark can be rendered in different colors, and a user can directly modify, add or delete the text with the color identification through the computer equipment. For example, more configuration items than the baseline configuration may be identified with a blue-plus-dash line to prompt the user to delete the configuration item in time; fewer configuration items than the baseline configuration may be identified with green rendering; configuration items with different contents may be identified by red rendering to prompt a user to modify, and the like, which is not specifically limited in the embodiment of the present application.
For example, if the first configuration of the production environment includes 3 first configuration items of an IP address, a mailbox address, and a MAC address, and the baseline configuration includes 2 preset configuration items of an IP address and a mailbox address, the MAC address in the first configuration may be identified by a blue-and-dash line to prompt the user to delete the first configuration item in time. For another example, if the first configuration of the production environment includes 3 first configuration items of an IP address, a mailbox address, and a MAC address, and the baseline configuration includes 3 preset configuration items of an IP address, a mailbox address, and json text, the MAC address in the first configuration and the json text in the baseline configuration may be identified by red rendering, so as to prompt the user to modify the MAC address into the json text. For example, the first configuration of the production environment includes 2 first configuration items, i.e., an IP address and a mailbox address, and the baseline configuration includes 3 preset configuration items, i.e., an IP address, a mailbox address, and a MAC address, then the MAC address in the baseline configuration may be identified by green rendering, and so on, which is not described herein again.
Optionally, referring to fig. 3, as shown in fig. 3, specifically, the first configuration of the first environment may be obtained from the configuration center through a text comparator, and then the first configuration is compared with the baseline configuration to determine whether the texts of the configuration items of the first environment and the baseline configuration are the same. Alternatively, the text comparer may obtain the configuration of each environment by calling a configuration query interface of the development environment, the test environment and the production environment configuration center. As shown in fig. 3, if the first configuration of the first environment is the same as the baseline configuration, the current process may be terminated, if the first configuration of the first environment is different from the baseline configuration, the user may be prompted to modify, and after the user modifies the first configuration to a second configuration that is consistent with the baseline configuration, the second configuration may be submitted to the service center. Wherein the pair of comparators can compare with the baseline configuration in real time to prompt the user whether the current modification is consistent with the baseline configuration. It will be appreciated that after the user modifies the first configuration to a second configuration that is the same as the baseline configuration, the above-mentioned blue-and-dash line and red mark may be automatically cancelled, and the user may be prompted by a text message that the currently modified second configuration is consistent with the baseline configuration, and then the user may submit the second configuration to the configuration center by clicking an associated submission control in an associated configuration page provided by the computer device, and the configuration center may validate the second configuration, and so on. Optionally, in some possible implementations, if the text comparator detects that the currently modified second configuration is already consistent with the baseline configuration, the second configuration may be automatically submitted to the configuration center without manual submission by a user, and so on, which is not specifically limited in this embodiment of the present application.
Optionally, as shown in fig. 3, before submitting the modified second configuration to the configuration center, the configuration checker may further perform format check on the N second configuration items in the second configuration, and prompt the user to modify one or more second configuration items in the N second configuration items whose format check fails. Optionally, for the second configuration item which is not in the format, the user may be prompted in a pop-up manner, so that the user modifies the second configuration item into the correct format. It can be understood that, in the prior art, no configuration center, such as Apollo (Apollo) or Git, has no configuration item checking function, for example, format checking cannot be performed on configuration items, such as an input mailbox, an IP address, a json text, and the like, which may result in an increase in a configuration error rate. According to the embodiment of the application, the configuration checker (for example, a program written in advance for realizing configuration item format check) can be used for automatically checking the format of each second configuration item in the modified second configuration items, and prompting a user to modify the second configuration items which do not conform to the format until the format of each second configuration item is correct, and finally the second configuration items which pass the check can be submitted to the configuration center, so that the accuracy of the configuration is ensured.
Optionally, when the user sets the baseline configuration through the computing device and inputs the preset configuration items, the configuration checker may also automatically perform format check on each input preset configuration item, so as to ensure that the format of each preset configuration item is correct. Optionally, when the user inputs the first configuration item for the first configuration of any environment setter, the configuration checker may also automatically perform format check on each input first configuration item, so as to ensure that the format of each first configuration item is correct.
Alternatively, the configuration checking rule of the configuration checker can be set by a worker through a related page provided by a computer device. For example, the initial configuration checker may provide default format checking rules for the IP address, the mailbox address, and the json text, and the like, which is not specifically limited in this embodiment of the present application.
In addition, in the prior art, the configuration center is bound with the deployment environment, so that the configuration is not flexible, for example, the configuration items that have passed the test in the test environment cannot be directly applied to the production environment, and the configuration items of the test environment configuration center often need to be manually copied to the configuration center of the production environment, thereby causing large workload and low configuration efficiency. In this regard, the computer device of the present application may also determine a second environment to be deployed and match the second configuration of the first environment to the second environment. Wherein the second environment may be one of a development environment, a test environment, and a production environment. For example, the first environment is a test environment, the second environment may be a production environment, and it is uncomfortable to perform the production environment, and the second configuration of the test environment may be directly matched to the production environment, that is, the N second configuration items are directly applied to the production environment, and there is no need to manually copy the configuration items in multiple environments, which greatly reduces the workload and improves the configuration efficiency.
In summary, the embodiment of the present application can enable configurations of different environments such as development, test, and production, to be compared with the baseline configuration regardless of the maintenance performed by developers or testers, and automatically find out different configuration items to prompt users to modify the configurations according to the baseline configuration, so that the configuration items of different environments such as development, test, and production are kept consistent. From this, need artifically contrast one by one and make it unified to the configuration item of each environment among the contrast prior art, thereby lead to appearing the scheme of mistake hourglass and greatly increased work load easily, this application embodiment can contrast through the configuration automation with different environment and baseline configuration, the manpower that artifical contrast need consume has been avoided to very big degree, work efficiency is greatly improved, the mistake that artificial contrast probably leads to has been avoided simultaneously to miss, development has accurately, the high efficiency is guaranteed, the uniformity of the configuration of different environments such as test and production, thereby avoid causing the production problem. On the other hand, the embodiment of the application also introduces automatic format verification, the format verification can be carried out on the configuration items according to the types of the configuration items, the user is prompted to modify the configuration items which are not passed by the format verification, and finally the configuration items which are passed by the format verification can be automatically submitted to the configuration center and take effect, so that mistakes and omissions caused by manual verification can be avoided, and the configuration accuracy is ensured. On the other hand, the environment and the configuration center are decoupled, and the environment and the configuration center are not strongly bound any more, so that cross-environment deployment of the configuration center is realized. For example, configuration items that have passed a test in a test environment can be directly matched and applied to a production environment, and compared with a scheme that in the prior art, configuration items of a test environment configuration center are often required to be manually copied to a configuration center of the production environment, so that workload is large and efficiency is low, the method provided by the application can greatly reduce workload and improve configuration efficiency.
The method of the embodiments of the present application is explained in detail above, and the related configuration device of the embodiments of the present application is provided below. Referring to fig. 4, fig. 4 is a schematic structural diagram of a configuration device according to an embodiment of the present disclosure. The configuration apparatus 40 may include an acquisition unit 401 and a comparison unit 402.
An obtaining unit 401, configured to obtain a baseline configuration, where the baseline configuration includes N preset configuration items;
a comparing unit 402, configured to determine a first configuration corresponding to a first environment, compare the first configuration with the baseline configuration, and prompt a user to modify the first configuration according to the baseline configuration to obtain a second configuration if the first configuration is different from the baseline configuration; the second configuration comprises N second configuration items, the N second configuration items are the same as the N preset configuration items, and N is an integer greater than or equal to 1; the first environment is one of a development environment, a test environment, and a production environment.
In one possible implementation, the configuring further includes:
a checking unit 403, configured to perform format checking on the N second configuration items in the second configuration, and prompt the user to modify one or more second configuration items that do not pass format checking in the N second configuration items.
In one possible implementation manner, the first configuration includes M first configuration items, where M is an integer greater than or equal to 1; the comparison unit 402 is specifically configured to:
if the first configuration is different from the baseline configuration, identifying different configuration items in the M first configuration items and the N preset configuration items according to a preset identification rule so as to prompt a user to modify the first configuration according to the baseline configuration to obtain a second configuration; the N preset configuration items comprise one or more of an Internet Protocol (IP) address, a mailbox and a json text.
In one possible implementation manner, the preset identification rule includes: compared with the N preset configuration items, redundant first configuration items are identified by first marks to prompt a user to delete; and compared with the N preset configuration items, the missing first configuration items are identified by second marks so as to prompt the user to add.
In one possible implementation, the apparatus further includes:
a matching unit 404, configured to determine a second environment to be deployed, and match the second configuration of the first environment to the second environment; the second environment is one of the development environment, the test environment, and the production environment.
In one possible implementation, the baseline configuration is a preset configuration; or, the baseline configuration is a configuration corresponding to the target environment; or the baseline is configured to be a configuration obtained after updating based on the preset configuration or the configuration corresponding to the target environment; the target environment is one of the development environment, the test environment, and the production environment.
It should be noted that implementation of each operation may also correspond to corresponding description of the method embodiments shown in fig. 2 and fig. 3, and details are not described here again.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure, where the computer device 50 includes at least one processor 501, at least one memory 502, and at least one communication interface 503. In addition, the device may also include common components such as an antenna, which will not be described in detail herein.
The processor 501 may be a general purpose Central Processing Unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs according to the above schemes.
Communication interface 503 is used for communicating with other devices or communication Networks, such as ethernet, Radio Access Network (RAN), core network, Wireless Local Area Networks (WLAN), etc.
The Memory 502 may be, but is not limited to, a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory may be self-contained and coupled to the processor via a bus. The memory may also be integral to the processor.
The memory 502 is used for storing application program codes for executing the above scheme, and is controlled by the processor 501 for execution. The processor 501 is used to execute application program code stored in the memory 502.
The memory 502 stores code that is executable by the configuration method provided in fig. 2 or 3 above, such as the computer device 50, and can obtain a baseline configuration comprising N preset configuration items; determining a first configuration corresponding to a first environment, comparing the first configuration with the baseline configuration, and if the first configuration is different from the baseline configuration, prompting a user to modify the first configuration according to the baseline configuration to obtain a second configuration; the second configuration comprises N second configuration items, the N second configuration items are the same as the N preset configuration items, and N is an integer greater than or equal to 1; the first environment is one of a development environment, a test environment, and a production environment.
It should be noted that, for the functions of the functional units in the computer device 50 described in the embodiment of the present application, reference may be made to the corresponding descriptions of the method embodiments shown in fig. 2 and fig. 3, and details are not described here again.
In this application, the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
In addition, functional components in the embodiments of the present application may be integrated into one component, or each component may exist alone physically, or two or more components may be integrated into one component. The integrated components can be realized in a form of hardware or a form of software functional units.
The integrated components, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially or partially implemented in the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. While the present application has been described herein in conjunction with various embodiments, other variations to the disclosed embodiments may be understood and effected by those skilled in the art in practicing the present application as claimed herein.

Claims (10)

1. A method of configuration, comprising:
acquiring a baseline configuration, wherein the baseline configuration comprises N preset configuration items;
determining a first configuration corresponding to a first environment, comparing the first configuration with the baseline configuration, and if the first configuration is different from the baseline configuration, prompting a user to modify the first configuration according to the baseline configuration to obtain a second configuration; the second configuration comprises N second configuration items, the N second configuration items are the same as the N preset configuration items, and N is an integer greater than or equal to 1; the first environment is one of a development environment, a test environment, and a production environment.
2. The method of claim 1, further comprising:
and carrying out format check on the N second configuration items in the second configuration, and prompting the user to modify one or more second configuration items which do not pass the format check in the N second configuration items.
3. The method of claim 1, wherein the first configuration comprises M first configuration items, M being an integer greater than or equal to 1; if the first configuration is different from the baseline configuration, prompting a user to modify the first configuration according to the baseline configuration to obtain a second configuration, including:
if the first configuration is different from the baseline configuration, identifying different configuration items in the M first configuration items and the N preset configuration items according to a preset identification rule so as to prompt a user to modify the first configuration according to the baseline configuration to obtain a second configuration; the N preset configuration items comprise one or more of an Internet Protocol (IP) address, a mailbox and a json text.
4. The method of claim 3, the preset identification rule comprising: compared with the N preset configuration items, redundant first configuration items are identified by first marks to prompt a user to delete; and compared with the N preset configuration items, the missing first configuration items are identified by second marks so as to prompt the user to add.
5. The method of claim 1, further comprising:
determining a second environment to be deployed and matching the second configuration of the first environment to the second environment; the second environment is one of the development environment, the test environment, and the production environment.
6. The method of any of claims 1-5, wherein the baseline configuration is a preset configuration; or, the baseline configuration is a configuration corresponding to the target environment; or the baseline is configured to be a configuration obtained after updating based on the preset configuration or the configuration corresponding to the target environment; the target environment is one of the development environment, the test environment, and the production environment.
7. A configuration device, comprising:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a baseline configuration, and the baseline configuration comprises N preset configuration items;
the comparison unit is used for determining a first configuration corresponding to a first environment, comparing the first configuration with the baseline configuration, and prompting a user to modify the first configuration according to the baseline configuration to obtain a second configuration if the first configuration is different from the baseline configuration; the second configuration comprises N second configuration items, the N second configuration items are the same as the N preset configuration items, and N is an integer greater than or equal to 1; the first environment is one of a development environment, a test environment, and a production environment.
8. The apparatus of claim 7, wherein the configuring further comprises:
and the checking unit is used for carrying out format checking on the N second configuration items in the second configuration and prompting the user to modify one or more second configuration items which are not passed by the format checking in the N second configuration items.
9. The computer equipment is characterized by comprising a processing component, a storage component and a communication module component, wherein the processing component, the storage component and the communication module component are connected with each other, the storage component is used for storing a computer program, and the communication component is used for carrying out information interaction with external equipment; the processing component is configured for invoking a computer program for performing the method of any of claims 1-6.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method of any one of claims 1-6.
CN202011333942.3A 2020-11-24 2020-11-24 Configuration method and related equipment Pending CN112433783A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011333942.3A CN112433783A (en) 2020-11-24 2020-11-24 Configuration method and related equipment
PCT/CN2021/091449 WO2022110646A1 (en) 2020-11-24 2021-04-30 Configuration method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011333942.3A CN112433783A (en) 2020-11-24 2020-11-24 Configuration method and related equipment

Publications (1)

Publication Number Publication Date
CN112433783A true CN112433783A (en) 2021-03-02

Family

ID=74697414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011333942.3A Pending CN112433783A (en) 2020-11-24 2020-11-24 Configuration method and related equipment

Country Status (2)

Country Link
CN (1) CN112433783A (en)
WO (1) WO2022110646A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022110646A1 (en) * 2020-11-24 2022-06-02 平安普惠企业管理有限公司 Configuration method and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120110142A1 (en) * 2010-10-29 2012-05-03 Bank Of America Corporation Configuration management utility
CN109683953A (en) * 2018-12-26 2019-04-26 苏州思必驰信息科技有限公司 A kind of method and device carrying out configuration file processing based on visualization interface
CN109976828A (en) * 2019-03-12 2019-07-05 北京奇艺世纪科技有限公司 A kind of method and device of configuration file
CN111694612A (en) * 2020-05-28 2020-09-22 平安普惠企业管理有限公司 Configuration checking method, device, computer system and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851351A (en) * 2019-10-12 2020-02-28 深圳壹账通智能科技有限公司 Deployment environment testing method and device, computer equipment and storage medium
CN112433783A (en) * 2020-11-24 2021-03-02 平安普惠企业管理有限公司 Configuration method and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120110142A1 (en) * 2010-10-29 2012-05-03 Bank Of America Corporation Configuration management utility
CN109683953A (en) * 2018-12-26 2019-04-26 苏州思必驰信息科技有限公司 A kind of method and device carrying out configuration file processing based on visualization interface
CN109976828A (en) * 2019-03-12 2019-07-05 北京奇艺世纪科技有限公司 A kind of method and device of configuration file
CN111694612A (en) * 2020-05-28 2020-09-22 平安普惠企业管理有限公司 Configuration checking method, device, computer system and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022110646A1 (en) * 2020-11-24 2022-06-02 平安普惠企业管理有限公司 Configuration method and related device

Also Published As

Publication number Publication date
WO2022110646A1 (en) 2022-06-02

Similar Documents

Publication Publication Date Title
CN108153670B (en) Interface testing method and device and electronic equipment
WO2021184725A1 (en) User interface test method and apparatus, storage medium, and computer device
US10595204B2 (en) Flexible remote server validation
CN110597595A (en) Method for providing multi-language information, method for configuring multi-language information, device, equipment and medium
CN108776587B (en) Data acquisition method and device, computer equipment and storage medium
CN109558191A (en) A kind of method, apparatus, storage medium and computer equipment configuring the page
US20130238673A1 (en) Information processing apparatus, image file creation method, and storage medium
CN115794641A (en) Method, device and equipment for making number based on business process and storage medium
CN113377458B (en) Plug-in management method and device, electronic equipment and storage medium
CN108717357B (en) Page display code conversion method, device, equipment and computer storage medium
CN112433783A (en) Configuration method and related equipment
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
CN111597112A (en) Automatic test method and device and electronic equipment
CN109814911A (en) Method, apparatus, computer equipment and storage medium for Manage Scripts program
US10896028B2 (en) Cross-platform, cross-application styling and theming infrastructure
CN113867778A (en) Method and device for generating mirror image file, electronic equipment and storage medium
CN109359384B (en) Method and device for calling silk-screen mark into printed circuit board
CN113312900A (en) Data verification method and device
CN112948264A (en) Test task execution method, device, system, storage medium and electronic device
CN111708582A (en) Online configuration method and device and electronic equipment
CN112417012A (en) Data processing method and system
CN111813439A (en) Distribution material quality control method, device, equipment and computer storage medium
CN112261072A (en) Service calling method, device, equipment and storage medium
CN113626409B (en) Test data processing method, device, equipment and storage medium
CN107851165B (en) Key system, key client and key management method

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210302