Search

CN-114064681-B - Configuration parameter updating method, device and equipment

CN114064681BCN 114064681 BCN114064681 BCN 114064681BCN-114064681-B

Abstract

The application provides a method, a device and equipment for updating configuration parameters, which are characterized in that a new configuration buffer unit is obtained, the effective time of the new configuration buffer unit is determined, the new configuration buffer unit is used for bearing a new version of configuration data set in a data source so as to improve the processing performance of a service unit for calling the configuration data set to process a service, and then when the effective time is reached, an original configuration buffer unit corresponding to the service unit is switched to the new configuration buffer unit under the condition that the service unit keeps a service state, so that the service unit processes a new service request through the new configuration buffer unit, and simultaneously processes a received existing service request through the original configuration buffer unit. The technical problem of how to realize uninterrupted service and continuously provide service to the outside when the configuration of the system is changed is solved. The technical effects of updating the configuration parameters of the system, not influencing the external service of the system and effectively avoiding the conflict between new and old configurations in the updating process are achieved.

Inventors

  • LIU MANZHONG
  • WU LEI

Assignees

  • 深圳前海微众银行股份有限公司

Dates

Publication Date
20260512
Application Date
20211217

Claims (10)

  1. 1. A method for updating configuration parameters, comprising: acquiring a new configuration cache unit and determining the effective time of the new configuration cache unit, wherein the new configuration cache unit is used for bearing a configuration data set of a new version in a data source, the configuration data set comprises a plurality of configuration parameters, and the configuration parameters are used for setting the operation mode of a service unit; When the effective time arrives, under the condition that the service unit keeps a service state, switching an original configuration buffer unit corresponding to the service unit into a new configuration buffer unit, so that the service unit processes a new service request through the new configuration buffer unit, and simultaneously processes a received existing service request through the original configuration buffer unit, wherein the new service request is a service request received by the service unit after the effective time; the obtaining the new configuration cache unit includes: According to a preset inspection period, circularly monitoring whether version numbers in the data source change or not, wherein the version numbers are used for representing different versions of the configuration data set; If yes, creating the new configuration cache unit; After the updated configuration data set is loaded into the new configuration cache unit, the method further comprises the following steps: Respectively extracting the new configuration cache unit and a plurality of corresponding configuration parameters in the data source according to the number of preset parameters to determine a first parameter set and a second parameter set, wherein the first parameter set corresponds to the new configuration cache unit, and the second parameter set corresponds to the data source; splicing each configuration parameter in the first parameter set into a first character string by using a preset splicing model, and splicing each configuration parameter in the second parameter set into a second character string; determining a first hash value according to the first character string and determining a second hash value according to the second character string by using a preset hash model; judging whether the first hash value is the same as the second hash value; If yes, determining that the new configuration cache unit is loaded correctly; if not, clearing the configuration parameter set in the new configuration cache unit, and reloading the configuration parameter set from the data source.
  2. 2. The method for updating configuration parameters according to claim 1, wherein when there are a plurality of service units, the determining the effective time of the new configuration buffer unit includes: Acquiring interaction records of the service units for receiving the service requests; Determining the interaction time of each service unit in the next time according to the history record that each service unit in the interaction record meets the preset screening requirement; and determining the effective time according to each interaction time and a preset first delay time.
  3. 3. The method for updating configuration parameters according to claim 2, wherein determining the next interaction time of each service unit according to the history record that each service unit in the interaction records meets a preset screening requirement includes: and determining the next interaction time of each service unit according to the latest preset times of the historical records corresponding to each service unit.
  4. 4. The method of updating configuration parameters according to claim 2, wherein said determining said effective time based on each of said interaction time and first delay time comprises: selecting the latest time from the interaction times; Adding the first delay time after the latest time is the effective time.
  5. 5. The configuration parameter updating method according to any one of claims 1 to 4, characterized by further comprising: acquiring the completion condition of the existing service request corresponding to the original configuration cache unit; And determining whether to delete the original configuration cache unit according to the completion condition so as to ensure that the service unit does not generate calling conflict on the configuration parameters when processing the existing service request.
  6. 6. The method for updating configuration parameters according to claim 5, wherein said determining whether to delete the original configuration cache unit according to the completion status comprises: Judging whether a cumulative value is larger than 1 when a completion signal of the existing service request is received, wherein the cumulative value is used for representing the number of the incomplete existing service requests; and deleting the original configuration cache unit when the accumulated value is equal to 1.
  7. 7. The configuration parameter updating method according to claim 6, further comprising, after said judging whether the cumulative value is 1: when the accumulated value is greater than 1, according to a preset time interval, circularly monitoring whether the accumulated value is 0; if not, determining and sending prompt information to prompt that the original configuration cache unit is still used; if yes, deleting the original configuration cache unit.
  8. 8. The method of claim 7, wherein the periodically monitoring whether the cumulative value is 0 according to a predetermined time interval comprises: Circularly determining a preset time interval according to the latest finishing time of n existing services and a preset second delay time; Detecting whether the cumulative number is 0 when each of the preset time intervals arrives.
  9. 9. A configuration parameter updating apparatus for implementing the method according to any one of claims 1-8, the apparatus comprising: the system comprises an acquisition module, a configuration data set processing module and a service unit, wherein the acquisition module is used for acquiring a new configuration cache unit, the new configuration cache unit is used for bearing a new version of configuration data set in a data source so as to improve the processing performance of the service unit for calling the configuration data set to process a service, the configuration data set comprises a plurality of configuration parameters, and the configuration parameters are used for setting the operation mode of the service unit; And the processing module is used for determining the effective time of the new configuration cache unit, and switching the original configuration cache unit corresponding to the service unit into the new configuration cache unit under the condition that the service unit keeps a service state when the effective time is reached, so that the service unit processes a new service request through the new configuration cache unit and simultaneously processes a received existing service request through the original configuration cache unit, wherein the new service request is a service request received by the service unit after the effective time.
  10. 10. An electronic device, comprising: Processor, and A memory for storing a computer program of the processor; wherein the processor is configured to perform the configuration parameter updating method of any one of claims 1 to 8 via execution of the computer program.

Description

Configuration parameter updating method, device and equipment Technical Field The present application relates to the field of financial science and technology (Fintech), and in particular, to a method, an apparatus, and a device for updating configuration parameters. Background With the development of computer technology, more and more technologies are being applied in the financial field, and the traditional financial industry is gradually changing to financial technology (Fintech). Financial enterprises utilize electronic systems to process business, and thus require operation and maintenance of the system, and in the process, various configuration parameters of the system are often required to be updated. At present, the system update is generally performed when the traffic is small, for example, in the early morning, the system stops providing external services, but with the continuous development of economy globalization, financial enterprises often need to provide services all weather, so how to realize that the services are not interrupted when the configuration of the system is changed, and the continuous provision of external services becomes a technical problem to be solved urgently. Disclosure of Invention The application provides a method, a device and equipment for updating configuration parameters, which are used for solving the technical problem of how to realize uninterrupted service and continuously provide service to the outside when the configuration of a system is changed. In a first aspect, the present application provides a method for updating a configuration parameter, including: Acquiring a new configuration cache unit and determining the effective time of the new configuration cache unit, wherein the new configuration cache unit is used for bearing a new version of configuration data set in a data source so as to improve the processing performance of a service unit for calling the configuration data set to process a service, and the configuration data set comprises a plurality of configuration parameters which are used for setting the operation mode of the service unit; when the effective time arrives, under the condition that the service unit keeps a service state, the original configuration buffer memory unit corresponding to the service unit is switched to a new configuration buffer memory unit, so that the service unit processes a new service request through the new configuration buffer memory unit, and simultaneously processes the received existing service request through the original configuration buffer memory unit, wherein the new service request is the service request received by the service unit after the effective time. In one possible design, when there are multiple business units, determining the validation time of the newly configured cache unit includes: Acquiring interaction records of each service unit for receiving service requests; Determining the interaction time of each service unit next according to the history record that each service unit in the interaction record meets the preset screening requirement; And determining effective time according to each interaction time and the preset first delay time. In one possible design, determining the next interaction time of each service unit according to the history record that each service unit in the interaction record meets the preset screening requirement includes: And determining the next interaction time of each service unit according to the latest history records of the preset times corresponding to each service unit. In one possible design, determining the validation time based on each interaction time and the first delay time includes: selecting the latest time from the interaction times; the latest time is added with the first delay time, so that the time is effective. In one possible design, the method further comprises: acquiring the completion condition of the existing service request corresponding to the original configuration buffer unit; And determining whether to delete the original configuration cache unit according to the completion condition so as to ensure that the service unit cannot generate calling conflict on the configuration parameters when processing the existing service request. In one possible design, determining whether to delete the original configured cache unit according to the completion condition includes: When a completion signal of the existing service request is received, judging whether a cumulative value is larger than 1, wherein the cumulative value is used for representing the number of the incomplete existing service requests; when the accumulated value is equal to 1, the original configuration cache unit is deleted. In one possible design, after determining whether the cumulative value is 1, the method further includes: When the cumulative value is greater than 1, according to a preset time interval, circularly monitoring whether the cumulative value is 0; if not, determinin