Summary of the invention
The embodiment of the present disclosure provides a kind of data management and method for subscribing, device, system, electronic equipment and computer-readable
Storage medium.
In a first aspect, providing a kind of data managing method in the embodiment of the present disclosure.
Specifically, the data managing method, comprising:
In response to subscribing to the altering event of data, determines and subscribe to the ordering system for subscribing to data;
Update the latest edition number that data are subscribed to described in the corresponding versions of data corresponding relationship of the ordering system;Its
In, it is currently stored in the versions of data corresponding relationship at least associated storage latest edition number and the ordering system
The subscription data practical version number;
When the latest edition number and practical version number are inconsistent, Xiang Suoshu ordering system pushes the subscription data
Latest edition number.
Further, the data managing method further include:
Receive the registration request of the ordering system;Wherein, the registration request includes at least ordered by the ordering system
The mark for the subscription data read;
The latest edition number for subscribing to data is determined according to the mark for subscribing to data;
The latest edition number for subscribing to data is pushed to the ordering system.
Further, the method also includes:
It is in response to the ordering system for the full dose request of data for subscribing to data, the latest edition number is corresponding
The subscription data be sent to the ordering system.
Further, the data managing method further include:
The incremental data for subscribing to data is requested in response to the ordering system, the latest edition number is corresponding
The modification informations of the subscription data be sent to the ordering system;Wherein, the modification information includes at least described newest
In the corresponding subscription data of the version number subscription data corresponding compared to the practical version number change
Hold information.
Further, in the latest edition number and the inconsistent practical version number, the push of Xiang Suoshu ordering system
Before the latest edition number for subscribing to data, the data managing method further include:
In response to timed events, and/or in response to the update event of the versions of data corresponding relationship, determine the data
Whether latest edition number described in version corresponding relationship and the practical version number are consistent.
Second aspect provides a kind of data subscription method in the embodiment of the present disclosure.
Specifically, the data subscription method, comprising:
Receive the latest edition number of the subscription data of service system push;
When the practical version number of the latest edition number and the subscription data being locally stored is inconsistent, it is to service
System sends the incremental re-quest for subscribing to data;
Receive the corresponding modification information for subscribing to data of the latest edition number that the service system is sent;Its
In, the modification information includes at least the corresponding subscription data of the latest edition number compared to the practical version number pair
The content information that the subscription data answered change;
The subscription data being locally stored are updated according to the modification information.
Further, the data subscription method, further includes:
Registration request is sent to the service system;Wherein, the registration request includes at least the subscription to be subscribed to
The mark of data;
Receive the latest edition number for the subscription data that the service system returns;
The corresponding full dose request of data for subscribing to data of the latest edition number is sent to the service system;
Receive the corresponding subscription data of the latest edition number that the service system returns, and by the subscription
According to being stored in the local.
The third aspect provides a kind of data administrator in the embodiment of the present disclosure.
Specifically, the data administrator, comprising:
First determining module is configured to respond to subscribe to the altering event of data, determines and subscribes to the subscription data
Ordering system;
First update module is configured as updating subscription described in the corresponding versions of data corresponding relationship of the ordering system
The latest edition number of data;Wherein, the versions of data corresponding relationship at least the associated storage latest edition number and institute
State the practical version number of the subscription data currently stored on ordering system;
First pushing module is configured as when the latest edition number and practical version number are inconsistent, to the subscription
System pushes the latest edition number for subscribing to data.
Further, the data administrator further include:
First receiving module is configured as receiving the registration request of the ordering system;Wherein, the registration request is at least
Mark including subscription data ordered by the ordering system;
Second determining module is configured as determining the latest edition for subscribing to data according to the mark for subscribing to data
Number;
Second pushing module is configured as pushing the latest edition number for subscribing to data to the ordering system.
Further, the data administrator further include:
First sending module is configured to respond to the ordering system and the full dose data for subscribing to data is asked
It asks, the corresponding subscription data of the latest edition number is sent to the ordering system.
Further, the data administrator further include:
Second sending module is configured to respond to the ordering system and the incremental data for subscribing to data is asked
It asks, the corresponding modification information for subscribing to data of the latest edition number is sent to the ordering system;Wherein, the change
It is corresponding compared to the practical version number described that more information includes at least the corresponding subscription data of the latest edition number
Subscribe to the content information that data change.
Further, before first pushing module, the data administrator further include:
Third determining module is configured to respond to timed events, and/or in response to the versions of data corresponding relationship
Update event determines whether latest edition number described in the versions of data corresponding relationship and the practical version number are consistent.
The function can also execute corresponding software realization by hardware realization by hardware.The hardware or
Software includes one or more modules corresponding with above-mentioned function.
It include memory and processor, the memory in the structure of data administrator in a possible design
The computer instruction of data managing method in above-mentioned first aspect is executed for storing one or more support data administrator,
The processor is configured to for executing the computer instruction stored in the memory.The data administrator can be with
Including communication interface, for data administrator and other equipment or communication.
Fourth aspect provides a kind of data subscription device in the embodiment of the present disclosure.
Specifically, the data subscription device, comprising:
Second receiving module is configured as receiving the latest edition number of the subscription data of service system push;
Third sending module is configured as the practical version in the latest edition number and the subscription data being locally stored
This number it is inconsistent when, to service system send it is described subscribe to data incremental re-quest;
Third receiving module, is configured as receiving that the latest edition number that the service system is sent is corresponding described orders
Read the modification information of data;Wherein, the modification information includes at least the corresponding subscription data phase of the latest edition number
The content information subscribing to data and changing corresponding compared with the practical version number;
Second update module is configured as updating the subscription data being locally stored according to the modification information.
Further, the data subscription device further include:
4th sending module is configured as sending registration request to the service system;Wherein, the registration request is at least
Mark including the subscription data to be subscribed to;
4th receiving module is configured as receiving the latest edition number for the subscription data that the service system returns;
5th sending module is configured as sending the corresponding subscription of the latest edition number to the service system
According to full dose request of data;
5th receiving module, is configured as receiving that the latest edition number that the service system returns is corresponding described orders
Data are read, and the subscription data are stored in the local.
The function can also execute corresponding software realization by hardware realization by hardware.The hardware or
Software includes one or more modules corresponding with above-mentioned function.
It include memory and processor, the memory in the structure of data subscription device in a possible design
The computer instruction of data subscription method in above-mentioned second aspect is executed for storing one or more support data subscription device,
The processor is configured to for executing the computer instruction stored in the memory.The data subscription device can be with
Including communication interface, for data subscription device and other equipment or communication.
In terms of 5th, a kind of data management system is provided in the embodiment of the present disclosure.
Specifically, the data management system, comprising:
Service system, for executing data managing method described in first aspect;
Multiple ordering systems.
In terms of 6th, a kind of data management system is provided in the embodiment of the present disclosure.
Specifically, the data management system, comprising:
Service system;
Multiple ordering systems, for executing data subscription method described in second aspect.
7th aspect, the embodiment of the present disclosure provide a kind of electronic equipment, including memory and processor;Wherein, described
Memory is for storing one or more computer instruction, wherein one or more computer instruction is by the processor
It executes to realize method and step described in first aspect or second aspect.
Eighth aspect, the embodiment of the present disclosure provide a kind of computer readable storage medium, for storing data management dress
Set or data subscription device used in computer instruction, it includes for executing in above-mentioned first aspect data managing method or the
Computer instruction involved in data subscription method in two aspects.
The technical solution that the embodiment of the present disclosure provides can include the following benefits:
Service system subscribes to data for storage and maintenance in the embodiment of the present disclosure, when subscription data change, clothes
Business system determines the ordering system for having subscribed the subscription data, and updates the corresponding versions of data corresponding relationship of each ordering system
In the practical version number of the subscription data in the latest edition number and ordering system in service system, and determining versions of data
When latest edition number and practical version number in corresponding relationship are inconsistent, latest edition number is pushed to the ordering system, to order
The system of readding can request newest subscription data from service system according to latest edition number.The embodiment of the present disclosure can pass through subscription
The mode of push keeps the consistency of common data on service system and ordering system, and ordering system can be allowed specific without perception
Data and data manipulation, so that it may conveniently by common data required for interface polls, can support that ordering system is fast
Quick access enters the reading of common data, while being managed collectively common data, and can order the change real-time informing of common data
The system of readding is updated, and guarantees that changed data can be consistent on all ordering systems.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Specific embodiment
Hereinafter, the illustrative embodiments of the disclosure will be described in detail with reference to the attached drawings, so that those skilled in the art can
Easily realize them.In addition, for the sake of clarity, the portion unrelated with description illustrative embodiments is omitted in the accompanying drawings
Point.
In the disclosure, it should be appreciated that the term of " comprising " or " having " etc. is intended to refer to disclosed in this specification
Feature, number, step, behavior, the presence of component, part or combinations thereof, and be not intended to exclude other one or more features,
A possibility that number, step, behavior, component, part or combinations thereof exist or are added.
It also should be noted that in the absence of conflict, the feature in embodiment and embodiment in the disclosure
It can be combined with each other.The disclosure is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the flow chart of the data managing method according to one embodiment of the disclosure.As shown in Figure 1, the data
Management method includes the following steps S101-S103:
In step s101, it in response to the altering event of subscription data, determines and reads the corresponding subscription system of the subscription data
System;
In step s 102, subscription data described in the corresponding versions of data corresponding relationship of the ordering system is updated most
New version number;Wherein, the versions of data corresponding relationship at least associated storage latest edition number and subscription system
The practical version number of the currently stored subscription data on system;
In step s 103, when the latest edition number and practical version number are inconsistent, the push of Xiang Suoshu ordering system
The latest edition number for subscribing to data.
In the present embodiment, subscribing to data can be the data being stored in the service systems such as server or database, should
Subscribing to data can be the common data being used in conjunction with by multiple ordering systems.Service system can carry out pipe to the subscription data
Reason and maintenance.Multiple ordering systems can subscribe to the subscription data, and the copy of the subscription data is locally stored.Subscribing to data
When changing, service system first determines the ordering system for having subscribed the subscription data, namely determines and deposit on which ordering system
The copy of the subscription data is contained, and needs synchronized update.Version number can be used for recording the change history of the subscription data,
Subscribe to the every change of data once, latest edition number will be updated once.The change for subscribing to data may include adding for data
The operation such as add, delete, modifying.Service system updates after the one or more ordering systems for subscribing to the subscription data have been determined
Latest edition number in the corresponding versions of data corresponding relationship of the one or more ordering system.In versions of data corresponding relationship extremely
Less include latest edition number of the subscription data in service system ordered by ordering system and is stored in ordering system
Practical version number.For example, versions of data corresponding relationship subscribes to the I P of the marks of data, ordering system for associated storage
Location, the latest edition number for subscribing to data and practical version number etc..
In the present embodiment, practical version number corresponds to the true version for the subscription data being locally stored in ordering system, newest
Version number and practical version number may be the same or different.In latest edition number and practical version number's difference, service system
The latest edition number of the subscription data is pushed, to the ordering system for having subscribed the subscription data so that ordering system is receiving this
After PUSH message, when determining the subscription data being locally stored is not latest edition, to ordering for server request latest edition
Data are read, to keep the subscription data in service system consistent with subscription data that ordering system is locally stored.
Service system subscribes to data for storage and maintenance in the embodiment of the present disclosure, when subscription data change, clothes
Business system determines the ordering system for having subscribed the subscription data, and updates the corresponding versions of data corresponding relationship of each ordering system
In the practical version number of the subscription data in the latest edition number and ordering system in service system, and determining versions of data
When latest edition number and practical version number in corresponding relationship are inconsistent, latest edition number is pushed to the ordering system, to order
The system of readding can request newest subscription data from service system according to latest edition number.The embodiment of the present disclosure can pass through subscription
The mode of push keeps the consistency of common data on service system and ordering system, and ordering system can be allowed specific without perception
Data and data manipulation, so that it may conveniently by common data required for interface polls, can support that ordering system is fast
Quick access enters the reading of common data, while being managed collectively common data, and can order the change real-time informing of common data
The system of readding is updated, and guarantees that changed data can be consistent on all ordering systems.
In an optional implementation of the present embodiment, as shown in Fig. 2, the method further comprises following steps
S201-S203:
In step s 201, the registration request of the ordering system is received;Wherein, the registration request includes at least described
The mark of the subscription data ordered by ordering system;
In step S202, the latest edition number for subscribing to data is determined according to the mark for subscribing to data;
In step S203, Xiang Suoshu ordering system pushes the latest edition number for subscribing to data.
In the optional implementation, ordering system can be sent when initially subscribing to the subscription data to service system
Registration request at least will include the mark of the subscription data to be subscribed in registration request.Service system receives ordering system
Registration request after, the latest edition number of the subscription data in service system is determined according to the mark for subscribing to data, and will be newest
Version number is pushed to ordering system.In this way, can permit on multiple ordering system subscription service systems same orders
Data are read, and one of data between service system and each ordering system can be kept by subscribing to the latest edition number of data
Cause property.
In an optional implementation of the present embodiment, the method further comprises following steps:
It is in response to the ordering system for the full dose request of data for subscribing to data, the latest edition number is corresponding
The subscription data be sent to the ordering system.
In the optional implementation, latest edition number of the ordering system in the subscription data for receiving service system push
Afterwards, it can be compared with the practical version number of local subscription data.When initial, since there are no deposit on ordering system
Data are subscribed in storage, therefore the practical version number of its subscription data being locally stored can be a default value, if version number is 0.?
After the latest edition number for receiving the subscription data of service system push, the newest version number and practical version number are inconsistent,
And practical version number is default value, therefore ordering system can send the full dose request of data of the subscription data to service system,
Namely on-demand system all sends the latest edition of the subscription data to ordering system.Service system is receiving this entirely
After measuring request of data, the latest edition for subscribing to data is sent to ordering system, ordering system can store in local cache
The subscription data.The practical version number for the subscription data being locally stored can also be updated to the latest edition number by ordering system.
Practical version number in the corresponding versions of data corresponding relationship of the ordering system can also be updated to latest edition by service system
Number, so that the latest edition number of the subscription data is consistent with practical version number.
In an optional implementation of the present embodiment, the method further comprises following steps:
The incremental data for subscribing to data is requested in response to the ordering system, the latest edition number is corresponding
The modification informations of the subscription data be sent to the ordering system;Wherein, the modification information includes at least described newest
In the corresponding subscription data of the version number subscription data corresponding compared to the practical version number change
Hold information.
In the optional implementation, latest edition number of the ordering system in the subscription data for receiving service system push
Afterwards, it can be compared with the practical version number for the subscription data being locally stored.If the newest version number and practical version number
It is inconsistent, and practical version number is not default value, then ordering system can send the incremental number of the subscription data to service system
The newest partial data changed of the subscription data is sent to ordering system according to request namely on-demand system.Service
The modification information for subscribing to data is sent to ordering system, modification information is at least after receiving incremental data request by system
Including subscribing to the newest content information changed of data, such as the position of the newest partial data being modified in service system
The content etc. after content and change before setting, changing.Ordering system can be right after receiving the modification information for subscribing to data
The subscription data being locally stored are updated, and update the practical version number of local subscription data.Service system can also should
Practical version number in the corresponding versions of data corresponding relationship of ordering system is updated to latest edition number, so that the subscription data
Latest edition number is consistent with practical version number.
In an optional implementation of the present embodiment, the step S103, i.e., in the latest edition number and reality
When version number is inconsistent, Xiang Suoshu ordering system push it is described subscribe to data latest edition number the step of before, the method
Further comprise following steps:
In response to timed events, and/or in response to the update event of the versions of data corresponding relationship, determine the data
Whether latest edition number described in version corresponding relationship and the practical version number are consistent.
In some embodiments, service system can periodically check the corresponding versions of data corresponding relationship of each ordering system
Whether the middle latest edition number for subscribing to data is consistent with practical version number, if it is inconsistent, to the versions of data corresponding relationship
The latest edition number of data is subscribed in corresponding ordering system push.In further embodiments, service system can also be in data
After version corresponding relationship is updated, is checked in the corresponding versions of data corresponding relationship of each ordering system in time and subscribe to data most
Whether new version number is consistent with practical version number, if inconsistent, pushes away to the corresponding ordering system of versions of data corresponding relationship
Send the latest edition number for subscribing to data.Which kind of mode specifically selected, can according to the actual situation depending on, herein with no restrictions.
The embodiment of the present disclosure additionally provides a kind of data management system, comprising:
Service system, for executing above-mentioned data managing method;
Multiple ordering systems.
The detail of the present embodiment can be found in the above-mentioned description to data managing method, and details are not described herein.
Fig. 3 shows the flow chart of the data subscription method according to another embodiment of the disclosure.As shown in figure 3, the number
Include the following steps S301-S304 according to method for subscribing:
In step S301, the latest edition number of the subscription data of service system push is received;
In step s 302, different in the practical version number of the latest edition number and the subscription data being locally stored
When cause, the incremental re-quest for subscribing to data is sent to service system;
In step S303, the corresponding subscription data of the latest edition number that the service system is sent are received
Modification information;Wherein, the modification information includes at least the corresponding subscription data of the latest edition number compared to described
The corresponding content information subscribing to data and changing of practical version number;
In step s 304, the subscription data being locally stored are updated according to the modification information.
In the present embodiment, ordering system receive service system push subscription data latest edition number after,
When determining that the version of the subscription data in the subscription versions of data and service system being locally stored is inconsistent, sent to service system
Subscribe to the incremental re-quest of data.It is, of course, understood that the process is in the feelings for subscribing to the subscription data to service system
Carried out under condition namely ordering system on have existed subscription data, and the practical version number for subscribing to data and non-default value be not (
When subscribing to subscription data from service system, the version number for subscribing to data can be set to default value) in the case where carry out.It is connecing
After the modification information for receiving the subscription data of service system return, the subscription data being locally stored are updated using the modification information.
Service system related to the present embodiment can be found in the responding process and other details of incremental re-quest above-mentioned
To the associated description of data managing method, details are not described herein.
In an optional implementation of the present embodiment, as shown in figure 4, the method further comprises following steps
S401-S404:
In step S401, Xiang Suoshu service system sends registration request;Wherein, the registration request is included at least and to be ordered
The mark for the subscription data read;
In step S402, the latest edition number for the subscription data that the service system returns is received;
In step S403, Xiang Suoshu service system sends the corresponding full dose for subscribing to data of the latest edition number
Request of data;
In step s 404, the corresponding subscription data of the latest edition number that the service system returns are received,
And the subscription data are stored in local.
In the optional implementation, ordering system can send registration request to service system, to obtain from service system
Subscription data are taken, and are obtained and the synchronized update subscription data in real time.Ordering system is in the subscription for receiving service system transmission
After data latest edition number, local not stored subscription data are determined, namely initially subscribe to the subscription data (subscription can be passed through
According to practical version number whether be default value determine), the subscription data for obtaining newest version are sent to service system at this time
The latest edition for subscribing to data can be returned to subscription system based on the full dose request of data by full dose request of data, service system
The latest edition for subscribing to data can be stored in local, such as local cache by system, ordering system.Ordering system can also be more
The practical version number for the subscription data being newly locally stored.
In one embodiment, ordering system can be using client, the application program etc. for subscribing to data, and difference subscribes to system
System can be located at different physical locations, the different application journey that can also be located on same physical location, such as same equipment
Sequence.Ordering system can send registration request to service system in initial start, will subscribe to the latest edition storage of data
It, can be by the subscription data dump in local cache after ordering system is closed in local cache.This mode is only subscribing to system
System has certain system call overhead when starting each time, and after start completion, directly access local cache, network pass
Defeated expense is 0.
In another embodiment, ordering system in specific implementation, can pass through the data subscription side of calling jar packet offer
Method accesses the subscription data of local cache, namely obtains and subscribe to data, and whole process can be shielded completely to ordering system and be subscribed to
The processes such as the load of data, ordering system only need to perceive the method in jar.
One embodiment of the disclosure additionally provides a kind of data management system, comprising:
Service system;
Multiple ordering systems, for executing above-mentioned data subscription method.
The detail of the present embodiment can be found in the above-mentioned description to data subscription method, and details are not described herein.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.
Fig. 5 shows the structural block diagram of the data administrator according to one embodiment of the disclosure, which can be by soft
Part, hardware or both are implemented in combination with as some or all of of electronic equipment.As shown in figure 5, the data management dress
It sets and includes:
First determining module 501 is configured to respond to subscribe to the altering event of data, and the subscription data pair are read in determination
The ordering system answered;
First update module 502 is configured as updating described in the corresponding versions of data corresponding relationship of the ordering system
Subscribe to the latest edition number of data;Wherein, the versions of data corresponding relationship at least associated storage latest edition number with
And on the ordering system currently stored subscription data practical version number;
First pushing module 503 is configured as when the latest edition number and practical version number are inconsistent, and Xiang Suoshu is ordered
The system of readding pushes the latest edition number for subscribing to data.
In the present embodiment, subscribing to data can be the data being stored in the service systems such as server or database, should
Subscribing to data can be the common data being used in conjunction with by multiple ordering systems.Service system can carry out pipe to the subscription data
Reason and maintenance.Multiple ordering systems can subscribe to the subscription data, and the copy of the subscription data is locally stored.Subscribing to data
When changing, service system first determines the ordering system for having subscribed the subscription data, namely determines and deposit on which ordering system
The copy of the subscription data is contained, and needs synchronized update.Version number can be used for recording the change history of the subscription data,
Subscribe to the every change of data once, latest edition number will be updated once.The change for subscribing to data may include adding for data
The operation such as add, delete, modifying.Service system updates after the one or more ordering systems for subscribing to the subscription data have been determined
Latest edition number in the corresponding versions of data corresponding relationship of the one or more ordering system.In versions of data corresponding relationship extremely
Less include latest edition number of the subscription data in service system ordered by ordering system and is stored in ordering system
Practical version number.For example, versions of data corresponding relationship subscribes to the I P of the marks of data, ordering system for associated storage
Location, the latest edition number for subscribing to data and practical version number etc..
In the present embodiment, practical version number corresponds to the true version for the subscription data being locally stored in ordering system, newest
Version number and practical version number may be the same or different.In latest edition number and practical version number's difference, service system
The latest edition number of the subscription data is pushed, to the ordering system for having subscribed the subscription data so that ordering system is receiving this
After PUSH message, when determining the subscription data being locally stored is not latest edition, to ordering for server request latest edition
Data are read, to keep the subscription data in service system consistent with subscription data that ordering system is locally stored.
Service system subscribes to data for storage and maintenance in the embodiment of the present disclosure, when subscription data change, clothes
Business system determines the ordering system for having subscribed the subscription data, and updates the corresponding versions of data corresponding relationship of each ordering system
In the practical version number of the subscription data in the latest edition number and ordering system in service system, and determining versions of data
When latest edition number and practical version number in corresponding relationship are inconsistent, latest edition number is pushed to the ordering system, to order
The system of readding can request newest subscription data from service system according to latest edition number.The embodiment of the present disclosure can pass through subscription
The mode of push keeps the consistency of common data on service system and ordering system, and ordering system can be allowed specific without perception
Data and data manipulation, so that it may conveniently by common data required for interface polls, can support that ordering system is fast
Quick access enters the reading of common data, while being managed collectively common data, and can order the change real-time informing of common data
The system of readding is updated, and guarantees that changed data can be consistent on all ordering systems.
In an optional implementation of the present embodiment, as shown in fig. 6, the data administrator further include:
First receiving module 601 is configured as receiving the registration request of the ordering system;Wherein, the registration request
Including at least the mark of subscription data ordered by the ordering system;
Second determining module 602 is configured as determining the newest of the subscription data according to the mark for subscribing to data
Version number;
Second pushing module 603 is configured as pushing the latest edition number for subscribing to data to the ordering system.
In the optional implementation, ordering system can be sent when initially subscribing to the subscription data to service system
Registration request at least will include the mark of the subscription data to be subscribed in registration request.Service system receives ordering system
Registration request after, the latest edition number of the subscription data in service system is determined according to the mark for subscribing to data, and will be newest
Version number is pushed to ordering system.In this way, can permit on multiple ordering system subscription service systems same orders
Data are read, and one of data between service system and each ordering system can be kept by subscribing to the latest edition number of data
Cause property.
In an optional implementation of the present embodiment, the data administrator further include:
First sending module is configured to respond to the ordering system and the full dose data for subscribing to data is asked
It asks, the corresponding subscription data of the latest edition number is sent to the ordering system.
In the optional implementation, latest edition number of the ordering system in the subscription data for receiving service system push
Afterwards, it can be compared with the practical version number of local subscription data.When initial, since there are no deposit on ordering system
Data are subscribed in storage, therefore the practical version number of its subscription data being locally stored can be a default value, if version number is 0.?
After the latest edition number for receiving the subscription data of service system push, the newest version number and practical version number are inconsistent,
And practical version number is default value, therefore ordering system can send the full dose request of data of the subscription data to service system,
Namely on-demand system all sends the latest edition of the subscription data to ordering system.Service system is receiving this entirely
After measuring request of data, the latest edition for subscribing to data is sent to ordering system, ordering system can store in local cache
The subscription data.The practical version number for the subscription data being locally stored can also be updated to the latest edition number by ordering system.
Practical version number in the corresponding versions of data corresponding relationship of the ordering system can also be updated to latest edition by service system
Number, so that the latest edition number of the subscription data is consistent with practical version number.
In an optional implementation of the present embodiment, the data administrator further include:
Second sending module is configured to respond to the ordering system and the incremental data for subscribing to data is asked
It asks, the corresponding modification information for subscribing to data of the latest edition number is sent to the ordering system;Wherein, the change
It is corresponding compared to the practical version number described that more information includes at least the corresponding subscription data of the latest edition number
Subscribe to the content information that data change.
In the optional implementation, latest edition number of the ordering system in the subscription data for receiving service system push
Afterwards, it can be compared with the practical version number for the subscription data being locally stored.If the newest version number and practical version number
It is inconsistent, and practical version number is not default value, then ordering system can send the incremental number of the subscription data to service system
The newest partial data changed of the subscription data is sent to ordering system according to request namely on-demand system.Service
The modification information for subscribing to data is sent to ordering system, modification information is at least after receiving incremental data request by system
Including subscribing to the newest content information changed of data, such as the position of the newest partial data being modified in service system
The content etc. after content and change before setting, changing.Ordering system can be right after receiving the modification information for subscribing to data
The subscription data being locally stored are updated, and update the practical version number of local subscription data.Service system can also should
Practical version number in the corresponding versions of data corresponding relationship of ordering system is updated to latest edition number, so that the subscription data
Latest edition number is consistent with practical version number.
In an optional implementation of the present embodiment, before first pushing module, the data management dress
It sets further include:
Third determining module is configured to respond to timed events, and/or in response to the versions of data corresponding relationship
Update event determines whether latest edition number described in the versions of data corresponding relationship and the practical version number are consistent.
In some embodiments, service system can periodically check the corresponding versions of data corresponding relationship of each ordering system
Whether the middle latest edition number for subscribing to data is consistent with practical version number, if it is inconsistent, to the versions of data corresponding relationship
The latest edition number of data is subscribed in corresponding ordering system push.In further embodiments, service system can also be in data
After version corresponding relationship is updated, is checked in the corresponding versions of data corresponding relationship of each ordering system in time and subscribe to data most
Whether new version number is consistent with practical version number, if inconsistent, pushes away to the corresponding ordering system of versions of data corresponding relationship
Send the latest edition number for subscribing to data.Which kind of mode specifically selected, can according to the actual situation depending on, herein with no restrictions.
Fig. 7 shows the structural block diagram of the data subscription device according to one embodiment of the disclosure, which can be by soft
Part, hardware or both are implemented in combination with as some or all of of electronic equipment.As shown in fig. 7, the data subscription dress
It sets and includes:
Second receiving module 701 is configured as receiving the latest edition number of the subscription data of service system push;
Third sending module 702 is configured as the reality in the latest edition number and the subscription data being locally stored
When border version number is inconsistent, the incremental re-quest for subscribing to data is sent to service system;
Third receiving module 703 is configured as receiving the corresponding institute of the latest edition number that the service system is sent
State the modification information for subscribing to data;Wherein, the modification information includes at least the corresponding subscription of the latest edition number
According to the content information subscribing to data and changing corresponding compared to the practical version number;
Second update module 704 is configured as updating the subscription data being locally stored according to the modification information.
In the present embodiment, ordering system receive service system push subscription data latest edition number after,
When determining that the version of the subscription data in the subscription versions of data and service system being locally stored is inconsistent, sent to service system
Subscribe to the incremental re-quest of data.It is, of course, understood that the process is in the feelings for subscribing to the subscription data to service system
Carried out under condition namely ordering system on have existed subscription data, and the practical version number for subscribing to data and non-default value be not (
When subscribing to subscription data from service system, the version number for subscribing to data can be set to default value) in the case where carry out.It is connecing
After the modification information for receiving the subscription data of service system return, the subscription data being locally stored are updated using the modification information.
Service system related to the present embodiment can be found in the responding process and other details of incremental re-quest above-mentioned
To the associated description of data managing method, details are not described herein.
In an optional implementation of the present embodiment, as shown in figure 8, the data subscription device further include:
4th sending module 801 is configured as sending registration request to the service system;Wherein, the registration request
Including at least the mark of the subscription data to be subscribed to;
4th receiving module 802 is configured as receiving the latest edition for the subscription data that the service system returns
Number;
5th sending module 803, is configured as sending that the latest edition number is corresponding described orders to the service system
Read the full dose request of data of data;
5th receiving module 804 is configured as receiving the corresponding institute of the latest edition number that the service system returns
Subscription data are stated, and the subscription data are stored in local.
In the optional implementation, ordering system can send registration request to service system, to obtain from service system
Subscription data are taken, and are obtained and the synchronized update subscription data in real time.Ordering system is in the subscription for receiving service system transmission
After data latest edition number, local not stored subscription data are determined, namely initially subscribe to the subscription data (subscription can be passed through
According to practical version number whether be default value determine), the subscription data for obtaining newest version are sent to service system at this time
The latest edition for subscribing to data can be returned to subscription system based on the full dose request of data by full dose request of data, service system
The latest edition for subscribing to data can be stored in local, such as local cache by system, ordering system.Ordering system can also be more
The practical version number for the subscription data being newly locally stored.
In one embodiment, ordering system can be using client, the application program etc. for subscribing to data, and difference subscribes to system
System can be located at different physical locations, the different application journey that can also be located on same physical location, such as same equipment
Sequence.Ordering system can send registration request to service system in initial start, will subscribe to the latest edition storage of data
It, can be by the subscription data dump in local cache after ordering system is closed in local cache.This mode is only subscribing to system
System has certain system call overhead when starting each time, and after start completion, directly access local cache, network pass
Defeated expense is 0.
In another embodiment, ordering system in specific implementation, can pass through the data subscription side of calling jar packet offer
Method accesses the subscription data of local cache, namely obtains and subscribe to data, and whole process can be shielded completely to ordering system and be subscribed to
The processes such as the load of data, ordering system only need to perceive the method in jar.
Fig. 9 is adapted for the structural representation for realizing the electronic equipment of the data managing method according to disclosure embodiment
Figure.
As shown in figure 9, electronic equipment 900 includes central processing unit (CPU) 901, it can be according to being stored in read-only deposit
Program in reservoir (ROM) 902 is held from the program that storage section 908 is loaded into random access storage device (RAM) 903
Various processing in the above-mentioned embodiment shown in FIG. 1 of row.In RAM903, be also stored with electronic equipment 900 operate it is required
Various programs and data.CPU901, ROM902 and RAM903 are connected with each other by bus 904.Input/output (I/O) interface
905 are also connected to bus 904.
I/O interface 905 is connected to lower component: the importation 906 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 907 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 908 including hard disk etc.;
And the communications portion 909 of the network interface card including LAN card, modem etc..Communications portion 909 via such as because
The network of spy's net executes communication process.Driver 910 is also connected to I/O interface 905 as needed.Detachable media 911, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 910, in order to read from thereon
Computer program be mounted into storage section 908 as needed.
Particularly, according to embodiment of the present disclosure, it is soft to may be implemented as computer above with reference to Fig. 1 method described
Part program.For example, embodiment of the present disclosure includes a kind of computer program product comprising be tangibly embodied in and its readable
Computer program on medium, the computer program include the program code for executing the method for Fig. 1.In such implementation
In mode, which can be downloaded and installed from network by communications portion 909, and/or from detachable media
911 are mounted.
Electronic equipment shown in Fig. 9 can equally be well applied to realize the data subscription method proposed in the embodiment of the present disclosure.
Flow chart and block diagram in attached drawing illustrate system, method and computer according to the various embodiments of the disclosure
The architecture, function and operation in the cards of program product.In this regard, each box in course diagram or block diagram can be with
A part of a module, section or code is represented, a part of the module, section or code includes one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong
The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer
The combination of order is realized.
Being described in unit or module involved in disclosure embodiment can be realized by way of software, can also
It is realized in a manner of through hardware.Described unit or module also can be set in the processor, these units or module
Title do not constitute the restriction to the unit or module itself under certain conditions.
As on the other hand, the disclosure additionally provides a kind of computer readable storage medium, the computer-readable storage medium
Matter can be computer readable storage medium included in device described in above embodiment;It is also possible to individualism,
Without the computer readable storage medium in supplying equipment.Computer-readable recording medium storage has one or more than one journey
Sequence, described program is used to execute by one or more than one processor is described in disclosed method.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure
Can technical characteristic replaced mutually and the technical solution that is formed.