CN110245194A - Service data updating method, server and server cluster - Google Patents
Service data updating method, server and server cluster Download PDFInfo
- Publication number
- CN110245194A CN110245194A CN201910549825.1A CN201910549825A CN110245194A CN 110245194 A CN110245194 A CN 110245194A CN 201910549825 A CN201910549825 A CN 201910549825A CN 110245194 A CN110245194 A CN 110245194A
- Authority
- CN
- China
- Prior art keywords
- business datum
- server
- service
- version number
- service state
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring data consistency and integrity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/273—Asynchronous replication or reconciliation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses service data updating method, server and server clusters, in to server cluster during each server update business datum, the first business datum of at least one first server in server cluster is updated first, so that first server, which is based on the first business datum, provides corresponding service service at least one client;The service state of first server is obtained, if the service state is improper service state, then at least one second server will not be updated the second business datum that itself is stored based on the first business datum in server cluster.If the first business datum malfunctions and is updated again to business datum, the first business datum in first server is only updated again, accelerates renewal speed.If the error of the first business datum can result in servers go down, paralyse then only having first server in server cluster, at least one second server will not paralyse.
Description
Technical field
This application involves technical field of data processing, more specifically to a kind of service data updating method, server
And server cluster.
Background technique
With the development of information technology, server passes through client (such as: webpage client, or, application client)
Business service constantly is provided for user, for example, user can send request of data by user end to server, server is logical
It crosses client and shows corresponding business service to user.It is requested for example, user sends given ad by user end to server,
Server shows the given ad to user by client.
As the amount of access of client is continuously increased, userbase constantly expands, in order to guarantee that user obtains client institute
The stability and efficiency of the business service of offer, the server of client background would generally use the frame of distributed server cluster
Structure, wherein by multiple servers of LAN connection be known as a server cluster (such as: multiple servers are set to together
In one computer room, it is connected by local area network, multiple servers in the computer room can regard a server cluster as).
On this basis, when client provides a user corresponding service, it is necessary to make each server institute in server cluster
The business datum used is consistent, otherwise, it will occur leading to the phenomenon of business result confusion since business datum is inconsistent,
For example, some users can watch some advertisement by video application, some users cannot by video application
Watch the advertisement (for the user with same hobby feature).In other words, need that server cluster includes is each
The service data consistence of server.
In the prior art, so that the method for the service data consistence of each server is as follows in server cluster:
If terminal device monitors that the business datum of itself storage changes, the business datum changed is obtained, and
The business datum changed is sent respectively to each server in server cluster, to realize each server in server cluster
Business datum synchronized update, ensure that the service data consistence of each server in server cluster.
Using the above method, if business datum malfunctions, then the business datum of each server malfunctions in server cluster,
For example, business datum is that light exposure of the given ad in one month is greater than 20,000 less than 2.2 ten thousand, if business datum to specify
Light exposure of the advertisement in one month is less than 20,000, then will lead to revenue losses.If business datum malfunctions, then being related to again
Update business datum.During updating business datum again, need to update the business in server cluster in Servers-all
Data cause renewal time to extend.If business datum malfunctions, after the Servers-all of server cluster runs a period of time,
Could find, i.e., business datum error discovery not in time.If business datum error can result in servers go down, server
Servers-all is paralysed in cluster.
Summary of the invention
In view of this, this application provides a kind of service data updating method, server and server clusters.
A kind of service data updating method is applied to first server, comprising:
Obtain the first business datum and the corresponding first version number of first business datum;
If detecting, the first version number and the second edition number itself stored be not identical, is based on the first business number
It is updated according to second business datum;The second edition number is the second business datum of first server storage
Corresponding version number, second business datum be a preceding service data updating during, what the first server obtained
The business datum of latest edition;
Service state is obtained, it is at least that the service state, which refers to that the first server is based on first business datum,
One client provides the state of corresponding service service;
If the service state is improper service state, do not execute the corresponding first version of first business datum
It number stores to the operation of storage equipment, the storage equipment is stored with the corresponding second edition number of second business datum, makes
At least one second server for belonging to same server cluster with the first server is obtained to obtain from the storage equipment
The corresponding different situation of first version number of first business datum that is obtained with itself of the second edition number under, no
Execute the operation being updated based on first business datum to the second business datum that itself is stored.
A kind of service data updating method is applied to second server, comprising:
Obtain the first business datum and the corresponding first version number of first business datum;
If detecting, the first version number and the second edition number itself stored be not identical, obtains and stores in storage equipment
The corresponding version number of business datum;The second edition number is that the second business datum of second server storage is corresponding
Version number, second business datum are the latest edition that during a preceding service data updating, the second server is obtained
This business datum;
Wherein, the storage equipment is used to store the corresponding version number of business datum of current time latest edition, and institute
The corresponding service state of business datum for stating latest edition is normal service state, and the service state refers to first server base
The state of corresponding service service, the first server are provided in the business datum of the latest edition at least one client
Belong to same server cluster with the second server;
If the version number of the storage equipment storage and the first version number be not identical, do not execute based on first industry
The operation that business data are updated second business datum.
A kind of first server, comprising:
First Service Component, for obtaining the first business datum;
First preliminary examination component, for obtaining the corresponding first version number of first business datum, if detecting described
One version number and the second edition number that itself is stored be not identical, controls the Service Component and executes based on first business datum
The operation that second business datum is updated;The second edition number is the second business of first server storage
The corresponding version number of data, second business datum is during a preceding service data updating, the first server is obtained
The business datum of the latest edition arrived;
First Service Component is also used to obtain service state, and the service state is sent to the first preliminary examination component;
The service state refers to that the first server is based on first business datum and provides corresponding industry at least one client
The state of business service;
The first preliminary examination component is also used to: if the service state is improper service state, not being executed described the
The corresponding first version number of one business datum is stored to the operation of storage equipment, and the storage equipment is stored with second business
The corresponding second edition number of data;So that belonging at least one second service of same server cluster with the first server
The first version for first business datum that device is obtained in the second edition number obtained from the storage equipment with itself
In number different situation, the operation being updated based on first business datum to second business datum is not executed.
A kind of second server, comprising:
Second Service Component, for obtaining the first business datum;
Second preliminary examination component, for obtaining the corresponding first version number of first business datum, if detecting described
One version number and the second edition number that itself is stored be not identical, obtains the version number of the business datum stored in storage equipment;Institute
The corresponding version number of the second business datum that the second edition number is second server storage is stated, second business datum is
During a preceding service data updating, the business datum for the latest edition that the second server obtains;
Wherein, the storage equipment is used to store the corresponding version number of business datum of current time latest edition, and institute
The corresponding service state of business datum for stating latest edition is normal service state, and the service state refers to first server base
The state of corresponding service service, the first server are provided in the business datum of the latest edition at least one client
Belong to same server cluster with the second server;
The preliminary examination component, is also used to: if the version number of the storage equipment storage and the first version number be not identical,
The Service Component is not triggered executes the operation being updated based on first business datum to second business datum.
A kind of server cluster, comprising:
At least one first server as described above;
At least one second server as described above;
And equipment is stored as described above.
It can be seen via above technical scheme that compared with prior art, this application discloses a kind of service data updating sides
Method, during each server update business datum for including in server cluster, first in update server cluster
The business datum of at least one first server, then making first server be based on the first business datum is at least one client
End provides corresponding service service.The service state of first server is obtained, if the service state is improper service state, that
The second business datum that at least one second server will not store itself based on the first business datum in server cluster
It is updated.It can find in time whether the first business datum malfunctions by first server, malfunction in the first business datum
In the case where, the first business datum is based on to the second business due to only having part server i.e. first server in server cluster
Data are updated, so the first business datum in first server is only updated again, if with current first business number
It is needed to update again in server cluster for the business datum of Servers-all according to error, accelerates renewal speed.If first
Business datum error can result in servers go down, paralyse then only having first server in server cluster, and at least one
A second server will not paralyse.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of service data updating system schematic disclosed in the embodiment of the present application;
Fig. 2 is a kind of service data updating method flow diagram applied to first server disclosed in the embodiment of the present application;
Fig. 3 is a kind of service data updating method flow diagram applied to second server disclosed in the embodiment of the present application;
Fig. 4 is a kind of optional signaling process of service data updating system disclosed in the embodiment of the present application;
Fig. 5 is a kind of apparatus structure schematic diagram applied to first server disclosed in the embodiment of the present application;
Fig. 6 is a kind of apparatus structure schematic diagram applied to second server disclosed in the embodiment of the present application;
Fig. 7 is a kind of device hardware structural block diagram applied to first server disclosed in the embodiment of the present application;
Fig. 8 is a kind of device hardware structural block diagram applied to second server disclosed in the embodiment of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
As shown in Figure 1, being a kind of structure chart of service data updating system provided by the embodiments of the present application, business datum is more
New system includes: terminal device 11, at least one server cluster 10.
Wherein, a server cluster 10 includes: storage equipment 12, one or more first server 13, and, one
Or multiple second servers 14.
Optionally, terminal device 11 can be the electronic equipments such as smart phone, computer, PAD, server.
Terminal device 11 is used for storage service data, i.e. server is right for the business service that user provides by client
The business datum answered.In an alternative embodiment, the business datum stored in terminal device 11 can be by corresponding application program
Or management program is modified, so that the change of business datum is generated, under certain scenes in practical applications, business datum change
More frequently once the business datum in terminal device 11 is changed, it just may need to update one or more clothes
The business datum of each server storage in business device cluster 10.
Business datum mentioned in the application refers to data corresponding to various businesses, each in above-mentioned server cluster 10
Server can provide corresponding service service based on business datum at least one client.Optionally, business datum can wrap
It includes following any: the corresponding business datum of advertisement exposure business (for being exposed processing to advertisement), ad placement service
Corresponding business datum (for carrying out dispensing processing to advertisement).
In an alternative embodiment, when terminal device 11 monitors that the business datum of itself storage changes, obtain
The business datum of change, (data manipulations such as being increased, deleted, changed, looked into business datum will lead to the change of business datum.That
, the change data of acquisition, that is, obtain the data changed after data manipulation), the industry that will have been changed
Business data are sent to each server in one or more server clusters 10, i.e., the business datum changed are sent to server
One or more first servers 13 and one or more second servers 14 in cluster 10.
Whether first server 13 can detecte the business datum (subsequent be known as the first business datum) received wrong, can
Choosing, first server 13 can provide normal business service at least one client based on the first business datum, be based on
Whether the service state of business service is normal service state, determines whether the first business datum is wrong.If first server 13
Detect that the first business datum is errorless, then the first version number of first business datum is sent to storage equipment 12.
Above-mentioned first business datum " wrong " is if refer to the first business datum the first business corresponding with the first business datum
The expection service state of service is different.For example, if expected service state is that (such as on March 1st, 2019 is extremely in preset time period
Daily 8 points to 12 points of on April 1st, 2019) processing is exposed to A advertisement, if the corresponding active service of the first business datum
State is in period different from preset time period (such as daily 10 points to 18 of on April 1,1 day to 2019 March in 2019
Point) processing is exposed to A advertisement, then it is assumed that and it is expected that service state is different from active service state, i.e., the first business datum is deposited
In mistake;Alternatively, if the first business datum leads to servers go down, then it is assumed that there are mistakes for the first business datum.For another example if
It is expected that the light exposure that service state is A advertisement within a preset period of time is greater than or equal to 10 times, if the first business datum is corresponding
Active service state is that the light exposure of A advertisement is 5 times, then it is contemplated that service state is different from active service state, i.e. the first industry
There are mistakes for data of being engaged in.
If second server 14 detects the first version number obtained from storage equipment 12 and oneself obtains from terminal device 11
The version number of the business datum obtained is identical, then the second business datum based on the first service data updating itself storage, so that
Second server 14 can provide business service at least one client based on the first business datum.
To sum up, one or more first servers and one or more second servers receive terminal in server cluster
After the first business datum and first version number that equipment 11 is sent, second server 14 is not based on the first business datum immediately
The second business datum of oneself storage is updated, but is waited for a period of time;It is understood that second server waits at least for
Time of one server based on first the second business datum of service data updating is based on first business with, first server
The sum of data provide the time of corresponding service service at least one client,.
First server 13 is corresponding in the first business datum and the first business datum for receiving the transmission of terminal device 11
First version number after, first server 13 at least one client can provide business service based on the first business datum, with
Whether this first business datum of detection is wrong, if the first business datum is errorless, can store first version number to storage equipment 12.
Second server 14 detects storage equipment 12 first version number stored and the first edition itself received from terminal device 11
This number is identical, then waiting terminates, the second business number that second server 14 can be stored based on the first service data updating oneself
According to so as to provide business service at least one client based on the first business datum.If first server 13 detects
First business datum is wrong, and storage equipment 12 will not store first version number, optionally, may store last business datum
The corresponding version number of business datum during update (assuming that the referred to as second edition number).Second server detects storage equipment
The second edition number of 12 storages and the first version difference itself obtained from terminal device 11, then will not be based on the first business number
According to the second business datum for updating oneself storage.
To sum up, first server 13 is after receiving the first business datum, and whether wrong, nothing if can detect the first business datum
Servers-all operation a period of time in server cluster 10 is needed to wait for, could artificially find that business datum is wrong, so first
Server 13 can find whether the first business datum is wrong in time.
Further, if the first business datum is wrong, it is only necessary to update the business number stored in first server 13 again
According to the business datum without storing to Servers-all in server cluster 10 updates again, accelerates renewal speed.
If the first business datum can result in servers go down, then for server cluster 10, due to only first
Second service data updating is the first business datum by server 13, so only first server can paralyse, due to second service
Device 14 is only stored with the first business datum, but is not the first business datum by the second service data updating, so second service
Device 14 will not paralyse, and reduce the cost of fix server, and can fast quick-recovery server cluster 10.
Above-mentioned storage equipment 12 can be such as random access memory (RandomAccess Memory, RAM), magneto-optic
The equipment that disk (magneto-opticaldisc, MO disc), hard disk etc. can be used for reading and writing.Optionally, the embodiment of the present application
In the service data updating system of offer, if storage equipment 12 can guarantee that business datum is errorless, the in server cluster
Business datum in one server 13 and second server 14 is consistent.For example, for the use with same hobby feature
For family, all users that each server is serviced in the server cluster 10 can watch certain by video application
A advertisement, namely maintain the consistent of the business datum of each server in server cluster 10.
It should be noted that Fig. 1 is only a kind of signal of service data updating system, the embodiment of the present application is not to service
The number of device cluster and terminal device, and, in server cluster each server and storage equipment interactive mode (for example, see
In Fig. 1, optionally, 14 active of second server reads the corresponding version number of newest business datum from storage equipment 12;It can
Choosing, the corresponding version number of newest business datum wherein stored actively can be sent to second server by storage equipment 12
14) it is defined.
Next, the service data updating method proposed to the embodiment of the present application is introduced in conjunction with Fig. 1.
Service data updating method provided by the embodiments of the present application can be applied to first server 13 shown in FIG. 1, ginseng
The service data updating method flow diagram applied to first server 13 as shown in Figure 2, this method comprises:
Step S200, the first business datum and the corresponding first version number of first business datum are obtained.
It is aforementioned it has been described that the business datum stored in terminal device 11 can be by corresponding application program or management
Program is modified, to generate the change of business datum.
Optionally, in the embodiment of the present application the first business datum can for the embodiment of the present application refer to " changed business
Data ", first business datum are " new " business datum, the embodiment of the present application can based on should " new " business datum to clothes
" old " business datum stored in business device is updated.
Optionally, if terminal device 11 monitors that the business datum of itself storage changes, terminal device 11 can be with
By " newly " business datum (i.e. the first business datum) changed and " newly " the corresponding version number of business datum changed
(i.e. the corresponding first version number of the first business datum) is respectively sent to the first server 13 in server cluster 10.That is,
The first business datum and the first business datum corresponding first stored in the available terminal device 11 of first server 13
Version number.
Optionally, any business datum is all corresponding with version number, and the corresponding version number of different business data is different, can be with
Business datum is uniquely determined by version number.Optionally, the corresponding version number of above-mentioned business datum is the version of business datum
Identification number, the version number can determine business datum whether be " newest " business datum, for example, the version number of business datum with
Update, version number is incremented by successively, for example, version number 2.0 is than version number 1.0 more " new ".
If step S210, detecting, the first version number and itself storage second edition number be not identical, based on described the
One business datum is updated second business datum.
The corresponding version number of the second business datum that the second edition number stores for the first server, described second
Business datum is the business datum for the latest edition that the first server obtains during a preceding service data updating.
Optionally, the second business datum can be " old " business datum during this service data updating, namely
During upper primary service data updating " new " business datum.
Optionally, after first server 13 obtains the corresponding first version number of the first business datum, whether can detecte it
It is identical as itself corresponding second edition number of the second business datum of storage.It is understood that if they are the same, then characterizing the first clothes
The second business datum stored in business device 13 is identical as the first business datum, then does not need to replace the second industry with the first business datum
Business data;If not identical, characterize the second business datum stored in first server 13 and the first business datum is not identical,
I.e. business datum is changed, then can be updated based on the first business datum to the second business datum.
Step S220, service state is obtained, wherein the service state refers to that the first server is based on described first
Business datum provides the state of corresponding service service at least one client.
Optionally, it after first server 13 updates the first business datum, can be run based on the first business datum, with
Obtain the service state of first server 13.That is, can find that the first business datum whether there is in time by service state
Mistake.
Optionally, above-mentioned service state includes at least following two state: normal service state and improper service state.
Wherein, normal service state refers to first server based on the corresponding service service that business datum is that at least one client provides
Expected service state can be reached;It is at least one client that improper service state, which refers to that first server is based on business datum,
The corresponding service service of offer can not reach expected service state.For example, business datum is the corresponding industry of advertisement exposure business
Business data, it is assumed that it is expected that service state is that light exposure of the A advertisement in one month is greater than 20,000 less than 2.2 ten thousand, it is assumed that server set
Group includes 10 servers, and first server is 1 hour based on the time that the first business datum is run, then first server pair
The expection service state answered is that A advertisement was greater than or equal in 1 hour light exposure (wherein,
For the symbol that rounds up), it is less than or equal toIf then first server is based on the first business datum
During providing business service at least one client, the light exposure of the A advertisement of 1 hour is greater than 4 or less than 3, then recognizes
It based on the first business datum is improper clothes for the service state that at least one client provides A advertisement exposure for first server
Business state, i.e., not up to expected service state.It is provided if first server is based on the first business datum at least one client
During business service, the light exposure of the A advertisement of 1 hour is equal to 3 or 4, then it is assumed that first server is based on the first business
Data are normal service state for the service state that at least one client provides A advertisement exposure, that is, reach expected service state.
If step S230, the described service state is improper service state, do not execute first business datum is corresponding
First version number store to storage equipment operation.
Wherein, the storage equipment is stored with the corresponding second edition number of second business datum, so that with described
One server belongs at least one second server of same server cluster in described second obtained from the storage equipment
In the corresponding different situation of first version number of first business datum that version number obtains with itself, do not execute based on institute
State the operation that the first business datum is updated the second business datum that itself is stored.
Optionally, if service state is based on the first business datum for improper service state namely first server 13
The corresponding service service that at least one client provides not up to expection service state (such as 1 hour in above-mentioned steps S220
The light exposure of A advertisement be greater than 4 or less than 3), then it represents that there are mistakes for the first business datum, therefore do not execute the first business
The corresponding first version number of data is stored to the operation of storage equipment 12.
Optionally, above-mentioned " not executing " at least may include following two situation: the first situation is forbidden the first business
The corresponding first version number of data is stored to storage equipment 12;Second situation, if above-mentioned service state is improper service shape
State then terminates, i.e., above-mentioned service state is improper service state, then first server 13 no longer carries out any operation, and first
Server 13 not actively by first version number store to storage equipment 12, storage equipment 12 you can't get and store first version
Number.
Optionally, if service state is improper service state, first server 13 can be corresponding by the first business datum
First version number store to storage equipment 12, storing the corresponding version number of newest business datum that stores in equipment 12 is the
The corresponding first version number of one business datum.
Optionally, it is contemplated that above-mentioned service state is that improper service state characterizes the first business datum there are mistake, because
This storing the second edition number that equipment 12 stores and the first business datum corresponding first that second server 14 obtains
In the different situation of version number, second server 14 can not execute the second industry stored based on the first business datum to itself
The operation that business data are updated.Optionally, may include one or more second server 14, and second server 14 with it is upper
It states first server 13 and belongs to same server cluster 10.
Here " second server 14 can not execute the second business datum stored based on the first business datum to itself
The operation being updated " at least may include following two situation: in the case of the first, second server 14 is forbidden based on first
Business datum is updated the second business datum that itself is stored;Under second situation, if second server 14 is set from terminal
Standby 11 obtained first versions number, it is not identical as the second edition number that is obtained from storage equipment 12, then any operation is not executed.
This application discloses a kind of service data updating methods applied to first server 13, to server cluster 10
In include each server update business datum during, first update server cluster 10 at least one first service
Then the business datum of device 13 makes first server 13 be based on the first business datum and provides corresponding industry at least one client
Business service.The service state of first server 13 is obtained, if the service state is improper service state, then server set
At least one second server 14 will not be carried out more based on the second business datum that the first business datum stores itself in group 10
Newly.It can find in time whether the first business datum malfunctions by first server 13, in the feelings of the first business datum error
Under condition, the first business datum is based on to the second business due to only having part server i.e. first server 13 in server cluster 10
Data are updated, so the first business datum in first server 13 is only updated again, if with current first business
Corrupt data needs to update again in server cluster 10 for the business datum of Servers-all, accelerates renewal speed.If
The error of first business datum can result in servers go down, then only having first server 13 in server cluster 10 occurs paralysis
Paralysis, at least one second server 14 will not paralyse.
In the case that above-mentioned steps S230 describes service state in detail as improper service state, 13 institute of first server
The operation of execution.The case where one embodiment of the application is normal service state to service state is illustrated.
It is if the service state is normal service state, first business datum is corresponding in the embodiment of the present application
First version number is stored to the storage equipment 12, and one or more second servers 14 are in first obtained from storage equipment 12
In the identical situation of first version number of version number and the first business datum itself obtained from terminal device 11, based on described the
One business datum is updated the second business datum.
To sum up, if service state is normal service state, it is corresponding to store the newest business datum stored in equipment 12
Version number be the corresponding first version number of the first business datum.
Another embodiment of the application, to above-mentioned steps S220, the process for obtaining service state is illustrated.
Optionally, it is contemplated that before first server 13 finishes the second business datum based on the first service data updating, by
It in first server 13 and is not based on the first business datum and is run, i.e., being also not based on the first business datum is at least one visitor
Family end provides business service, so can not know based on whether the first business datum can provide normally at least one client
Business service, therefore, it is necessary to first server 13 be based on the first business datum operation a period of time after, can just know base
Whether normal business service can be provided at least one client in the first business datum, therefore can be in first server
13 finish the second business datum based on the first service data updating, and based on the first business datum operation a period of time after, then obtain
Service state is obtained, then the process can specifically include:
Using the first moment as initial time, the service state in set period of time is obtained, first moment is base
At the time of first business datum finishes second service data updating.
In an alternative embodiment, period A can be preset, for example, starting based on first with first server 13
It is initial time at the time of the second business datum of service data updating, detects whether first server 13 in period A is based on
First service data updating finishes the second business datum, i.e. the first business datum substitutes the second business datum completely.If in the time
First server 13 is based on the first service data updating and finishes the second business datum in section A, then it represents that first server 13 can
Normally complete the update of business datum;If first server 13 is based on the first business datum and does not update to finish the in period A
Two business datums, then it represents that first server 13 can not normally complete the update of business datum, i.e., first business datum can
There can be problem.
It is assumed that set period of time is t1, it is assumed that the first moment was 0, then the corresponding section of set period of time is [0, t1],
If the first moment was t2, then the corresponding section of set period of time is [t2, t1+t2]。
It is understood that the quantity difference of different moments user's browsing client, i.e. different moments, first server 13
The number for providing business service based on the first business datum at least one client is different, i.e. different moments, for same industry
Business data, first server may be different in the service state that the same settings period obtains.For example, it is assumed that the first business datum
For the corresponding business datum of advertisement exposure business, it is contemplated that under normal circumstances, user passes through client to next day 0:00 in 18:00
A possibility that watching video is bigger, and smaller a possibility that 0:00 to 18:00 watches video by client, namely 18:
00 to next day 0:00 advertisement exposure amount is larger, and smaller in 0:00 to 18:00 advertisement exposure amount.
It is understood that the renewable time of business datum can be any moment in one day, if being directed to same first
Business datum, no matter which renewable time of the first business datum be at moment, identical to the yardstick of service state, for example,
The interval range for measuring service state is identical, it is possible to which the renewable time based on business datum, is arranged corresponding setting time
Section, for example, since this view of time sees that the user of client is more, advertisement exposes if the first service data updating moment was 19:00
Light quantity is larger, so set period of time can be smaller;If the first service data updating moment was 14:00, due to this view of time
See that the user of client is less, advertisement exposure amount is smaller, so set period of time can be longer.
Optionally, set period of time can be at the time of finishing the first business datum based on first server update or beginning
It is arranged at the time of updating the first business datum.
If being directed to same first business datum, no matter the renewable time of the first business datum is which, setting time at moment
Duan Xiangtong.
It is understood that the corresponding service state of different business datums may be different, below to the kind of service state
Class is illustrated.The application provides but is not limited to following several methods for obtaining service state.
The first:
It obtains the first server at least one client for described in the set period of time and corresponding service clothes is provided
The average response time of business.
Optionally, average response time refers to that first server 13 provides corresponding service at least one client and services institute
The average time needed namely first server 13 handle average time required for the corresponding service is requested.It is understood that
It is that within a preset period of time, the average response time of acquisition is bigger, indicates that first server 13 handles the processing of the corresponding service
Speed is slower, and the efficiency for handling corresponding service is lower;Conversely, the average response time obtained is smaller, first server 13 is indicated
The processing speed for handling the corresponding service is faster, and the efficiency for handling corresponding service is higher.
Optionally, if the error of the first business datum causes first server 13 to be paralysed, average response time is positive infinite
(+∞)。
Second:
At least one described client in the set period of time is obtained to take in the corresponding business of first business datum
The lower query rate per second for the first server of business.
Optionally, query rate (Queries-per-second, QPS) per second can be used to characterize server in the stipulated time
The quantity of interior handled service request.It is understood that within a preset period of time, the QPS of acquisition is smaller, the first clothes are indicated
The processing speed that business device 13 handles the corresponding service is slower, and the efficiency for handling corresponding service is lower;Conversely, the QPS obtained is bigger,
Indicate that the processing speed of the processing of first server 13 corresponding service is faster, the efficiency for handling corresponding service is higher.
Above-mentioned QPS can be indicated with following calculation formula:
QPS=PV/ (one day total number of seconds * H)
Wherein, PV refers to the total quantity of service request handled by server, and H refers to that first server is based on the first business
Data provide the duration (as unit of hour) of business service and 24 ratio at least one client.
For example, daily number of seconds is 86400 seconds if H is 20%, the total quantity (PV) of the service request of server process is
The service request of 2400000, the then QPS=2400000/ (86400*20%)=139 namely server obtained in processing per second
Quantity is 139.
Optionally, if the error of the first business datum causes first server 13 to be paralysed, QPS zero.
The third:
Obtain in the set period of time first server be based on first business datum be it is described at least one
The light exposure of client offer specify information.
Optionally, it is at least one client that the light exposure of specify information, which refers to that first server 13 is based on the first business datum,
End provides the displaying number of specify information.
Optionally, if the error of the first business datum causes first server 13 to be paralysed, the light exposure of specify information is zero.
4th kind: above-mentioned average response time is obtained, any two in query rate per second and light exposure, alternatively, on obtaining
State average response time, query rate per second and light exposure.
Optionally, different service states can be directed to, different threshold values is set, then it is above-mentioned in preset threshold range
Service state is normal service state;Otherwise, above-mentioned service state is improper service state.Based on this, the embodiment of the present application
The light exposure of average response time, QPS and specify information that a upper embodiment refers to and the corresponding relationship of service state are specific
It is described below:
The first:
If the average response time is less than or equal to first threshold, the service state is normal service state.
Optionally, average response time, preset first threshold value, then it is understood that if when average response can be directed to
Between be less than or equal to first threshold, expressions service state be normal service state;If average response time is greater than first threshold, table
Show that service state is improper service state.
For example, it is directed to average response time, first threshold 5ms, if then average response time is less than or equal to 5ms (example
Such as 4ms), expression service state is normal service state;If average response time is greater than 5ms (such as 6ms), service state is indicated
For improper service state.
Second:
If the query rate per second is greater than or equal to second threshold, the service state is normal service state.
Optionally, it can be directed to query rate per second (QPS), presets second threshold, then it is understood that if QPS is greater than
Or it is equal to second threshold, expression service state is normal service state;If QPS is less than second threshold, indicate that service state is non-
Normal service state.
For example, being directed to QPS, second threshold 139 indicates service state if then QPS is greater than or equal to 139 (such as 145)
For normal service state;If QPS, less than 139 (such as 138), expression service state is improper service state.
The third:
If the light exposure of the specify information is greater than or equal to third threshold value and is less than or equal to the 4th threshold value, the service
State is normal service state.
Optionally, consider that the light exposure of specify information may be different in different moments, namely be likely to occur certain moment to refer to
The light exposure for determining information is far longer than the average exposure of specify information in preset time period, and in certain moment specify informations
Light exposure is far smaller than the average exposure of specify information in preset time period, therefore can preset third threshold value and the 4th threshold
Value, third threshold value can be corresponding minimum exposure amount in preset time period, the 4th threshold value be in preset time period it is corresponding most
It makes light quantity public, if then the light exposure of specify information is greater than or equal to third threshold value and is less than or equal to the 4th threshold value, indicates service
State is normal service state;Otherwise, indicate that service state is improper service state.
For example, designating the information as advertisement A, it is contemplated that under normal circumstances, user passes through client to next day 0:00 in 18:00
A possibility that watching video is maximum;It is minimum a possibility that 0:00 to 6:00 watches video by client;In 6:00 to 18:00
A possibility that watching video by client is larger.Namely it is best in the possible effect of 18:00 to next day 0:00 progress advertisement exposure,
The light exposure of advertisement A may be far longer than the average exposure of advertisement A in one day within this time;It is carried out in 0:00 to 6:00
The possible effect of advertisement exposure is worst, and the light exposure of advertisement A may be far smaller than the average exposure of advertisement A in one day within this time
Light quantity;Preferable in the possible effect of 6:00 to 18:00 progress advertisement exposure, the light exposure of advertisement A may be with one within this time
Average exposure of advertisement A maintains an equal level in it.Therefore two threshold values, i.e. third threshold value (such as 1,000,000) and the 4th threshold can be preset
It is worth (such as 1,500,000), wherein third threshold value can be minimum exposure amount in one day, and the 4th threshold value can be most to make public in one day
Light quantity indicates that service state is positive if then the light exposure of advertisement A is greater than or equal to third threshold value and is less than or equal to the 4th threshold value
Normal service state;Otherwise, indicate that service state is improper service state.
4th kind:
If the average response time be less than or equal to first threshold, and if the query rate per second be greater than or equal to second
Threshold value, the service state are normal service state.
Or,
If the average response time is less than or equal to first threshold, and if the light exposure of the specify information be greater than or wait
In third threshold value and it is less than or equal to the 4th threshold value, the service state is normal service state.
Or,
If the query rate per second is greater than or equal to second threshold, and, if the light exposure of the specify information is greater than or waits
In third threshold value and it is less than or equal to the 4th threshold value, the service state is normal service state.
Or,
If the average response time be less than or equal to first threshold, and if the query rate per second be greater than or equal to second
Threshold value, and if the specify information light exposure be greater than or equal to third threshold value and be less than or equal to the 4th threshold value, the service
State is normal service state.
The embodiment of the present application also provides the service data updating method for being applied to second server 14, the second servers
14 belong to same server cluster with above-mentioned first server 13, shown in Figure 3 a kind of applied to second server 14
Service data updating method flow diagram, this method comprises:
Step S300, the first business datum and the corresponding first version number of first business datum are obtained.
Second server 14 obtains the first business datum and the corresponding first version number of the first business datum in this step
Method and above-mentioned steps S200 in, first server 13 obtains the first business datum and the first business datum corresponding first
The method of version number is identical, can refer to above-mentioned steps S200 in detail, is no longer described in detail here.
If step S310, detecting, the first version number and the second edition number itself stored be not identical, obtains storage
The corresponding version number of the business datum stored in equipment.
The corresponding version number of the second business datum that the second edition number stores for the second server, described second
Business datum is the business datum for the latest edition that the second server obtains during a preceding service data updating.
Wherein, the storage equipment is used to store the corresponding version number of business datum of current time latest edition, and institute
The corresponding service state of business datum for stating latest edition is normal service state, and the service state refers to first server base
The state of corresponding service service, the first server are provided in the business datum of the latest edition at least one client
Belong to same server cluster with the second server.
Optionally, " old " business number that the second business datum can refer to for the embodiment of the present application in the embodiment of the present application
According to.
Optionally, after second server 14 obtains the corresponding first version number of the first business datum, whether can detecte it
It is identical as itself corresponding second edition number of the second business datum of storage.It is understood that if they are the same, then characterizing the second clothes
The second business datum stored in business device 14 is identical as the first business datum, then does not need to replace the second industry with the first business datum
Business data;If not identical, characterize the second business datum stored in second server 14 and the first business datum is not identical,
I.e. business datum is changed, then needs to be updated the second business datum based on the first business datum.
There may be mistakes for the first business datum obtained in view of step S300, therefore optional, second server 14
After obtaining the first business datum and the corresponding first version number of the first business datum, it can be obtained wherein from storage equipment 12
The version number of the business datum of storage, the version number are the business datum for storing the current time latest edition stored in equipment 12
Corresponding version number, " latest edition " here includes at least following two situation: the first situation, if the first business datum is deposited
In mistake, then store before the corresponding version number of newest business datum that stores in equipment 12 is the first business datum, distance
The corresponding version number of the second business datum that mistake is not present of current time recently;Second situation, if the first business datum
There is no mistakes, then storing the corresponding version number of newest business datum stored in equipment 12 is that the first business datum is corresponding
First version number.
The business datum of above-mentioned latest edition is the first service for belonging to same server cluster 10 with second server 14
Device 13 detects that there is no after mistake, the corresponding version number of the business datum of latest edition is sent for the business datum of latest edition
Into storage equipment 12.Therefore, the service state of the corresponding service state characterization of the business datum of the latest edition is normal
Service state, above-mentioned service state refer to that first server is provided based on the business datum of latest edition at least one client
The state of corresponding service service.
Optionally, second server 14 obtains the process of the corresponding version number of business datum stored in storage equipment 12 extremely
Less may include following two situation: the first, second server 14 actively can read newest industry from storage equipment 12
The corresponding version number of data of being engaged in;Second, storage equipment 12 can be actively corresponding by the newest business datum wherein stored
Version number is sent to second server 14.
If the version number of step S320, the described storage equipment storage and the first version number be not identical, do not execute and be based on
The operation that first business datum is updated second business datum.
Optionally, storing the version number stored in equipment 12 is to detect errorless business datum through first server 13 to correspond to
Version number, therefore second server 14 can will store first version number that the version number that store of equipment 12 obtains with itself into
Row compares, if the first version number that the version number that storage equipment 12 stores obtains with itself is not identical, then it represents that itself was obtained
There are mistakes for first business datum, therefore do not execute and be updated based on first business datum to second business datum
Operation.
Optionally, above-mentioned " not executing " at least may include following two situation: in the case of the first, forbid second service
Device 14 is updated the second business datum that itself is stored based on the first business datum;Under second situation, if storage equipment
Version number's first version number corresponding with the first business datum that second server 14 obtains of 12 storages is not identical, then terminates,
Even store version number's first version number corresponding with the first business datum that second server 14 obtains of the storage of equipment 12 not
Identical, then second server 14 no longer carries out any operation.
This application discloses a kind of service data updating method applied to second server 14 in server cluster 10,
After two servers 14 obtain the first business datum and the corresponding first version number of the first business datum, the first industry will not be directly based upon
Business data are updated the second business datum that itself store, but wait for a period of time, if the determination of first server 13 the
One business datum is wrong, then the second business datum stored based on the first business datum to itself is not carried out in second server 14
The operation being updated.
It can find in time whether the first business datum malfunctions by first server 13, malfunction in the first business datum
In the case where, the first business datum is based on to second due to only having part server i.e. first server 13 in server cluster 10
Business datum is updated, so the first business datum in first server 13 is only updated again, if at present first
Business datum error needs to update again in server cluster 10 for the business datum of Servers-all, accelerates update speed
Degree.If the error of the first business datum can result in servers go down, sent out then only having first server 13 in server cluster 10
Raw paralysis, at least one second server 14 will not paralyse.
Above-mentioned steps S320 describes the version number and the different situation of first version number that storage equipment 12 stores in detail
Under, operation performed by second server 14.One embodiment of the application, the version number and first that storage equipment 12 is stored
The identical situation of version number is illustrated.
In the embodiment of the present application, if the version number of the storage equipment storage is identical as the first version number, the second clothes
Business device is based on first business datum and is updated to second business datum, so that the second server is based on institute
It states the first business datum and provides corresponding service service at least one described client.
Optionally, it is contemplated that if the version number that the storage equipment 12 stores is identical as the first version number, illustrate
The first business datum that second server 14 obtains is errorless, therefore second server 14 can be based on the first business datum to itself
Second business datum of storage is updated, to ensure that the first business datum and first server 13 of second server 14
The first business datum consistency.For example, for the user with same hobby feature, in the server cluster 10
All users that each server is serviced can watch some advertisement by video application, namely ensure that server
The consistency of the business datum of each server in cluster 10.
In order to which those skilled in the art more understand the embodiment of the present application, below with reference to Fig. 1 to service data updating method
It is illustrated.Next, in conjunction with Fig. 4, to a kind of signaling diagram progress of service data updating method provided by the embodiments of the present application
Explanation.
Step S401, terminal device 11 sends the first business datum and the corresponding first version number of the first business datum
Each server (an at least first server 13 and at least a second server 14) into server cluster 10.
Step S402, the second business datum that first server 13 is stored based on the first service data updating itself.
Step S403, first server 13 obtains service state, if service state is normal service state, executes step
S404;If service state is improper service state, step S405 is executed.
Optionally, first server 13 is based on the first service data updating and finishes the second business datum, can run this
One business datum, and service state is obtained after set period of time, which refers to that first server 13 is based on the first industry
Data of being engaged in provide the state of corresponding service service at least one client.
Step S404, first server 13 stores the corresponding first version number of the first business datum to storage equipment 12.
If step S405, service state is improper service state, first server 13 is not executed the first business number
It stores according to corresponding first version number to the operation of storage equipment 12.
Due to being not execute, so not executed in Fig. 4 with "×" embodiment.
Step S406, second server 14 obtains the latest edition number that storage equipment 12 stores.
Optionally, the latest edition number that itself is stored can be sent to the second clothes for storage equipment 12 by above-mentioned acquisition process
Business device 14, alternatively, second server 14 reads the latest edition number wherein stored from storage equipment 12.
If service state is normal service state, the latest edition number that storage equipment 12 stores is first version number;If clothes
Business state representation service state is improper service state, and the latest edition number that storage equipment 12 stores is the second edition number.
If step S407, second server 14 detects the latest edition number and itself set from terminal that storage equipment 12 stores
The first version number obtained for 11 is identical, then second server 14 is based on corresponding first service data updating of first version number certainly
Second business datum of body storage.
If latest edition number and itself obtained from terminal device 11 that the storage equipment 12 that second server 14 obtains stores
First version number it is not identical, then second server 14 do not execute based on corresponding first service data updating of first version number from
The operation of second business datum of body storage.
Method is described in detail in above-mentioned the embodiment of the present application, diversified forms can be used for the method for the embodiment of the present application
Device realize, therefore the embodiment of the present application also provides two kinds of device, specific embodiment is given below and is described in detail.
The embodiment of the present application provides a kind of device applied to first server 13, is that the application is real referring to Fig. 5, Fig. 5
A kind of apparatus structure schematic diagram applied to first server 13 of example offer is provided.
As shown in figure 5, the apparatus may include:
First Service Component 51, for obtaining the first business datum;
First preliminary examination component 52, for obtaining the corresponding first version number of first business datum, if detecting described
First version number and the second edition number that itself is stored be not identical, controls first Service Component 51 and executes based on described first
The operation that business datum is updated second business datum;The second edition number is first server storage
The corresponding version number of second business datum, second business datum be a preceding service data updating during, described first
The business datum for the latest edition that server obtains;
First Service Component 51, is also used to obtain service state, and it is pre- that the service state is sent to described first
Examine component 52;It is that at least one client mentions that the service state, which refers to that the first server is based on first business datum,
For the state of corresponding service service;
The first preliminary examination component 52 is also used to: if the service state is improper service state, not executing will be described
The corresponding first version number of first business datum is stored to the operation of storage equipment, and the storage equipment is stored with second industry
The corresponding second edition number of data of being engaged in, so that belonging at least one second clothes of same server cluster with the first server
Business device is in first business datum obtained from the obtained second edition number of storage equipment with itself corresponding the
In the different situation of one version number, does not execute and based on first business datum itself the second business datum is updated
Operation.
In an alternative embodiment, above-mentioned first preliminary examination component 52 be can be also used for:
If the service state is normal service state, the corresponding first version number of first business datum is deposited in execution
Store up to the operation of the storage equipment so that with the first server belong to same server cluster at least one described the
Two servers in first business datum obtained from the obtained first version number of storage equipment with itself the
In the identical situation of one version number, execution is updated the second business datum that itself is stored based on first business datum
Operation.
In an alternative embodiment, above-mentioned first Service Component 51 is specifically used when executing the step for obtaining service state
In:
Using the first moment as initial time, the service state in set period of time is obtained, first moment is base
At the time of first business datum finishes second service data updating.
In an alternative embodiment, above-mentioned first Service Component 51 is executing the service shape obtained in set period of time
It is specifically used for when the step of state:
It obtains the first server at least one client for described in the set period of time and corresponding service clothes is provided
The average response time of business;
And/or
At least one described client in the set period of time is obtained to take in the corresponding business of first business datum
The lower query rate per second for the first server of business;
And/or
Obtain in the set period of time first server be based on first business datum be it is described at least one
The light exposure of client offer specify information.
In an alternative embodiment, above-mentioned first Service Component 51 be can be also used for:
If the average response time is less than or equal to first threshold, the service state is normal service state;
And/or
If the query rate per second is greater than or equal to second threshold, the service state is normal service state;
And/or
If the light exposure of the specify information is greater than or equal to third threshold value and is less than or equal to the 4th threshold value, the service
State is normal service state.
The embodiment of the present application provides a kind of device applied to second server 14, is that the application is real referring to Fig. 6, Fig. 6
A kind of apparatus structure schematic diagram applied to second server 14 of example offer is provided.
As shown in fig. 6, the apparatus may include:
Second Service Component 61, for obtaining the first business datum;
Second preliminary examination component 62, for obtaining the corresponding first version number of first business datum, if detecting described
First version number and the second edition number that itself is stored be not identical, obtains the version number of the business datum stored in storage equipment;
The second edition number is the corresponding version number of the second business datum of second server storage, second business datum
During a preceding service data updating, the business datum for the latest edition that the second server obtains;
Wherein, the storage equipment is used to store the corresponding version number of business datum of current time latest edition, and institute
The corresponding service state of business datum for stating latest edition is normal service state, and the service state refers to first server base
The state of corresponding service service, the first server are provided in the business datum of the latest edition at least one client
Belong to same server cluster with the second server;
The second preliminary examination component 62, is also used to: if the version number of the storage equipment storage and the first version number
It is not identical, the execution of the second Service Component 61 is not triggered, and second business datum is carried out based on first business datum
The operation of update.
In an alternative embodiment, above-mentioned second preliminary examination component 62 be can be also used for:
If the version number of the storage equipment storage is identical as the first version number, second Service Component 61 is triggered
The operation being updated based on first business datum to second business datum is executed, so that the second server
14 provide corresponding service service based on first business datum at least one described client.
The embodiment of the present application provides a kind of equipment applied to first server 13.Optionally, Fig. 7, which is shown, is applied to
The device hardware structural block diagram of first server 13, referring to Fig. 7, the hardware configuration of the equipment applied to first server 13 can be with
It include: at least one processor 71, at least one communication interface 72, at least one processor 73 and at least one communication bus
74;
In the embodiment of the present application, processor 71, communication interface 72, memory 73, communication bus 74 quantity be at least
One, and processor 71, communication interface 72, memory 73 complete mutual communication by communication bus 74;
Processor 71 may be a central processor CPU or specific integrated circuit ASIC
(Application Specific Integrated Circuit), or be arranged to implement of the invention real
Apply one or more integrated circuits etc. of example;
Memory 73 may include high speed RAM memory, it is also possible to further include nonvolatile memory (non-volatile
Memory) etc., a for example, at least magnetic disk storage;
Wherein, memory 73 is stored with program, the program that processor 71 can call memory 73 to store, and described program is used
In:
Obtain the first business datum and the corresponding first version number of first business datum;
If detecting, the first version number and itself storage second edition number be not identical, is based on first business datum
Second business datum is updated;The second edition number is the second business datum pair of first server storage
The version number answered, second business datum is during a preceding service data updating, the first server is obtained most
The business datum of new version;
Service state is obtained, it is at least that the service state, which refers to that the first server is based on first business datum,
One client provides the state of corresponding service service;
If the service state is improper service state, do not execute the corresponding first version of first business datum
It number stores to the operation of storage equipment, the storage equipment is stored with the corresponding second edition number of second business datum, makes
At least one second server for belonging to same server cluster with the first server is obtained to obtain from the storage equipment
The corresponding different situation of first version number of first business datum that is obtained with itself of the second edition number under, no
Execute the operation being updated based on first business datum to second business datum.
Optionally, the refinement function of described program and extension function can refer to above description.
The embodiment of the present application provides a kind of equipment applied to second server 14.Optionally, Fig. 8, which is shown, is applied to
The device hardware structural block diagram of second server 14, referring to Fig. 8, the hardware configuration of the equipment applied to second server 14 can be with
It include: at least one processor 81, at least one communication interface 82, at least one processor 83 and at least one communication bus
84;
In the embodiment of the present application, processor 81, communication interface 82, memory 83, communication bus 84 quantity be at least
One, and processor 81, communication interface 82, memory 83 complete mutual communication by communication bus 84;
Processor 81 may be a central processor CPU or specific integrated circuit ASIC (Application
Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention
Road etc.;
Memory 83 may include high speed RAM memory, it is also possible to further include nonvolatile memory (non-volatile
Memory) etc., a for example, at least magnetic disk storage;
Wherein, memory 83 is stored with program, the program that processor 81 can call memory 83 to store, and described program is used
In:
Obtain the first business datum and the corresponding first version number of first business datum;
If detecting, the first version number and the second edition number itself stored be not identical, obtains and stores in storage equipment
The corresponding version number of business datum;The second edition number is that the second business datum of second server storage is corresponding
Version number, second business datum are the latest edition that during a preceding service data updating, the second server is obtained
This business datum;
Wherein, the storage equipment is used to store the corresponding version number of business datum of current time latest edition, and institute
The corresponding service state of business datum for stating latest edition is normal service state, and the service state refers to first server base
The state of corresponding service service, the first server are provided in the business datum of the latest edition at least one client
Belong to same server cluster with the second server;
If the version number of the storage equipment storage and the first version number be not identical, do not execute based on first industry
The operation that business data are updated second business datum.
Optionally, the refinement function of described program and extension function can refer to above description.
The embodiment of the present application also provides a kind of readable storage medium storing program for executing applied to first server 13, is stored thereon with calculating
Machine program when the computer program is executed by processor, is realized and is applied to 13 service data updating of first server as above-mentioned
Method.
The embodiment of the present application also provides a kind of readable storage medium storing program for executing applied to second server 14 and is stored thereon with calculating
Machine program when the computer program is executed by processor, is realized and is applied to 14 service data updating of second server as above-mentioned
Method.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight
Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.
For device or system class embodiment, since it is basically similar to the method embodiment, so be described relatively simple, it is related
Place illustrates referring to the part of embodiment of the method.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one
Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation
There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain
Lid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (10)
1. a kind of service data updating method, which is characterized in that be applied to first server, comprising:
Obtain the first business datum and the corresponding first version number of first business datum;
If detecting, the first version number and itself storage second edition number be not identical, based on first business datum to institute
The second business datum is stated to be updated;The second edition number is that the second business datum of first server storage is corresponding
Version number, second business datum are the latest edition that during a preceding service data updating, the first server is obtained
This business datum;
Service state is obtained, it is at least one that the service state, which refers to that the first server is based on first business datum,
The state of client offer corresponding service service;
If the service state is improper service state, does not execute and deposit the corresponding first version number of first business datum
Storage to the operation for storing equipment, the storage equipment is stored with the corresponding second edition number of second business datum, so that with
The first server belongs at least one second server of same server cluster in the institute obtained from the storage equipment
It states in the corresponding different situation of first version number of first business datum that the second edition number is obtained with itself, does not execute
The operation that second business datum is updated based on first business datum.
2. service data updating method according to claim 1, which is characterized in that further include:
If the service state is normal service state, the corresponding first version number of first business datum is stored to described
Equipment is stored, so that belonging at least one described second server of same server cluster from institute with the first server
The first version number for stating first business datum that the first version number that storage equipment obtains is obtained with itself is identical
In the case of, the second business datum that itself is stored is updated based on first business datum.
3. service data updating method according to claim 1 or claim 2, which is characterized in that the acquisition service state includes:
Using the first moment as initial time, the service state in set period of time is obtained, first moment is based on institute
At the time of stating the first business datum and finished to second service data updating.
4. service data updating method according to claim 3, which is characterized in that described in the acquisition set period of time
Service state includes:
It obtains the first server at least one client for described in the set period of time and corresponding service service is provided
Average response time;
And/or
At least one client described in obtaining in the set period of time is under the corresponding business service of first business datum
For the query rate per second of the first server;
And/or
Obtaining the first server in the set period of time and being based on first business datum is at least one described client
End provides the light exposure of specify information.
5. service data updating method according to claim 4, which is characterized in that further include:
If the average response time is less than or equal to first threshold, the service state is normal service state;
And/or
If the query rate per second is greater than or equal to second threshold, the service state is normal service state;
And/or
If the light exposure of the specify information is greater than or equal to third threshold value and is less than or equal to the 4th threshold value, the service state
For normal service state.
6. a kind of service data updating method, which is characterized in that be applied to second server, comprising:
Obtain the first business datum and the corresponding first version number of first business datum;
If detecting, the first version number and the second edition number itself stored be not identical, obtains the industry stored in storage equipment
The corresponding version number of data of being engaged in;The second edition number is the corresponding version of the second business datum of second server storage
Number, second business datum is the latest edition that during a preceding service data updating, the second server is obtained
Business datum;
Wherein, the storage equipment is used to store the corresponding version number of business datum of current time latest edition, and it is described most
The corresponding service state of the business datum of new version is normal service state, and the service state refers to that first server is based on institute
It states the business datum of latest edition and provides the state of corresponding service service, the first server and institute at least one client
It states second server and belongs to same server cluster;
If the version number of the storage equipment storage and the first version number be not identical, do not execute based on the first business number
According to the operation being updated to second business datum.
7. service data updating method according to claim 6, which is characterized in that further include:
If the version number of the storage equipment storage is identical as the first version number, based on first business datum to described
Second business datum is updated, so that it is at least one described visitor that the second server, which is based on first business datum,
Family end provides corresponding service service.
8. a kind of first server characterized by comprising
First Service Component, for obtaining the first business datum;
First preliminary examination component, for obtaining the corresponding first version number of first business datum, if detecting the first edition
This number not identical as the second edition number of itself storage, controls first Service Component and executes based on first business datum
The operation that second business datum is updated;The second edition number is the second business of first server storage
The corresponding version number of data, second business datum is during a preceding service data updating, the first server is obtained
The business datum of the latest edition arrived;
First Service Component is also used to obtain service state, and the service state is sent to the first preliminary examination group
Part, the service state refer to that the first server is based on first business datum and provides accordingly at least one client
The state of business service;
The first preliminary examination component is also used to: if the service state is improper service state, not being executed first industry
The corresponding first version number of business data is stored to the operation of storage equipment, and the storage equipment is stored with second business datum
The corresponding second edition number, so that at least one second server for belonging to same server cluster with the first server exists
The corresponding first version of first business datum obtained from the obtained second edition number of storage equipment with itself
In number different situation, the operation being updated based on first business datum to second business datum is not executed.
9. a kind of second server characterized by comprising
Second Service Component, for obtaining the first business datum;
Second preliminary examination component, for obtaining the corresponding first version number of first business datum, if detecting the first edition
This number not identical as the second edition number of itself storage, obtains the version number of the business datum stored in storage equipment;Described
Two version numbers are the corresponding version number of the second business datum of second server storage, and second business datum is previous
During secondary service data updating, the business datum for the latest edition that the second server obtains;
Wherein, the storage equipment is used to store the corresponding version number of business datum of current time latest edition, and it is described most
The corresponding service state of the business datum of new version is normal service state, and the service state refers to that first server is based on institute
It states the business datum of latest edition and provides the state of corresponding service service, the first server and institute at least one client
It states second server and belongs to same server cluster;
The second preliminary examination component, is also used to: if the version number of the storage equipment storage and the first version number be not identical,
Second Service Component is not triggered executes the behaviour being updated based on first business datum to second business datum
Make.
10. a kind of server cluster characterized by comprising
At least one first server described in claim 1;
At least one second server as claimed in claim 6;
And storage equipment described in claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910549825.1A CN110245194A (en) | 2019-06-24 | 2019-06-24 | Service data updating method, server and server cluster |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910549825.1A CN110245194A (en) | 2019-06-24 | 2019-06-24 | Service data updating method, server and server cluster |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110245194A true CN110245194A (en) | 2019-09-17 |
Family
ID=67889029
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910549825.1A Pending CN110245194A (en) | 2019-06-24 | 2019-06-24 | Service data updating method, server and server cluster |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110245194A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111901389A (en) * | 2020-07-03 | 2020-11-06 | 北京达佳互联信息技术有限公司 | Data updating method, device, server and storage medium |
CN113032036A (en) * | 2021-02-03 | 2021-06-25 | 腾讯科技(深圳)有限公司 | Service data processing method, device, system, computer equipment and storage medium |
CN113282602A (en) * | 2021-06-18 | 2021-08-20 | 北京奇艺世纪科技有限公司 | Service request method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104580085A (en) * | 2013-10-17 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Business data updating method, system, client side and server |
CN105607936A (en) * | 2015-12-25 | 2016-05-25 | 北京奇虎科技有限公司 | Server version updating method and device |
CN107153644A (en) * | 2016-03-02 | 2017-09-12 | 阿里巴巴集团控股有限公司 | A kind of method of data synchronization and device |
-
2019
- 2019-06-24 CN CN201910549825.1A patent/CN110245194A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104580085A (en) * | 2013-10-17 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Business data updating method, system, client side and server |
CN105607936A (en) * | 2015-12-25 | 2016-05-25 | 北京奇虎科技有限公司 | Server version updating method and device |
CN107153644A (en) * | 2016-03-02 | 2017-09-12 | 阿里巴巴集团控股有限公司 | A kind of method of data synchronization and device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111901389A (en) * | 2020-07-03 | 2020-11-06 | 北京达佳互联信息技术有限公司 | Data updating method, device, server and storage medium |
CN111901389B (en) * | 2020-07-03 | 2023-07-04 | 北京达佳互联信息技术有限公司 | Data updating method, device, server and storage medium |
CN113032036A (en) * | 2021-02-03 | 2021-06-25 | 腾讯科技(深圳)有限公司 | Service data processing method, device, system, computer equipment and storage medium |
CN113282602A (en) * | 2021-06-18 | 2021-08-20 | 北京奇艺世纪科技有限公司 | Service request method and device |
CN113282602B (en) * | 2021-06-18 | 2023-10-27 | 北京奇艺世纪科技有限公司 | Service request method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110245194A (en) | Service data updating method, server and server cluster | |
US20070204024A1 (en) | Mapping managing devices to managed devices | |
CN102104635A (en) | Method and device for updating Internet protocol (IP) address base | |
EP1547000A1 (en) | Method and apparatus for providing price updates | |
CN110210898B (en) | Advertisement pushing method, device and equipment based on user behaviors | |
CN105100886A (en) | Publish control method and system of network media information, device and server | |
CN109901798A (en) | Date storage method and device | |
CN112230847B (en) | Method, system, terminal and storage medium for monitoring K8s storage volume | |
CN108415998A (en) | Using dependence update method, terminal, equipment and storage medium | |
CN111158837B (en) | Bank software function interface generation method and device | |
CN108153758A (en) | A kind of data accumulation method, apparatus and electronic equipment | |
CN107391763A (en) | Information display method and device | |
CN111416883B (en) | Address query method, device, terminal and computer readable storage medium | |
CN113194339A (en) | Live list generation method and device, electronic equipment and readable storage medium | |
CN108228598B (en) | Media information sorting method, server and system | |
CN111311310A (en) | Advertisement order pushing method and device, storage medium and electronic device | |
CN109905260A (en) | Method, management equipment and the service processing equipment of device configuration | |
CN111737209A (en) | File cleaning method and related equipment thereof | |
CN109150593B (en) | Method and device for managing resources in cloud data system | |
US9652766B1 (en) | Managing data stored in memory locations having size limitations | |
US20040215511A1 (en) | System and method for filtering non-invasive data collection | |
CN108595623A (en) | A kind of game video method for pushing, device and computer storage media | |
CN116048331A (en) | Menu ordering method and device, electronic equipment and storage medium | |
CN109976826A (en) | A kind of application software processing method, mobile terminal and Cloud Server | |
CN111400327B (en) | Data synchronization method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190917 |
|
RJ01 | Rejection of invention patent application after publication |