CN106339253A - Intersystem data invoke method and device using same - Google Patents

Intersystem data invoke method and device using same Download PDF

Info

Publication number
CN106339253A
CN106339253A CN201510390902.5A CN201510390902A CN106339253A CN 106339253 A CN106339253 A CN 106339253A CN 201510390902 A CN201510390902 A CN 201510390902A CN 106339253 A CN106339253 A CN 106339253A
Authority
CN
China
Prior art keywords
data
database table
upper strata
involved
calling system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510390902.5A
Other languages
Chinese (zh)
Other versions
CN106339253B (en
Inventor
潘寒冰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Network Technology Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510390902.5A priority Critical patent/CN106339253B/en
Publication of CN106339253A publication Critical patent/CN106339253A/en
Application granted granted Critical
Publication of CN106339253B publication Critical patent/CN106339253B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides an intersystem data invoke method and a device using same; the method comprises the following steps: receiving a data abstract obtain request sent by an upper level invoke system, and searching change characteristics of each related database table; sending the obtained database table change characteristics to the upper level invoke system; receiving a comparison result, between local preserved change characteristics and received database table change characteristics, returned by the upper level invoke system; sending the related database table data to the upper level invoke system if the comparison result is not consistent. The novel method and device do not need to abstract bottom level data, thus reducing intersystem data interaction time consumption.

Description

Carry out method and its device of data call between a kind of system
Technical field
The application is related to areas of information technology, carry out between more particularly, to a kind of system data call method and Its device.
Background technology
During common business operation, upper strata calling system is for bottom data (basedata) system There is substantial amounts of data dependence.And bottom data there is a possibility that to change at any time, if in each business All real-time calling bottom data in operating process, a business completes to typically require to be called more than 100 times Bottom data.Although bottom data caches for frequently-used data, for network consumption, client Between responsiveness and system, load all can bring greater impact.For example, common primary network interaction consumption When 2ms, the bottom data more than 100 times for each business operation invocation of procedure, need time-consuming 200ms with On time.And, upper strata calling system is during waiting bottom data to be returned, because substantial amounts of etc. Treat thread, cause frequently cpu context switching, reduce the concurrency performance of types of applications.
For improving above-mentioned technological deficiency, generally the bottom data needed for the calling system of upper strata is loaded into it Ground internal memory, upper strata calling system, only in initial start-up and after bottom data change, carries out bottom data Acquisition.Referring to Fig. 1, when bottom data occurs change, bottom data system a sends message, on After layer calling system b listens to described message, re invocation bottom data system a obtains up-to-date data And be cached in the calling system b local memory of upper strata.But, when upper strata calling system have multiple and right When the bottom data that bottom data system is relied on differs, even if when the application of some upper-layer service systems Less than the bottom data changing, also receive the message that upper strata calling system sends it has to weight New acquisition data.
Content of the invention
In view of this, the application provides method and its device carrying out data call between a kind of system, and it is no Bottom data need to be made a summary, decrease and between system, carry out the time-consuming of data interaction.
The application provides a kind of method carrying out data call between system, is applied to bottom data system, institute The method of stating includes:
Request, each involved data base of inquiry are obtained according to the data summarization that upper strata calling system sends The change feature of table;
The change feature of the database table that inquiry is obtained is sent to described upper strata calling system;
Receive its local change feature of database table preserving and the reception that described upper strata calling system returns The change feature of database table comparison result;
If described comparison result is inconsistent, then involved database table data is sent to described upper strata Calling system.
In the application one implements, described acquisition according to the data summarization that upper strata calling system sends please Ask, also include before the involved change feature of each database table of inquiry:
As changed bottom data, preserve or update the data the last modification time of storehouse table;
The change feature of described database table includes: the record number of database table and last modification time.
In the application one implements, methods described also includes:
If described comparison result is consistent, then need not send data to described upper strata calling system.
The application also provides a kind of method of data alteration detection, is applied to upper strata calling system, described side Method includes:
Initiate data summarization and obtain request to bottom data system, make involved by described bottom data system queries And each database table change feature;
Receive the change feature of the database table that described bottom data system queries obtain;
The change feature of the local database table preserving and the change feature of the database table receiving are compared Right, and send comparison result to described bottom data system;
If comparison result is inconsistent, then receive the involved data base that described bottom data system sends Table data.
In the application one implements, the change feature of described database table includes: the note of database table Record number and last modification time.
Corresponding to said method, the application also provides the device carrying out data call between a kind of system, application In bottom data system, described device includes:
Characteristic query module, the data summarization for being sent according to upper strata calling system obtains request, inquiry The change feature of each involved database table;
Feature sending module, the change feature of the database table for obtaining inquiry is sent to described upper strata Calling system;
Result receiver module, for receiving its local data base preserving that described upper strata calling system returns The change feature of table and the comparison result of the change feature of database table receiving;
Data transmission blocks, for being inconsistent when described comparison result, then by involved database table Data is activation is to described upper strata calling system.
In the application one implements, described device also includes:
Modification preserving module, for when as changed bottom data, preserving or updating the data the last of storehouse table Modification time;
The change feature of described database table includes: the record number of database table and last modification time.
In the application one implements, described device also includes:
Data disabled module, for being consistent when described comparison result, then need not send data on described Layer calling system.
The application also provides a kind of device of data alteration detection, is applied to upper strata calling system, described dress Put including:
Request sending module, obtains request to bottom data system for initiating data summarization, makes described bottom The change feature of each database table involved by layer data system queries.
Feature receiver module, for receiving the change of the database table that described bottom data system queries obtain Feature.
Result sending module, for will the local database table preserving change feature and reception data base The change feature of table is compared, and sends comparison result to described bottom data system.
Data reception module, for being inconsistent when comparison result, then receives described bottom data system and sends out The involved database table data sent.
In the application one implements, the change feature of described database table includes: the note of database table Record number and last modification time.
The number being sent according to upper strata calling system from above technical scheme, the application bottom data system Obtain request, the change feature of each involved database table of inquiry according to summary, data need not be carried out and pluck Will, it is to avoid the data summarization bottleneck that high performance system is brought to high concurrent.The application calls on upper strata The change feature of its local database table preserving and the change feature of the database table receiving are carried out by system Compare.As described comparison result for inconsistent then it represents that bottom data changes, by involved number According to storehouse table data is activation to described upper strata calling system, improve the response time of system, reduce network i/o Consume the context switching with cpu.
Brief description
In order to be illustrated more clearly that the embodiment of the present application or technical scheme of the prior art, below will be to reality The accompanying drawing applying required use in example or description of the prior art be briefly described it should be apparent that, below Accompanying drawing in description is only some embodiments described in the application, for those of ordinary skill in the art For, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the data interaction schematic diagram of prior art application scenarios;
Fig. 2 is the hardware structure diagram of the application bottom data system institute application distribution formula server;
Fig. 3 is the flow chart of method one embodiment carrying out data call between the application system;
Fig. 4 is the flow chart of another embodiment of method carrying out data call between the application system;
Fig. 5 is the flow chart of the method another embodiment carrying out data call between the application system;
Fig. 6 is the hardware structure diagram of the application upper strata calling system institute application distribution formula server;
Fig. 7 is the flow chart of method one embodiment carrying out data call between the application system;
Fig. 8 is the flow chart of another embodiment of method carrying out data call between the application system;
Fig. 9 is the structure chart of device one embodiment carrying out data call between the application system;
Figure 10 is the structure chart of another embodiment of device carrying out data call between the application system;
Figure 11 is the structure chart of the device another embodiment carrying out data call between the application system;
Figure 12 is the flow chart of the device another embodiment carrying out data call between the application system;
Figure 13 is the data interaction schematic diagram of the application scenarios carrying out data call between the application system.
Specific embodiment
Due to being required for multiple real-time calling bottom data during each business operation, some upper strata industry Even if the application of business system, less than the bottom data changing, also receives disappearing of upper strata calling system transmission Breath is it has to reacquire bottom data.When upper-layer service system b calls bottom data system a, send out Before playing calling service, first used database table is all delivered to bottom data system a.By bottom The database table being related to is done a data summarization by data system a, database table will be aggregated into a letter Single value, by comparing the change of currency and history value, upper-layer service system b can determine whether data is sent out Changing.Specifically, upper-layer service system b returns according to bottom data system a data summarization and this The local data summary preserving in ground internal memory is mated, if both couplings, is not repeated to obtain number According to, otherwise, just repeat obtain data.But, data summarization is usually the institute of the database table being related to There are record queries out, a numerical value is obtained using md5 scheduling algorithm.The acquisition of data summarization is for requiring For high concurrent, high performance system, bottleneck can be brought.
The application bottom data system obtains request, inquiry according to the data summarization that upper strata calling system sends The change feature of each involved database table, need not carry out data summarization, it is to avoid data summarization pair The bottleneck that the high performance system of high concurrent is brought.The number that it is locally preserved by the application upper strata calling system Compare with the change feature of the database table receiving according to the change feature of storehouse table.As described comparison result For inconsistent then it represents that bottom data changes, involved database table data is sent to described Upper strata calling system, improves the response time of system, reduces network i/o and consumes the context with cpu Switching.
Certainly, the arbitrary technical scheme implementing the application it is not absolutely required to reach above-described institute simultaneously There is advantage.
In order that those skilled in the art more fully understand the technical scheme in the application, below in conjunction with this Shen Please accompanying drawing in embodiment, the technical scheme in the embodiment of the present application is clearly and completely described, Obviously, described embodiment is only some embodiments of the present application, rather than embodiment.It is based on Embodiment in the application, the every other embodiment that those of ordinary skill in the art are obtained, all should Belong to the scope of the application protection.
The application provides a kind of method carrying out data call between system, is applied to bottom data system.This Application bottom data system can be distributed server on hardware configuration, referring to Fig. 2, distributed clothes The hardware configuration of business device 2 includes controller 21, memorizer 22 and other hardware 23.
Referring to Fig. 3, the application one embodiment methods described 3 includes:
S1, the data summarization acquisition request being sent according to upper strata calling system, the involved every number of inquiry Change feature according to storehouse table.
Specifically, upper strata calling system periodically sends data summarization and obtains request to bottom data system, will Involved database table is transmitted in the form of array.Bottom data system receives described data summarization and obtains After taking request, data summarization is not obtained with the involved database table of request and is aggregated into data summarization.This The bottom data system of embodiment only inquires about the change spy that data summarization obtains the involved database table of request Levy.
It is aggregated into data summarization due to data summarization is obtained the involved database table of request, to high concurrent For high performance system, bottleneck can be brought.And the present embodiment inquiry data summarization obtains involved by request Database table change feature, decrease the time carrying out data summarization, and avoid data summarization The bottleneck that high performance system is brought to high concurrent.
S2, the change feature of the database table obtaining inquiry are sent to described upper strata calling system.
In the application one implements, the present embodiment obtains the involved number of request by inquiring about data summarization According to the change feature of storehouse table be sent to described in send inquiry data summarization obtain request upper strata calling system.
S3, receive its local change feature of database table preserving that described upper strata calling system returns with The comparison result of the change feature of database table receiving.
After upper strata calling system receives the change feature of database table, by its local database table preserving Change feature with receive change feature compare.Upper strata calling system by the result of comparison send to Bottom data system.
S4, if described comparison result is inconsistent, then involved database table data is sent to described Upper strata calling system.
If the result of the comparison that upper strata calling system sends is inconsistent, show bottom data system Data there occurs change, and upper strata calling system needs to reacquire the data of bottom data system.Bottom number According to system, involved database table data is sent to described upper strata calling system.Upper strata calling system obtains Obtain the data of the renewal that bottom data system sends.
Implement the application is another, referring to Fig. 4, methods described 4 includes:
S0, such as modification bottom data, preserve or update the data the last modification time of storehouse table.
The change feature of described database table includes: the record number of database table and last modification time.
Specifically, bottom data system change a certain bottom data, then can its database table of synchronous vacations, If not preserving the last modification time of its database table in historical record, after this modification bottom data, Preserve the last modification time of its database table.Bottom data system changes a certain bottom data, if gone through Save the last modification time of its database table in Records of the Historian record, then, after this modification bottom data, update The last modification time of described database table.
Because the application is according to the modification of bottom data, preserve or have updated finally repairing of its database table Change the time, therefore using the record number of database table and last modification time as database table change feature, As the foundation judging whether bottom data changes.
S1 ', the data summarization acquisition request being sent according to upper strata calling system, inquire about involved each The record number of database table and last modification time.
Specifically, upper strata calling system periodically sends data summarization and obtains request to bottom data system, will Involved database table is transmitted in the form of array.Bottom data system receives described data summarization and obtains After taking request, data summarization is not obtained with the involved database table of request and is aggregated into data summarization.This The bottom data system of embodiment only inquires about the record number that data summarization obtains the involved database table of request With last modification time.
It is aggregated into data summarization due to data summarization is obtained the involved database table of request, to high concurrent For high performance system, bottleneck can be brought.And the present embodiment is only inquired about data summarization and is obtained involved by request And the record number of database table and last modification time, decrease the time carrying out data summarization, and Avoid the data summarization bottleneck that high performance system is brought to high concurrent.
S2 ', the record number of database table that inquiry is obtained and last modification time are sent to described upper strata Calling system.
In the application one implements, the present embodiment obtains the involved number of request by inquiring about data summarization According to storehouse table record number and last modification time be sent to described in send inquiry data summarization obtain request upper Layer calling system.
S3 ', receive its local record number of database table preserving that described upper strata calling system returns and Last modification time and the record number of the database table receiving and the comparison result of last modification time.
After upper strata calling system receives record number and the last modification time of database table, it is locally protected The record number of the database table deposited and last modification time are carried out with the record number receiving and last modification time Compare.Upper strata calling system sends the result of comparison to bottom data system.
S4 ', as described comparison result be inconsistent, then involved database table data is sent to institute State upper strata calling system.
If the result of the comparison that upper strata calling system sends is inconsistent, show bottom data system Data there occurs change, and upper strata calling system needs to reacquire the data of bottom data system.Bottom number According to system, involved database table data is sent to described upper strata calling system.Upper strata calling system obtains Obtain the data of the renewal that bottom data system sends.
The present embodiment upper strata calling system passes through to compare the record number of the database table that bottom data system sends With record number and the last modification time of last modification time and locally stored database table, thus really Whether the data determining bottom data system changes.The present embodiment simple to operate, it is to avoid between system Network consumption and load, improve client response degree.
Implement the application is another, referring to Fig. 5, methods described 5 includes above-mentioned steps s1 Outside s4, further comprise the steps of:
S5, if described comparison result is consistent, then need not send data to described upper strata calling system.
If the result of the comparison that upper strata calling system sends is inconsistent, show bottom data system Data does not change, and upper strata calling system need not reacquire the data of bottom data system.Bottom Data system need not send data to described upper strata calling system, reduces upper strata calling system and bottom data The data interaction of system, the response time of lift system, reduces network i/o and consumes, reduce the upper of cpu Hereafter switch.
The application also provides a kind of method carrying out data call between system, is applied to upper strata calling system. The application upper strata calling system can be distributed server on hardware configuration, referring to Fig. 6, distributed The hardware configuration of server 6 includes controller 61, memorizer 62 and other hardware 653.
Referring to Fig. 7, herein described method 7 includes:
P1, initiation data summarization obtain request to bottom data system, make described bottom data system queries The change feature of each involved database table.
Specifically, upper strata calling system periodically sends data summarization and obtains request to bottom data system, will Involved database table is transmitted in the form of array.Bottom data system receives described data summarization and obtains After taking request, data summarization is not obtained with the involved database table of request and is aggregated into data summarization.This The bottom data system of embodiment only inquires about the change spy that data summarization obtains the involved database table of request Levy.
It is aggregated into data summarization due to data summarization is obtained the involved database table of request, to high concurrent For high performance system, bottleneck can be brought.And the present embodiment is only inquired about data summarization and is obtained involved by request And database table change feature, decrease the time carrying out data summarization, and avoid data and pluck Will high performance system is brought to high concurrent bottleneck.
The change feature of the database table that p2, the described bottom data system queries of reception obtain.
In the application one implements, the present embodiment obtains the involved number of request by inquiring about data summarization According to the change feature of storehouse table be sent to described in send inquiry data summarization obtain request upper strata calling system.
P3, the change feature of the change feature of the local database table preserving and the database table of reception is entered Row compares, and sends comparison result to described bottom data system.
After upper strata calling system receives the change feature of database table, by its local database table preserving Change feature with receive change feature compare.If the knot of the comparison that upper strata calling system obtains Fruit is inconsistent, then show that the data of bottom data system there occurs change, otherwise, show bottom data The data of system does not change.Upper strata calling system sends the result of comparison to bottom data system.
P4, such as comparison result are inconsistent, then receive the involved number that described bottom data system sends According to storehouse table data.
If the result of the comparison that upper strata calling system obtains is inconsistent, the i.e. data of bottom data system There occurs change, bottom data system sends involved database table data to upper strata calling system.On Layer calling system receives the involved database table data that bottom data system sends.
Specifically, described upper strata calling system disposably obtains the involved number of bottom data system transmission According to storehouse table data, then each bottom data is obtained according to described database table data.
If the result of comparison that upper strata calling system obtains is consistent, that is, the data of bottom data system is simultaneously Do not change, bottom data system no longer sends data to upper strata calling system.Thus, reduce upper strata Calling system and the data interaction of bottom data system, the response time of lift system, reduces network i/o Consume, reduce the context switching of cpu.
Implement the application is another, the change feature of described database table includes: database table Record number and last modification time.
Referring to Fig. 8, herein described method 8 includes:
P1 ', initiation data summarization obtain request to bottom data system, make described bottom data system queries The record number of each involved database table and last modification time.
Specifically, upper strata calling system periodically sends data summarization and obtains request to bottom data system, will Involved database table is transmitted in the form of array.Bottom data system receives described data summarization and obtains After taking request, data summarization is not obtained with the involved database table of request and is aggregated into data summarization.This The bottom data system of embodiment only inquires about the record number that data summarization obtains the involved database table of request With last modification time.
It is aggregated into data summarization due to data summarization is obtained the involved database table of request, to high concurrent For high performance system, bottleneck can be brought.And the present embodiment is only inquired about data summarization and is obtained involved by request And the record number of database table and last modification time, decrease the time carrying out data summarization, and Avoid the data summarization bottleneck that high performance system is brought to high concurrent.
When p2 ', the record number of database table receiving described bottom data system queries acquisition and finally modification Between.
In the application one implements, the present embodiment obtains the involved number of request by inquiring about data summarization According to storehouse table record number and last modification time be sent to described in send inquiry data summarization obtain request upper Layer calling system.
P3 ', by the record number of the local database table preserving and last modification time and the database table receiving Record number and last modification time compare, and send comparison result to described bottom data system.
After upper strata calling system receives record number and the last modification time of database table, it is locally protected The record number of the database table deposited and last modification time are carried out with the record number receiving and last modification time Compare.If the result of the comparison that upper strata calling system obtains is inconsistent, show bottom data system Data there occurs change, otherwise, show that the data of bottom data system does not change.Upper strata is adjusted With system, the result of comparison is sent to bottom data system.
P4 ', such as comparison result are inconsistent, then receive the involved number that described bottom data system sends According to storehouse table data.
If the result of the comparison that upper strata calling system obtains is inconsistent, the i.e. data of bottom data system There occurs change, bottom data system sends involved database table data to upper strata calling system.On Layer calling system receives the involved database table data that bottom data system sends.
Specifically, described upper strata calling system disposably obtains the involved number of bottom data system transmission According to storehouse table data, then each bottom data is obtained according to described database table data.
If the result of comparison that upper strata calling system obtains is consistent, that is, the data of bottom data system is simultaneously Do not change, bottom data system no longer sends data to upper strata calling system.Thus, reduce upper strata Calling system and the data interaction of bottom data system, the response time of lift system, reduces network i/o Consume, reduce the context switching of cpu.
The present embodiment upper strata calling system passes through to compare the record number of the database table that bottom data system sends With record number and the last modification time of last modification time and locally stored database table, thus really Whether the data determining bottom data system changes.The present embodiment simple to operate, it is to avoid between system Network consumption and load, improve client response degree.
Corresponding to said method, the application also provides the device carrying out data call between a kind of system, application In bottom data system.The application bottom data system can be distributed server on hardware configuration, Referring to Fig. 1, the hardware configuration of distributed server 1 include controller 11, memorizer 12 and other Hardware 13.
Referring to Fig. 9, the application one embodiment described device 9 includes:
Characteristic query module 91, the data summarization for being sent according to upper strata calling system obtains request, looks into Ask the change feature of each involved database table.
Feature sending module 92, described for being sent to the change feature of the database table of inquiry acquisition Layer calling system.
Result receiver module 93, for receiving its local data preserving that described upper strata calling system returns The change feature of storehouse table and the comparison result of the change feature of database table receiving.
Data transmission blocks 94, for being inconsistent when described comparison result, then by involved data base Table data is activation is to described upper strata calling system.
Specifically, upper strata calling system periodically sends data summarization and obtains request to bottom data system, will Involved database table is transmitted in the form of array.Bottom data system receives described data summarization and obtains After taking request, data summarization is not obtained with the involved database table of request and is aggregated into data summarization.This The bottom data system of embodiment only inquires about the change spy that data summarization obtains the involved database table of request Levy.
It is aggregated into data summarization due to data summarization is obtained the involved database table of request, to high concurrent For high performance system, bottleneck can be brought.And the present embodiment is only inquired about data summarization and is obtained involved by request And database table change feature, decrease the time carrying out data summarization, and avoid data and pluck Will high performance system is brought to high concurrent bottleneck.
In the application one implements, the present embodiment obtains the involved number of request by inquiring about data summarization According to the change feature of storehouse table be sent to described in send inquiry data summarization obtain request upper strata calling system.
After upper strata calling system receives the change feature of database table, by its local database table preserving Change feature with receive change feature compare.Upper strata calling system by the result of comparison send to Bottom data system.
If the result of the comparison that upper strata calling system sends is inconsistent, show bottom data system Data there occurs change, and upper strata calling system needs to reacquire the data of bottom data system.Bottom number According to system, involved database table data is sent to described upper strata calling system.Upper strata calling system obtains Obtain the data of the renewal that bottom data system sends.
Implement the application is another, referring to Figure 10, described device 10 also includes:
Modification preserving module 100, for when modification bottom data, preserving or updating the data storehouse table Modification time afterwards.
The change feature of described database table includes: the record number of database table and last modification time.
Specifically, bottom data system change a certain bottom data, then can its database table of synchronous vacations, If not preserving the last modification time of its database table in historical record, after this modification bottom data, Preserve the last modification time of its database table.Bottom data system changes a certain bottom data, if gone through Save the last modification time of its database table in Records of the Historian record, then, after this modification bottom data, update The last modification time of described database table.
Because the application is according to the modification of bottom data, preserve or have updated finally repairing of its database table Change time conduct, therefore using the record number of database table and last modification time as database table change Feature, as the foundation judging whether bottom data changes.
Characteristic query module 101, the data summarization specifically for being sent according to upper strata calling system obtains please Ask, inquire about the involved record number of each database table and last modification time.
Feature sending module 102, specifically for will inquire about the record number of the database table obtaining and finally repair The time of changing is sent to described upper strata calling system.
Result receiver module 103, its specifically for the calling system return of reception described upper strata locally preserves The record number of database table and last modification time and the record number of database table receiving and last modification The comparison result of time.
Data transmission blocks 104, specifically for being inconsistent when described comparison result, then will be involved Database table data sends to described upper strata calling system.
Specifically, upper strata calling system periodically sends data summarization and obtains request to bottom data system, will Involved database table is transmitted in the form of array.Bottom data system receives described data summarization and obtains After taking request, data summarization is not obtained with the involved database table of request and is aggregated into data summarization.This The bottom data system of embodiment only inquires about the record number that data summarization obtains the involved database table of request With last modification time.
It is aggregated into data summarization due to data summarization is obtained the involved database table of request, to high concurrent For high performance system, bottleneck can be brought.And the present embodiment is only inquired about data summarization and is obtained involved by request And the record number of database table and last modification time, decrease the time carrying out data summarization, and Avoid the data summarization bottleneck that high performance system is brought to high concurrent.
In the application one implements, the present embodiment obtains the involved number of request by inquiring about data summarization According to storehouse table record number and last modification time be sent to described in send inquiry data summarization obtain request upper Layer calling system.
After upper strata calling system receives record number and the last modification time of database table, it is locally protected The record number of the database table deposited and last modification time are carried out with the record number receiving and last modification time Compare.Upper strata calling system sends the result of comparison to bottom data system.
If the result of the comparison that upper strata calling system sends is inconsistent, show bottom data system Data there occurs change, and upper strata calling system needs to reacquire the data of bottom data system.Bottom number According to system, involved database table data is sent to described upper strata calling system.Upper strata calling system obtains Obtain the data of the renewal that bottom data system sends.
The present embodiment upper strata calling system passes through to compare the record number of the database table that bottom data system sends With record number and the last modification time of last modification time and locally stored database table, thus really Whether the data determining bottom data system changes.The present embodiment simple to operate, it is to avoid between system Network consumption and load, improve client response degree.
Implement the application is another, referring to Figure 11, described device 11 includes characteristic query module 91st, feature sending module 92, result receiver module 93, outside data transmission blocks 94, also include:
Data disabled module 95, for being consistent when described comparison result, then need not send data to described Upper strata calling system.
If the result of the comparison that upper strata calling system sends is inconsistent, show bottom data system Data does not change, and upper strata calling system need not reacquire the data of bottom data system.Bottom Data system need not send data to described upper strata calling system, reduces upper strata calling system and bottom data The data interaction of system, the response time of lift system, reduces network i/o and consumes, reduce the upper of cpu Hereafter switch.
The application also provides the device carrying out data call between a kind of system, is applied to upper strata calling system. The application upper strata calling system can be distributed server on hardware configuration, referring to Fig. 6, distributed The hardware configuration of server 6 includes controller 61, memorizer 62 and other hardware 653.
Referring to Figure 12, herein described device 12 includes:
Request sending module 121, obtains request to bottom data system for initiating data summarization, makes institute State the change feature of each database table involved by bottom data system queries.
Feature receiver module 122, for receiving the database table that described bottom data system queries obtain Change feature.
Result sending module 123, for will the local database table preserving change feature and reception number Change feature according to storehouse table is compared, and sends comparison result to described bottom data system.
Data reception module 124, for being inconsistent when comparison result, then receives described bottom data system The involved database table data that system sends.
Specifically, upper strata calling system periodically sends data summarization and obtains request to bottom data system, will Involved database table is transmitted in the form of array.Bottom data system receives described data summarization and obtains After taking request, data summarization is not obtained with the involved database table of request and is aggregated into data summarization.This The bottom data system of embodiment only inquires about the change spy that data summarization obtains the involved database table of request Levy.
It is aggregated into data summarization due to data summarization is obtained the involved database table of request, to high concurrent For high performance system, bottleneck can be brought.And the present embodiment is only inquired about data summarization and is obtained involved by request And database table change feature, decrease the time carrying out data summarization, and avoid data and pluck Will high performance system is brought to high concurrent bottleneck.
In the application one implements, the present embodiment obtains the involved number of request by inquiring about data summarization According to the change feature of storehouse table be sent to described in send inquiry data summarization obtain request upper strata calling system.
After upper strata calling system receives the change feature of database table, by its local change feature preserving Compare with the change feature receiving.If the result of the comparison that upper strata calling system obtains is inconsistent, Then show that the data of bottom data system there occurs change, otherwise, show the data of bottom data system simultaneously Do not change.Upper strata calling system sends the result of comparison to bottom data system.
If the result of the comparison that upper strata calling system obtains is inconsistent, the i.e. data of bottom data system There occurs change, bottom data system sends involved database table data to upper strata calling system.On Layer calling system receives the involved database table data that bottom data system sends.
Specifically, described upper strata calling system disposably obtains the involved number of bottom data system transmission According to storehouse table data, then each bottom data is obtained according to described database table data.
If the result of comparison that upper strata calling system obtains is consistent, that is, the data of bottom data system is simultaneously Do not change, bottom data system no longer sends data to upper strata calling system.Thus, reduce upper strata Calling system and the data interaction of bottom data system, the response time of lift system, reduces network i/o Consume, reduce the context switching of cpu.
Implement the application is another, the change feature of described database table includes: database table Record number and last modification time.
Herein described device includes:
Request sending module 121, obtains request to bottom data system specifically for initiating data summarization, Make the record number of each database table and the last modification time involved by described bottom data system queries.
Feature receiver module 122, specifically for receiving the data base that described bottom data system queries obtain The record number of table and last modification time.
Result sending module 123, specifically for repair by the record number of the local database table preserving with finally The time that changes is compared with the record number of the database table receiving and last modification time, and sends comparison knot Fruit is to described bottom data system.
Data reception module 124, is inconsistent specifically for such as comparison result, then receives described bottom number Database table data involved by sending according to system.
Specifically, upper strata calling system periodically sends data summarization and obtains request to bottom data system, will Involved database table is transmitted in the form of array.Bottom data system receives described data summarization and obtains After taking request, data summarization is not obtained with the involved database table of request and is aggregated into data summarization.This The bottom data system of embodiment only inquires about the record number that data summarization obtains the involved database table of request With last modification time.
It is aggregated into data summarization due to data summarization is obtained the involved database table of request, to high concurrent For high performance system, bottleneck can be brought.And the present embodiment is only inquired about data summarization and is obtained involved by request And the record number of database table and last modification time, decrease the time carrying out data summarization, and Avoid the data summarization bottleneck that high performance system is brought to high concurrent.
In the application one implements, the present embodiment obtains the involved number of request by inquiring about data summarization According to storehouse table record number and last modification time be sent to described in send inquiry data summarization obtain request upper Layer calling system.
After upper strata calling system receives record number and the last modification time of database table, it is locally protected The record number deposited and last modification time are compared with the record number receiving and last modification time.If The result of the comparison that upper strata calling system obtains is inconsistent, then show that the data of bottom data system occurs Change, otherwise, shows that the data of bottom data system does not change.Upper strata calling system will compare To result send to bottom data system.
If the result of the comparison that upper strata calling system obtains is inconsistent, the i.e. data of bottom data system There occurs change, bottom data system sends involved database table data to upper strata calling system.On Layer calling system receives the involved database table data that bottom data system sends.
Specifically, described upper strata calling system disposably obtains the involved number of bottom data system transmission According to storehouse table data, then each bottom data is obtained according to described database table data.
If the result of comparison that upper strata calling system obtains is consistent, that is, the data of bottom data system is simultaneously Do not change, bottom data system no longer sends data to upper strata calling system.Thus, reduce upper strata Calling system and the data interaction of bottom data system, the response time of lift system, reduces network i/o Consume, reduce the context switching of cpu.
The present embodiment upper strata calling system passes through to compare the record number of the database table that bottom data system sends With record number and the last modification time of last modification time and locally stored database table, thus really Whether the data determining bottom data system changes.The present embodiment simple to operate, it is to avoid between system Network consumption and load, improve client response degree.
To further illustrate the application below by a concrete application scene of the embodiment of the present application to realize.
Referring to Figure 13, the data transfer flow process of upper strata calling system and bottom data system is as follows:
1. bottom data system modification bottom data, preserves or updates the data the last modification time of storehouse table.
Specifically, bottom data system changes a certain bottom data, if not preserving the last of database table Modification time, then preserve the last modification time of described database table.Bottom data system changes a certain bottom Layer data, if preserving the last modification time of database table, updates finally repairing of described database table Change the time.
2. the data summarization that upper strata calling system sends obtains request to bottom data system.
3. bottom data system obtains request according to the data summarization that upper strata calling system sends, and inquiry is involved And the record number of each database table and last modification time.
It is aggregated into data summarization due to data summarization is obtained the involved database table of request, to high concurrent For high performance system, bottleneck can be brought.And the present embodiment is only inquired about data summarization and is obtained involved by request And the record number of database table and last modification time, decrease the time carrying out data summarization, and Avoid the data summarization bottleneck that high performance system is brought to high concurrent.
4. the record number and last modification time of inquiring about the database table obtaining are sent to by bottom data system Described upper strata calling system.
Record number and last modification time can be false code and return value.
False code:
select 1id,count(1)size,max(gmt_modified)max_gmt_modified from t_basedata_table1
union
select 2id,count(1)size,max(gmt_modified)max_gmt_modified from t_basedata_table2
...
union
select n id,count(1)size,max(gmt_modified)max_gmt_modified from t_basedata_tablen
Return value:
1,100,2015-02-14t22:17:13.612+0800
2,150,2015-02-14t22:18:13.612+0800
n,100,2015-02-14t22:57:13.612+0800
5. upper strata calling system by the record number of its local database table preserving and last modification time with connect The record number of database table received and last modification time are compared.
6. upper strata calling system sends the result of comparison to bottom data system.
7. if described comparison result is inconsistent, involved database table data is sent out by bottom data system Deliver to described upper strata calling system.
If the result of the comparison that upper strata calling system sends is inconsistent, show bottom data system Data there occurs change, and upper strata calling system needs to reacquire the data of bottom data system.Bottom number According to system, involved database table data is sent to described upper strata calling system.Upper strata calling system obtains Obtain the data of the renewal that bottom data system sends.
8. the database table data that upper strata calling system sends according to bottom data system, obtains each bottom number According to.
The application upper strata calling system pass through compare bottom data system send the record number of database table and The record number of last modification time and locally stored database table and last modification time, so that it is determined that Whether the data of bottom data system changes.The application is simple to operate, it is to avoid the network between system Consume and load, improve client response degree.
It is assumed that calling system each business operation in upper strata needs to call bottom data system 100 times, return every time Return a record, 0.1kb, involved database table is 10.Involved by bottom data system Database table is for, in the case of changing, the time loss of each business operation rises to from 200ms 4.5ms.Network consumption, by 0.1kb*100 time=10kb, is reduced to 36b*10 and opens table=0.36kb.
If additionally, the result of the comparison of upper strata calling system transmission is inconsistent, showing bottom data The data of system does not change, and upper strata calling system need not reacquire the data of bottom data system. Bottom data system need not send data to described upper strata calling system, reduces upper strata calling system and bottom The data interaction of data system, the response time of lift system, reduces network i/o and consumes, reduce cpu Context switching.
The device that embodiments herein is provided can be realized by computer program.Those skilled in the art It should be appreciated that above-mentioned unit and Module Division mode are only one of numerous dividing mode, If being divided into other units or module or non-divided block, as long as information object has above-mentioned functions, all Should be within the protection domain of the application.
It will be understood by those skilled in the art that embodiments herein can be provided as method, device (equipment), Or computer program.Therefore, the application can using complete hardware embodiment, complete software embodiment, Or combine the form of the embodiment of software and hardware aspect.And, the application can be using one or more Wherein include computer-usable storage medium (the including but not limited to disk of computer usable program code Memorizer, cd-rom, optical memory etc.) the upper computer program implemented form.
The application is with reference to according to the method for the embodiment of the present application, device (equipment) and computer program Flow chart and/or block diagram describing.It should be understood that can by computer program instructions flowchart and/ Or each flow process in block diagram and/or the flow process in square frame and flow chart and/or block diagram and/or side The combination of frame.These computer program instructions can be provided to general purpose computer, special-purpose computer, embedded The processor of datatron or other programmable data processing device is to produce a machine so that passing through to calculate The instruction of the computing device of machine or other programmable data processing device produces for realizing in flow chart one The device of the function of specifying in individual flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or other programmable datas can be guided to process and set So that being stored in this computer-readable memory in the standby computer-readable memory working in a specific way In instruction produce and include the manufacture of command device, the realization of this command device in one flow process of flow chart or The function of specifying in multiple flow processs and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, So that execution series of operation steps is computer implemented to produce on computer or other programmable devices Process, thus the instruction of execution is provided for realizing in flow chart on computer or other programmable devices The step of the function of specifying in one flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
Although having been described for the preferred embodiment of the application, those skilled in the art once know Basic creative concept, then can make other change and modification to these embodiments.So, appended power Profit requires to be intended to be construed to including preferred embodiment and fall into being had altered and changing of the application scope. Obviously, those skilled in the art can carry out various changes and modification without deviating from the application to the application Spirit and scope.So, if the application these modification and modification belong to the application claim and Within the scope of its equivalent technologies, then the application is also intended to comprise these changes and modification.

Claims (10)

1. a kind of method carrying out data call between system, be applied to bottom data system it is characterised in that Methods described includes:
Request, each involved data base of inquiry are obtained according to the data summarization that upper strata calling system sends The change feature of table;
The change feature of the database table that inquiry is obtained is sent to described upper strata calling system;
Receive its local change feature of database table preserving and the reception that described upper strata calling system returns The change feature of database table comparison result;
If described comparison result is inconsistent, then involved database table data is sent to described upper strata Calling system.
2. method according to claim 1 is it is characterised in that described send out according to upper strata calling system The data summarization sending obtains request, also includes before the involved change feature of each database table of inquiry:
As changed bottom data, preserve or update the data the last modification time of storehouse table;
The change feature of described database table includes: the record number of database table and last modification time.
3. method according to claim 1 is it is characterised in that methods described also includes:
If described comparison result is consistent, then need not send data to described upper strata calling system.
4. a kind of method of data alteration detection, is applied to upper strata calling system it is characterised in that described Method includes:
Initiate data summarization and obtain request to bottom data system, make involved by described bottom data system queries And each database table change feature;
Receive the change feature of the database table that described bottom data system queries obtain;
The change feature of the local database table preserving and the change feature of the database table receiving are compared Right, and send comparison result to described bottom data system;
If comparison result is inconsistent, then receive the involved data base that described bottom data system sends Table data.
5. method according to claim 4 is it is characterised in that the change feature of described database table Including: the record number of database table and last modification time.
6. between a kind of system, carry out the device of data call, be applied to bottom data system it is characterised in that Described device includes:
Characteristic query module, the data summarization for being sent according to upper strata calling system obtains request, inquiry The change feature of each involved database table;
Feature sending module, the change feature of the database table for obtaining inquiry is sent to described upper strata Calling system;
Result receiver module, for receiving its local data base preserving that described upper strata calling system returns The change feature of table and the comparison result of the change feature of database table receiving;
Data transmission blocks, for being inconsistent when described comparison result, then by involved database table Data is activation is to described upper strata calling system.
7. device according to claim 6 is it is characterised in that described device also includes:
Modification preserving module, for when as changed bottom data, preserving or updating the data the last of storehouse table Modification time;
The change feature of described database table includes: the record number of database table and last modification time.
8. device according to claim 6 is it is characterised in that described device also includes:
Data disabled module, for being consistent when described comparison result, then need not send data on described Layer calling system.
9. a kind of device of data alteration detection, is applied to upper strata calling system it is characterised in that described Device includes:
Request sending module, obtains request to bottom data system for initiating data summarization, makes described bottom The change feature of each database table involved by layer data system queries.
Feature receiver module, for receiving the change of the database table that described bottom data system queries obtain Feature.
Result sending module, for will the local database table preserving change feature and reception data base The change feature of table is compared, and sends comparison result to described bottom data system.
Data reception module, for being inconsistent when comparison result, then receives described bottom data system and sends out The involved database table data sent.
10. device according to claim 9 is it is characterised in that the change of described database table is special Levy including the record number of database table and last modification time.
CN201510390902.5A 2015-07-06 2015-07-06 Method and device for data calling between systems Active CN106339253B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510390902.5A CN106339253B (en) 2015-07-06 2015-07-06 Method and device for data calling between systems

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510390902.5A CN106339253B (en) 2015-07-06 2015-07-06 Method and device for data calling between systems

Publications (2)

Publication Number Publication Date
CN106339253A true CN106339253A (en) 2017-01-18
CN106339253B CN106339253B (en) 2019-12-10

Family

ID=57826206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510390902.5A Active CN106339253B (en) 2015-07-06 2015-07-06 Method and device for data calling between systems

Country Status (1)

Country Link
CN (1) CN106339253B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226226A1 (en) * 2006-03-23 2007-09-27 Elta Systems Ltd. Method and system for distributing processing of computerized tasks
CN101493826A (en) * 2008-12-23 2009-07-29 中兴通讯股份有限公司 Database system based on WEB application and data management method thereof
CN102281320A (en) * 2011-04-25 2011-12-14 程旭 Method for controlling data redundancy in cloud storage and apparatus thereof
CN103853727A (en) * 2012-11-29 2014-06-11 深圳中兴力维技术有限公司 Method and system for improving large data volume query performance
CN104573128A (en) * 2014-10-28 2015-04-29 北京国双科技有限公司 Business data processing method, a business data processing device and server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226226A1 (en) * 2006-03-23 2007-09-27 Elta Systems Ltd. Method and system for distributing processing of computerized tasks
CN101493826A (en) * 2008-12-23 2009-07-29 中兴通讯股份有限公司 Database system based on WEB application and data management method thereof
CN102281320A (en) * 2011-04-25 2011-12-14 程旭 Method for controlling data redundancy in cloud storage and apparatus thereof
CN103853727A (en) * 2012-11-29 2014-06-11 深圳中兴力维技术有限公司 Method and system for improving large data volume query performance
CN104573128A (en) * 2014-10-28 2015-04-29 北京国双科技有限公司 Business data processing method, a business data processing device and server

Also Published As

Publication number Publication date
CN106339253B (en) 2019-12-10

Similar Documents

Publication Publication Date Title
US11349940B2 (en) Server side data cache system
CN105100050B (en) Method for managing user right and system
CN109274730A (en) The optimization method and device that Internet of things system, MQTT message are transmitted
US20130318536A1 (en) Dynamic scheduling of tasks for collecting and processing data from external sources
US7698411B2 (en) Selectively delivering cached content or processed content to clients based upon a result completed percentage
CN103942209B (en) Data processing method
US20100262687A1 (en) Dynamic data partitioning for hot spot active data and other data
CN110046092B (en) Experiment shunting method and device, electronic equipment and computer readable storage medium
CN104537013B (en) A kind of method and apparatus of processing data
CN101404627A (en) Instant communication system and method for updating contact information
CN104346345A (en) Data storage method and device
CN108345643A (en) A kind of data processing method and device
CN113656176B (en) Cloud equipment distribution method, device and system, electronic equipment, medium and product
CN112732756B (en) Data query method, device, equipment and storage medium
CN106021284A (en) Data query method, data monitoring method and device
CN110740155B (en) Request processing method and device in distributed system
US11853806B2 (en) Cloud computing platform that executes third-party code in a distributed cloud computing network and uses a distributed data store
CN113961832A (en) Page rendering method, device, equipment, storage medium and program product
CN107528894A (en) A kind of storage system Real time data acquisition method and platform
CN110019231A (en) A kind of method that parallel database dynamically associates and node
CN114422331B (en) Disaster recovery switching method, device and system
CN109388655A (en) A kind of method and apparatus of dynamic control of data access
CN106339253A (en) Intersystem data invoke method and device using same
CN109165257A (en) Data query method and related system, equipment and storage medium
CN112799849A (en) Data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211110

Address after: No. 699, Wangshang Road, Binjiang District, Hangzhou, Zhejiang

Patentee after: Alibaba (China) Network Technology Co., Ltd

Address before: P.O. Box 847, 4th floor, Grand Cayman capital building, British Cayman Islands

Patentee before: Alibaba Group Holdings Limited