CN108833147A - A kind of update method and device of configuration information - Google Patents

A kind of update method and device of configuration information Download PDF

Info

Publication number
CN108833147A
CN108833147A CN201810552453.3A CN201810552453A CN108833147A CN 108833147 A CN108833147 A CN 108833147A CN 201810552453 A CN201810552453 A CN 201810552453A CN 108833147 A CN108833147 A CN 108833147A
Authority
CN
China
Prior art keywords
server
configuration information
update
updated
time
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.)
Granted
Application number
CN201810552453.3A
Other languages
Chinese (zh)
Other versions
CN108833147B (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.)
JD Digital Technology Holdings Co Ltd
Jingdong Technology Holding Co Ltd
Original Assignee
Beijing Jingdong Financial Technology Holding 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 Financial Technology Holding Co Ltd filed Critical Beijing Jingdong Financial Technology Holding Co Ltd
Priority to CN201810552453.3A priority Critical patent/CN108833147B/en
Publication of CN108833147A publication Critical patent/CN108833147A/en
Application granted granted Critical
Publication of CN108833147B publication Critical patent/CN108833147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0266Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]

Abstract

The invention discloses a kind of update method of configuration information and devices, are related to field of computer technology.One specific embodiment of this method includes:New configuration information is sent to each application server, receives the ready message that all application servers return;It is sent to each application server and prepares more new command, if receiving the waiting update message that all application servers return in the first time-out time, sent to each application server and submit instruction.The embodiment is able to solve the inconsistent problem of global configuration in the long period.

Description

A kind of update method and device of configuration information
Technical field
The present invention relates to field of computer technology more particularly to the update methods and device of a kind of configuration information.
Background technique
With computer technology and its development of application, the requirement for performance is higher and higher, so most of large sizes are answered With being disposed using distributed mode, in this case, (such as configuration information:White list information is issued to All examples) update, the especially update of consistency puts forward new requirements and challenges.
Current update mode is roughly divided into following two:
Mode 1:General pull-mode, using the database purchase configuration information of centralization, every server is periodically It goes central database to be polled, obtains newest configuration information, if there is newest configuration information, then update on book server Configuration information, if it is not, waiting next poll.
Mode 2:General push-model, using the mechanism such as zookeeper or MQ (Message Queue, message queue), Asynchronous monitoring information, receives the change of configuration information, then updates local configuration information.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:
Mode 1:Due to using the deployment way of centralization, then the problem of centainly will appear single-point, i.e.,:Configuration server It goes wrong, influences whether the normal work of whole system;Due to being single machine storage, then with the surge of application server, Also it will appear the problem in performance;Due to being periodic polling, then each application server gets the time point of latest configuration Be it is different, will result in the inconsistent situation of global configuration, i.e.,:Some application servers use old configuration, some uses New configuration.
Mode 2:For mode 1, the problem of mode 1 has, mode 2 be all it is existing, only have in terms of some Some optimizations, there is no changes substantially.
Summary of the invention
In view of this, the embodiment of the present invention provides the update method and device of a kind of configuration information, when being able to solve longer The inconsistent problem of interior global configuration.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of update side of configuration information is provided Method is applied to update server, including:
Latest configuration information is sent to each application server, receives ready the disappearing of all application servers returns Breath;
It is sent to each application server and prepares more new command, if receiving all application services in the first time-out time The waiting update message that device returns then sends to each application server and submits instruction.
Optionally, the method also includes:
If not receiving the waiting update message that all application servers return in the first time-out time, answered to all It is sent with server and cancels instruction.
In addition, other side according to an embodiment of the present invention, provides a kind of update method of configuration information, is applied to Application server, including:
The latest configuration information that server is sent will be updated to be stored in local pre-updated buffer area, returned to server is updated Ready message;
It receives and updates the preparation more new command that server is sent, start overtime monitoring thread, whether the second surpassed with monitoring When the time it is inscribed receive the submission instruction or cancel instruction for updating that server is sent, suspend the local latest configuration information that obtains Thread returns to waiting for update message to server is updated.
Optionally, the method also includes:
The submission instruction that server is sent is updated if receiving in the second time-out time, configuration is updated to local pre- The latest configuration information in buffer area is updated, the local thread for obtaining latest configuration information is activated, destroys overtime monitoring thread, and Message is finished to server return submission is updated;
The cancellation instruction that server is sent is updated if receiving in the second time-out time, activates local acquisition is newest to match The thread of confidence breath destroys overtime monitoring thread, and returns to cancel to update server and finish message.
Optionally, the method also includes:
After returning to waiting for update message to update server, if not receiving update server in the second time-out time The submission of transmission instructs or cancels instruction, then inquires latest configuration information in the database, updates local pre-updated buffer area In configuration information, activate the local thread for obtaining latest configuration information, and destroy overtime monitoring thread.
In addition, other side according to an embodiment of the present invention, provides a kind of updating device of configuration information, setting exists It updates in server, including:
Preparation module receives all application servers and returns for sending latest configuration information to each application server Ready message;
Update module prepares more new command for sending to each application server, if receiving in the first time-out time The waiting update message returned to all application servers, then send to each application server and submit instruction.
Optionally, the update module is also used to:
If not receiving the waiting update message that all application servers return in the first time-out time, answered to all It is sent with server and cancels instruction.
In addition, other side according to an embodiment of the present invention, provides a kind of updating device of configuration information, setting exists In application server, including:
Memory module, the latest configuration information for that will update server transmission are stored in local pre-updated buffer area, to It updates server and returns to ready message;
Module is monitored, for receiving the preparation more new command for updating server and sending, starts overtime monitoring thread, to monitor The submission instruction or cancel instruction for updating that server is sent whether are received in the second time-out time, suspend local obtain most The thread of new configuration information returns to waiting for update message to server is updated.
Optionally, described device further includes submitting module, is used for:
The submission instruction that server is sent is updated if receiving in the second time-out time, configuration is updated to local pre- The latest configuration information in buffer area is updated, the local thread for obtaining latest configuration information is activated, destroys overtime monitoring thread, and Message is finished to server return submission is updated;
The cancellation instruction that server is sent is updated if receiving in the second time-out time, activates local acquisition is newest to match The thread of confidence breath destroys overtime monitoring thread, and returns to cancel to update server and finish message.
Optionally, described device further includes enquiry module, is used for:
After returning to waiting for update message to update server, if not receiving update server in the second time-out time The submission of transmission instructs or cancels instruction, then inquires latest configuration information in the database, updates local pre-updated buffer area In configuration information, activate the local thread for obtaining latest configuration information, and destroy overtime monitoring thread.
In addition, other side according to an embodiment of the present invention, provides a kind of more new system of configuration information, including upper Setting described in the updating device being arranged in described in any embodiment update in server and any of the above-described embodiment is stated to answer With the updating device in server.
Other side according to an embodiment of the present invention additionally provides a kind of electronic equipment, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes method described in any of the above-described embodiment.
Other side according to an embodiment of the present invention additionally provides a kind of computer-readable medium, is stored thereon with meter Calculation machine program, realizes method described in any of the above-described embodiment when described program is executed by processor.
One embodiment in foregoing invention has the following advantages that or beneficial effect:Because by timeout mechanism, pull-mode and The technological means that push-model combines, so overcoming the inconsistent technical problem of global configuration in the long period;The present invention be by Timeout mechanism, pull-mode and push-model combine, and before guaranteeing at some time point, on application server used is all old configuration Information, after some point in time, on all application servers is all latest configuration information.Therefore, the embodiment of the present invention mentions The update method of the configuration information of confession can be under distributed environment, the configuration information of each application server of synchronized update, from And achieve the purpose that global strong consistency.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is the schematic diagram of the main flow of the update method of configuration information according to an embodiment of the present invention;
Fig. 2 is another signal that can refer to the main flow of the update method of the configuration information of embodiment according to the present invention Figure;
Fig. 3 is the schematic diagram of global coherency;
Fig. 4 is the signal of the main flow of the update method of a configuration information that can refer to embodiment according to the present invention Figure;
Fig. 5 is the file directory schematic diagram of middle registration application server according to embodiments of the present invention;
Fig. 6 is the flow diagram of middle push step according to embodiments of the present invention;
Fig. 7 is the flow diagram of middle preparation process according to embodiments of the present invention;
Fig. 8 is the flow diagram of middle submission step according to embodiments of the present invention;
Fig. 9 is the flow diagram of middle cancellation step according to embodiments of the present invention;
Figure 10 is the flow diagram of middle monitoring step according to embodiments of the present invention;
Figure 11 is the schematic diagram of the main modular of the updating device of configuration information according to an embodiment of the invention;
Figure 12 is the schematic diagram of the main modular of the updating device of configuration information in accordance with another embodiment of the present invention;
Figure 13 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Figure 14 is adapted for showing for the structure of the computer system of the terminal device or server of realizing the embodiment of the present invention It is intended to.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Fig. 1 is the schematic diagram of the main flow of the update method of configuration information according to an embodiment of the present invention.Such as Fig. 1 institute Show, as an embodiment of the present invention, is applied to update server, the update method of the configuration information may include:
Step 101, latest configuration information is sent to each application server, receives the preparation that all application servers return Finish message.
In this step, it when some configuration needs to update, updates server and first looks for all applications under the configuration Then server distributes the corresponding latest configuration information of the configuration to these servers.Optionally, distribution of configuration information it Before, the method can also include:Reachability test is carried out to all application servers under the configuration, if any one is answered Unreachable with server, then this updates failure, if all application servers are all up, to each application if updating server Server distributes latest configuration information.
Application server returns to ready message, and to inform update server, I is ready for, and updates server and receives The ready message that all application servers return, illustrates that all application servers are all ready for.It should be pointed out that such as Fruit does not receive the ready message that all application servers return within the preset time, then this updates failure.
Step 102, it is sent to each application server and prepares more new command, if being received in the first time-out time all The waiting update message that application server returns then sends to each application server and submits instruction.
After receiving the ready message that all application servers return, server is updated to each application service Device, which is sent, prepares more new command, if update server receives what all application servers returned etc. in the first time-out time Message to be updated then sends to each application server and submits instruction, so that each application server carries out configuration update.
Optionally, if update server receives the waiting of all application servers returns more in the first time-out time Then new information sends to each application server then first by latest configuration information update into database and submits instruction.
But if update server does not receive the waiting of all application servers returns more in the first time-out time New information, then sending cancellation instruction to all application servers (can also be only to the application service for having returned to waiting for update message Device, which is sent, cancels instruction) so that each application server stops updating.
Fig. 2 is another signal that can refer to the main flow of the update method of the configuration information of embodiment according to the present invention Figure.As shown in Fig. 2, as an embodiment of the present invention, being applied to application server, the update method of the configuration information can To include:
Step 201, the latest configuration information that server is sent will be updated to be stored in local pre-updated buffer area, is taken to updating Business device returns to ready message.
Each application server, which receives, updates the latest configuration information that server is sent, and latest configuration information is stored in respectively From local pre-updated buffer area in, then create overtime monitoring thread, and return to ready message to server is updated, with Informing update server, I is ready for.In this step, overtime monitoring thread is not started.It is pointed out that the time-out Whether monitoring thread, which is used to monitor to receive to update the submission that server is sent and instruct or cancel in the second time-out time, refers to It enables.
Step 202, receive and update the preparation more new command that server is sent, start overtime monitoring thread, with monitor whether The submission instruction for updating server transmission is received in the second time-out time or cancels instruction, is suspended and is locally obtained newest match The thread of confidence breath returns to waiting for update message to server is updated.
After application server receives the preparation more new command for updating server transmission, starting time-out first monitors line Journey updates the submission instruction or cancel instruction that server is sent to monitor whether to receive in the second time-out time, then The local all threads for obtaining latest configuration information of pause, finally return to waiting for update message to update server, to inform more New demand servicing device I be ready for.
It should be pointed out that the second time-out time can be identical as the first time-out time, it can also be different, the present invention is implemented Example is without limitation.
Step 203, the submission instruction that server is sent is updated if receiving in the second time-out time, configuration is updated For the latest configuration information in local pre-updated buffer area, the local thread for obtaining latest configuration information is activated, destroys time-out prison Thread is controlled, and finishes message to server return submission is updated;It is sent if being received in the second time-out time and updating server Cancellation instruction, then activate the local thread for obtaining latest configuration information, destroy overtime monitoring thread, and return to server is updated It returns to cancel and finishes message.
It monitors application server by overtime monitoring thread and whether is received in the second time-out time and update server hair The submission instruction or cancellation instruction sent.If application server receives in the second time-out time updates what server was sent Instruction is submitted, then latest configuration information configuration being updated in local pre-updated buffer area first, then activation is local obtains The thread of latest configuration information destroys overtime monitoring thread, finally returns to submission to update server and finishes message, to inform me Configuration is completed to update.If application server receives in the second time-out time updates the cancellation instruction that server is sent, The local thread for obtaining latest configuration information is then activated first, destroys overtime monitoring thread, is then taken to update server return Disappear and finish message, is updated with informing that I has stopped configuration.
Further, after returning to waiting for update message to update server, if do not received in the second time-out time To the submission instruction or cancel instruction that server is sent is updated, then latest configuration information is inquired in the database, is updated local Configuration information in pre-updated buffer area activates the local thread for obtaining latest configuration information, and destroys overtime monitoring thread.
According to various embodiments recited above, it can be seen that the present invention is used timeout mechanism, pull-mode and push-model In conjunction with technical solution, to solve the problems, such as that global configuration is inconsistent in the long period.That is, in the prior art In, mainly realize that configuration updates by pull-mode or push-model, both modes deposit in a long time that global configuration is not Consistent problem.And the present invention is to combine timeout mechanism, pull-mode and push-model, and before guaranteeing (T) at some time point, institute With on application server being all old configuration information (old), at some time point after (T), on all application servers all It is latest configuration information (new), as shown in Figure 3.T is smaller to illustrate that global coherency is stronger.Therefore, provided in an embodiment of the present invention The update method of configuration information can be under distributed environment, the configuration information of each application server of synchronized update, to reach To the purpose of global strong consistency.
Fig. 4 is another signal that can refer to the main flow of the update method of the configuration information of embodiment according to the present invention Figure.As yet another embodiment of the present invention, the update method of the configuration information mainly includes:Registration (Register) pushes away (Touch) is sent, prepares (Begin), submit (Commit), cancelling (Cancel) and monitoring (Monitor).Wherein, Server, which is represented, updates server, and client represents application server, each step is discussed in detail in turn below.
Registration step (Register):Application server creates configuration update on ZooKeeper and monitors service first, with For updating server push information, configuration node is then registered on ZooKeeper.Specifically, it can be directed to different configurations, Application server is registered under each configuration, such as application server 172.24.126.12 is registered at cib_bus:22002 with And other application servers, application server 172.24.126.12 is registered at cib_service:22002 and other application Server, as shown in Figure 5.It should be pointed out that can register multiple application servers under each configuration, the present invention is only to show Example property by taking an application server as an example, moreover, the same application server can be registered under different configurations, this hair Bright embodiment is without limitation.
It pushes step (Touch):As shown in fig. 6, when some configuration (such as:When cib_bus) needing to update, firstly, more New demand servicing device goes on ZooKeeper to search all application servers under the configuration (cib_bus), then, updates server pair These application servers carry out reachability test, if any one application server is unreachable, this updates failure.If Whole application servers are all up, then update server to each application server and distribute newest configuration information.Finally, each In the respective local pre-updated buffer area of latest configuration information deposit that application server receives, overtime monitoring thread is created (but not starting), and ready message is returned to server is updated, to inform update server, I is ready for.
Preparation process (Begin):As shown in fig. 7, receive ready message that all application servers return it Afterwards, it updates server and is sent to each application server and prepare more new command.Each application server receive the instruction it Afterwards, start overtime monitoring thread (Monitor) first, then suspend the latest configuration information that all locals are obtaining the configuration Thread, finally to update server return to waiting for update message.
It submits step (Commit):As shown in figure 8, if update server receives all answer in the first time-out time With server return waiting update message, then update first in the latest configuration information to ZooKeeper of the configuration, then to Each application server, which is sent, submits instruction.After each application server receives submission instruction, the configuration is updated to first Then latest configuration information in pre-updated buffer area activates all locals obtaining the line of the latest configuration information of the configuration Journey destroys overtime monitoring thread (Monitor), finally returns to submission to update server and finishes message.
Cancellation step (Cancel):As shown in figure 9, after Begin step, if updating server in the first time-out The interior waiting update message for not receiving all application servers and returning, then trigger this step.Specifically, update server to The application server for having returned to waiting for update message, which is sent, cancels instruction.After each application server receives cancellation instruction, swash All locals living are obtaining the thread of the latest configuration information of the configuration, destroy overtime monitoring thread (Monitor), finally to It updates server return cancellation and finishes message.
It monitors step (Monitor):As shown in Figure 10, after Begin step, overtime monitoring thread is monitored whether Any instruction (submit instruction or cancel instruction) for updating server and sending is not received in two time-out times, if it is, Trigger this step.Specifically, application server is inquired the latest configuration information of the configuration on ZooKeeper and is updated certainly first Then the configuration of oneself local activates all locals obtaining the thread of the latest configuration information of the configuration, destroy time-out prison It controls thread (Monitor).
It should be pointed out that another can refer to the specific of the update method of configuration information described in embodiment in the present invention Implementation content has been described in detail in the update method of configuration information described above, therefore has no longer illustrated in this duplicate contents.
Figure 11 is the schematic diagram of the main modular of updating device according to an embodiment of the invention.As shown in figure 11, if Setting updating the updating device 1100 in server includes preparation module 1101 and update module 1102.Wherein, the preparation mould Block 1101 sends latest configuration information to each application server, receives the ready message that all application servers return; The update module 1102 is sent to each application server prepares more new command, if receiving in the first time-out time all The waiting update message that application server returns then sends to each application server and submits instruction.
Optionally, if not receiving the waiting update message that all application servers return in the first time-out time, institute It states update module 1102 and is then sent to all application servers and cancel instruction.
Figure 12 is the schematic diagram of the main modular of the updating device of configuration information in accordance with another embodiment of the present invention.Such as Shown in Figure 12, the updating device 1200 being arranged in the application server includes memory module 1201 and monitoring module 1202.Wherein, The memory module 1201 is stored in the latest configuration information that server is sent is updated in local pre-updated buffer area, and is taken to updating Business device returns to ready message;The module 1202 of monitoring receives the preparation more new command for updating server transmission, and starting is super When monitoring thread, referred to monitoring whether to receive in the second time-out time to update submission instruction that server is sent or cancel It enables, suspends the local thread for obtaining latest configuration information, return to waiting for update message to server is updated.
Optionally, described device further includes submitting module 1203, if receiving update server in the second time-out time The submission of transmission instructs, and the latest configuration for submitting module 1203 that then configuration is updated in local pre-updated buffer area is believed Breath activates the thread of locally acquisition latest configuration information, destroys overtime monitoring thread, and finish to server return submission is updated Message;The cancellation instruction that server is sent is updated if receiving in the second time-out time, the submission module 1203 activates The local thread for obtaining latest configuration information destroys overtime monitoring thread, and returns to cancel to update server and finish message.
Optionally, described device further includes enquiry module, after returning to waiting for update message to update server, if The submission instruction or cancel instruction for updating that server is sent are not received in second time-out time, the enquiry module is then in data Latest configuration information is inquired in library, updates the configuration information in local pre-updated buffer area, is activated and is locally obtained latest configuration letter The thread of breath, and destroy overtime monitoring thread.
According to various embodiments recited above, it can be seen that the present invention is used timeout mechanism, pull-mode and push-model In conjunction with technical solution, to solve the problems, such as that global configuration is inconsistent in the long period.That is, in the prior art In, mainly realize that configuration updates by pull-mode or push-model, both modes deposit in a long time that global configuration is not Consistent problem.And the present invention is to combine timeout mechanism, pull-mode and push-model, it is used before guaranteeing at some time point On application server is all old configuration information, and after some point in time, on all application servers is all latest configuration Information.Therefore, the updating device of configuration information provided in an embodiment of the present invention can be under distributed environment, and synchronized update is each The configuration information of application server, to achieve the purpose that global strong consistency.
It should be noted that in the specific implementation content of updating device of the present invention, configuration information described above It has been described in detail in update method, therefore has no longer illustrated in this duplicate contents.
Figure 13 is shown can be using the update method of the configuration information of the embodiment of the present invention or the update side of configuration information The exemplary system architecture 1300 of method.
As shown in figure 13, system architecture 1300 may include terminal device 1301,1302,1303, network 1304 and service Device 1305.Network 1304 between terminal device 1301,1302,1303 and server 1305 to provide Jie of communication link Matter.Network 1304 may include various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 1301,1302,1303 and be interacted by network 1304 with server 1305, to receive Or send message etc..Various telecommunication customer end applications, such as shopping class can be installed on terminal device 1301,1302,1303 (only show using, web browser applications, searching class application, instant messaging tools, mailbox client, social platform software etc. Example).
Terminal device 1301,1302,1303 can be the various electronic equipments with display screen and supported web page browsing, Including but not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 1305 can be to provide the server of various services, for example, to user using terminal device 1301,1302, The 1303 shopping class websites browsed provide the back-stage management server (merely illustrative) supported.Back-stage management server can be right The data such as the information query request received analyze etc. processing, and by processing result (such as target push information, production Product information --- merely illustrative) feed back to terminal device.
It should be noted that the update method of configuration information provided by the embodiment of the present invention is generally held in server 1305 Row, correspondingly, the updating device of the configuration information is generally located in server 1305.
It should be understood that the number of terminal device, network and server in Figure 13 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Below with reference to Figure 14, it illustrates the computer systems for the terminal device for being suitable for being used to realize the embodiment of the present invention 1400 structural schematic diagram.Terminal device shown in Figure 14 is only an example, should not function to the embodiment of the present invention and Use scope brings any restrictions.
As shown in figure 14, computer system 1400 include central processing unit (CPU) 1401, can according to be stored in only It reads the program in memory (ROM) 1402 or is loaded into random access storage device (RAM) 1403 from storage section 1408 Program and execute various movements appropriate and processing.In RAM 1403, also it is stored with system 1400 and operates required various journeys Sequence and data.CPU 1401, ROM 1402 and RAM 1403 are connected with each other by bus 1404.Input/output (I/O) interface 1405 are also connected to bus 1404.
I/O interface 1405 is connected to lower component:Importation 1406 including keyboard, mouse etc.;Including such as cathode The output par, c 1407 of ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section including hard disk etc. 1408;And the communications portion 1409 of the network interface card including LAN card, modem etc..Communications portion 1409 passes through Communication process is executed by the network of such as internet.Driver 1410 is also connected to I/O interface 1405 as needed.It is detachable to be situated between Matter 1411, such as disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 1410, so as to In being mounted into storage section 1408 as needed from the computer program read thereon.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 1409, and/or from can Medium 1411 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 1401, executes and of the invention be The above-mentioned function of being limited in system.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more conducting wires, just Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to:Wirelessly, electric wire, optical cable, RF etc. or above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part is realized.Described module also can be set in the processor, for example, can be described as:A kind of processor packet It includes preparation module, update module, memory module and monitors module, wherein the title of these modules not structure under certain conditions The restriction of the pairs of module itself.
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes Obtaining the equipment includes:Latest configuration information is sent to each application server, it is complete to receive the preparation that all application servers return Finish message;It is sent to each application server and prepares more new command, if receiving all application services in the first time-out time The waiting update message that device returns then sends to each application server and submits instruction.
Technical solution according to an embodiment of the present invention, because of the technology hand that timeout mechanism, pull-mode and push-model are combined Section, so overcoming the inconsistent technical problem of global configuration in the long period;The present invention is by timeout mechanism, pull-mode and to push away Mode combine, guarantee at some time point before, on application server used is all old configuration information, at some time point it It afterwards, on all application servers is all latest configuration information.Therefore, the update side of configuration information provided in an embodiment of the present invention Method can be under distributed environment, the configuration information of each application server of synchronized update, to reach global strong consistency Purpose.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (15)

1. a kind of update method of configuration information, which is characterized in that it is applied to update server, including:
Latest configuration information is sent to each application server, receives the ready message that all application servers return;
It is sent to each application server and prepares more new command, returned if receiving all application servers in the first time-out time The waiting update message returned then sends to each application server and submits instruction.
2. the method according to claim 1, wherein further including:
If not receiving the waiting update message that all application servers return in the first time-out time, taken to all applications Business device, which is sent, cancels instruction.
3. a kind of update method of configuration information, which is characterized in that it is applied to application server, including:
The latest configuration information that server is sent will be updated to be stored in local pre-updated buffer area, prepared to updating server and returning Finish message;
It receives and updates the preparation more new command that server is sent, start overtime monitoring thread, to monitor whether in the second time-out The interior submission instruction for receiving update server transmission or cancellation instruct, and pause locally obtains the line of latest configuration information Journey returns to waiting for update message to server is updated.
4. according to the method described in claim 3, it is characterized in that, further including:
The submission instruction that server is sent is updated if receiving in the second time-out time, configuration is updated to local pre-updated Latest configuration information in buffer area activates the local thread for obtaining latest configuration information, destroys overtime monitoring thread, and to more New demand servicing device, which returns to submit, finishes message;
The cancellation instruction that server is sent is updated if receiving in the second time-out time, activates local acquisition latest configuration letter The thread of breath destroys overtime monitoring thread, and finishes message to server return cancellation is updated.
5. according to the method described in claim 3, it is characterized in that, further including:
After returning to waiting for update message to update server, sent if not received in the second time-out time and updating server Submission instruction or cancel instruction, then inquire latest configuration information in the database, update in local pre-updated buffer area Configuration information activates the local thread for obtaining latest configuration information, and destroys overtime monitoring thread.
6. a kind of updating device of configuration information, which is characterized in that it is arranged in updating server, including:
Preparation module receives the standard that all application servers return for sending latest configuration information to each application server It is standby to finish message;
Update module prepares more new command for sending to each application server, if receiving institute in the first time-out time The waiting update message for having application server to return then sends to each application server and submits instruction.
7. device according to claim 6, which is characterized in that the update module is also used to:
If not receiving the waiting update message that all application servers return in the first time-out time, taken to all applications Business device, which is sent, cancels instruction.
8. a kind of updating device of configuration information, which is characterized in that it is arranged in the application server, including:
Memory module, the latest configuration information for that will update server transmission is stored in local pre-updated buffer area, to update Server returns to ready message;
Monitor module, for receiving the preparation more new command for updating server and sending, start overtime monitoring thread, with monitoring whether The submission instruction for updating server transmission is received in the second time-out time or cancels instruction, is suspended and is locally obtained newest match The thread of confidence breath returns to waiting for update message to server is updated.
9. device according to claim 8, which is characterized in that further include submitting module, be used for:
The submission instruction that server is sent is updated if receiving in the second time-out time, configuration is updated to local pre-updated Latest configuration information in buffer area activates the local thread for obtaining latest configuration information, destroys overtime monitoring thread, and to more New demand servicing device, which returns to submit, finishes message;
The cancellation instruction that server is sent is updated if receiving in the second time-out time, activates local acquisition latest configuration letter The thread of breath destroys overtime monitoring thread, and finishes message to server return cancellation is updated.
10. device according to claim 8 or claim 9, which is characterized in that further include enquiry module, be used for:
After returning to waiting for update message to update server, sent if not received in the second time-out time and updating server Submission instruction or cancel instruction, then inquire latest configuration information in the database, update in local pre-updated buffer area Configuration information activates the local thread for obtaining latest configuration information, and destroys overtime monitoring thread.
11. a kind of more new system of configuration information, which is characterized in that including setting described in claim 6 or 7 in more new demand servicing The updating device of setting in the application server described in any one of updating device and claim 8-10 in device.
12. a kind of electronic equipment, which is characterized in that including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real It is existing method according to claim 1 or 2.
13. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor It is realized when row method according to claim 1 or 2.
14. a kind of electronic equipment, which is characterized in that including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 3-5.
15. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor The method as described in any in claim 3-5 is realized when row.
CN201810552453.3A 2018-05-31 2018-05-31 Configuration information updating method and device Active CN108833147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810552453.3A CN108833147B (en) 2018-05-31 2018-05-31 Configuration information updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810552453.3A CN108833147B (en) 2018-05-31 2018-05-31 Configuration information updating method and device

Publications (2)

Publication Number Publication Date
CN108833147A true CN108833147A (en) 2018-11-16
CN108833147B CN108833147B (en) 2020-11-24

Family

ID=64147190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810552453.3A Active CN108833147B (en) 2018-05-31 2018-05-31 Configuration information updating method and device

Country Status (1)

Country Link
CN (1) CN108833147B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109831340A (en) * 2019-03-15 2019-05-31 深圳前海微众银行股份有限公司 Server exchange method, equipment, server, client and readable storage medium storing program for executing
CN113168663A (en) * 2018-12-12 2021-07-23 伟摩有限责任公司 Multi-destination trip for autonomous vehicles

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206575A (en) * 2006-12-19 2008-06-25 大唐移动通信设备有限公司 Software mend on-line upgrade method, veneer and system
CN101714096A (en) * 2009-12-02 2010-05-26 浙江中控技术股份有限公司 Method and device for updating configuration information
US20110214113A1 (en) * 2010-02-26 2011-09-01 Alibaba Group Holding Limited Hot deployment of software
CN103685487A (en) * 2013-12-02 2014-03-26 宁波三星电气股份有限公司 Child node updating method in wireless communication network
CN105589719A (en) * 2015-12-17 2016-05-18 广州汽车集团股份有限公司 System for remotely upgrading full vehicle-mounted controller softwares and upgrading method thereof
CN106572173A (en) * 2016-11-07 2017-04-19 网易无尾熊(杭州)科技有限公司 Method, apparatus and system for updating configuration information
CN107479917A (en) * 2017-08-03 2017-12-15 郑州云海信息技术有限公司 A kind of batch refresh PSU FW method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206575A (en) * 2006-12-19 2008-06-25 大唐移动通信设备有限公司 Software mend on-line upgrade method, veneer and system
CN101714096A (en) * 2009-12-02 2010-05-26 浙江中控技术股份有限公司 Method and device for updating configuration information
US20110214113A1 (en) * 2010-02-26 2011-09-01 Alibaba Group Holding Limited Hot deployment of software
CN103685487A (en) * 2013-12-02 2014-03-26 宁波三星电气股份有限公司 Child node updating method in wireless communication network
CN105589719A (en) * 2015-12-17 2016-05-18 广州汽车集团股份有限公司 System for remotely upgrading full vehicle-mounted controller softwares and upgrading method thereof
CN106572173A (en) * 2016-11-07 2017-04-19 网易无尾熊(杭州)科技有限公司 Method, apparatus and system for updating configuration information
CN107479917A (en) * 2017-08-03 2017-12-15 郑州云海信息技术有限公司 A kind of batch refresh PSU FW method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113168663A (en) * 2018-12-12 2021-07-23 伟摩有限责任公司 Multi-destination trip for autonomous vehicles
CN109831340A (en) * 2019-03-15 2019-05-31 深圳前海微众银行股份有限公司 Server exchange method, equipment, server, client and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN108833147B (en) 2020-11-24

Similar Documents

Publication Publication Date Title
CN109922158A (en) Data processing method, device, medium and electronic equipment based on micro services
CN108681777A (en) A kind of method and apparatus of the machine learning program operation based on distributed system
CN110417842A (en) Fault handling method and device for gateway server
CN110096344A (en) Task management method, system, server cluster and computer-readable medium
CN108961033A (en) Multiservice system exchange method and device, storage medium, electric terminal
CN110245011A (en) A kind of method for scheduling task and device
CN108874513A (en) Handle method, system, electronic equipment and the computer-readable medium of timed task
CN109245908A (en) A kind of method and apparatus of principal and subordinate's cluster switching
CN110830374A (en) Method and device for gray level release based on SDK
CN109241033A (en) The method and apparatus for creating real-time data warehouse
CN110502572A (en) A kind of method and server that data are synchronous
CN109992406A (en) The method and client that picture requesting method, response picture are requested
CN110019346A (en) A kind of data processing method and device based on double primary databases
CN109597699A (en) Data processing method, device, electronic equipment and computer-readable medium
CN110019310A (en) Data processing method and system, computer system, computer readable storage medium
CN108984197A (en) A kind of code update method and device
CN108833147A (en) A kind of update method and device of configuration information
CN110019539A (en) A kind of method and apparatus that the data of data warehouse are synchronous
CN109218041A (en) Request processing method and device for server system
CN110147508A (en) A kind of method and apparatus of system current limliting
CN110113176A (en) Information synchronization method and device for configuration server
CN109725913A (en) The method and apparatus that data update
CN109471713A (en) Method and apparatus for query information
CN110493291A (en) A kind of method and apparatus handling HTTP request
CN110347654A (en) A kind of method and apparatus of online cluster features

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
CB02 Change of applicant information

Address after: 101111 Room 221, 2nd Floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone

Applicant after: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

Address before: 101111 Room 221, 2nd Floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone

Applicant before: BEIJING JINGDONG FINANCIAL TECHNOLOGY HOLDING Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 101111 Room 221, 2nd Floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone

Patentee after: Jingdong Technology Holding Co.,Ltd.

Address before: 101111 Room 221, 2nd Floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone

Patentee before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: 101111 Room 221, 2nd Floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone

Patentee after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: 101111 Room 221, 2nd Floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone

Patentee before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

CP01 Change in the name or title of a patent holder