CN110147480A - A kind of data pull method, equipment and storage medium - Google Patents

A kind of data pull method, equipment and storage medium Download PDF

Info

Publication number
CN110147480A
CN110147480A CN201910300131.4A CN201910300131A CN110147480A CN 110147480 A CN110147480 A CN 110147480A CN 201910300131 A CN201910300131 A CN 201910300131A CN 110147480 A CN110147480 A CN 110147480A
Authority
CN
China
Prior art keywords
data
object data
local cache
behavior event
influenced
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910300131.4A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910300131.4A priority Critical patent/CN110147480A/en
Publication of CN110147480A publication Critical patent/CN110147480A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • A63F13/49Saving the game status; Pausing or ending the game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This application discloses a kind of data pull method, equipment and storage mediums, which comprises receives the data acquisition request of requesting party;When the data acquisition request requested data includes the object data of failure state in local cache, the data acquisition request requested data is obtained from database;The requested data obtained from the database is sent to the requesting party;Wherein, the failure state of the object data includes being arranged using following manner: obtaining real-time behavior event;Determine the object data that the behavior event is influenced;Failure state is set by the object data influenced described in local cache, the object data in the failure state characterization local cache is unavailable.Using technical solution provided by the present application the real-time and accuracy of the data pulled can be effectively improved while the efficiency of the stability and data pull that guarantee database using caching mechanism.

Description

A kind of data pull method, equipment and storage medium
Technical field
This application involves Internet communication technology field more particularly to a kind of data pull methods, equipment and storage medium.
Background technique
With the arrival of Internet era, internet obtains extensively in the daily study of people, work, life and amusement Application, the daily various affairs of people can be presented by network.Therefore, all magnanimity is being generated daily in internet Data.
Currently, data are generally stored in the local cache of database and server, and when a certain data are requested, service Device can be checked in local cache with the presence or absence of available requested date;If it exists, data are directly obtained from caching, and are returned Back to requesting party;If available requested date is not present in caching, server can obtain data from database, and return to Requesting party.Wherein, often interval updates once the data in local cache at regular intervals, and can be the number after updating every time According to setting term of validity, when data are within term of validity, which is data available;Conversely, the data are not available data. In above-mentioned existing scheme, if data change in buffer update interval twice, the data in local cache are unable to get It updates, and data cause the data in caching to have differences with real data also within term of validity, and the data in caching When being requested before next update, the data having differences with real data can be directly pulled from caching, and return to use Family causes the real-time of pulling data and accuracy poor.Accordingly, it is desirable to provide more reliable or more effective scheme, to guarantee While using caching mechanism, the real-time and accuracy of pulling data are improved.
Summary of the invention
This application provides a kind of data pull method, equipment and storage mediums, can guarantee number using caching mechanism According to library stability and data pull efficiency while, effectively improve the real-time and accuracy of the data pulled.
On the one hand, this application provides a kind of data pull methods, which comprises
Receive the data acquisition request of requesting party;
When the data acquisition request requested data includes the object data of failure state in local cache, from data Library obtains the data acquisition request requested data;
The requested data obtained from the database is sent to the requesting party;
Wherein, the failure state of the object data includes being arranged using following manner:
Obtain real-time behavior event;
Determine the object data that the behavior event is influenced;
Failure state is set by the object data influenced described in local cache, the failure state characterization is local slow The object data in depositing is unavailable.
On the other hand a kind of data pull equipment is provided, the equipment includes processor and memory, the memory In be stored at least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, described at least one Duan Chengxu, the code set or instruction set are loaded by the processor and are executed to realize such as above-mentioned data pull method.
On the other hand a kind of computer readable storage medium is provided, at least one finger is stored in the storage medium Enable, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or Instruction set is loaded by processor and is executed to realize such as above-mentioned data pull method.
Data pull method, equipment and storage medium provided by the present application, have the following technical effect that
The application is straight by the object data for having occurred and that variation in local cache by being in advance based on real-time behavioral data It connects and is set as failure state, the real-time of data in caching is effectively ensured, and without carrying out the operation such as data deletion, can be improved The treatment effeciency that data mode controls in caching.It, can when the object data in local cache is requested before next update Directly to get newest object data from database, realize in the stability and data for guaranteeing database using caching mechanism While the efficiency pulled, the real-time and accuracy of the data pulled are effectively improved.
Detailed description of the invention
It in ord to more clearly illustrate embodiments of the present application or technical solution in the prior art and advantage, below will be to implementation Example or attached drawing needed to be used in the description of the prior art are briefly described, it should be apparent that, the accompanying drawings in the following description is only It is only some embodiments of the present application, for those of ordinary skill in the art, without creative efforts, It can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is a kind of schematic diagram of application environment provided by the embodiments of the present application;
Fig. 2 is a kind of flow diagram of data pull method provided by the embodiments of the present application;
Fig. 3 is that a kind of assets of game application provided by the embodiments of the present application show the schematic diagram at interface;
Fig. 4 is the schematic diagram of the object data storage in a kind of local cache provided by the embodiments of the present application;
Fig. 5 is that a kind of object data being provided in the local cache of status information provided by the embodiments of the present application stores Schematic diagram;
Fig. 6 is that the assets of another game application provided by the embodiments of the present application show the schematic diagram at interface;
Fig. 7 is a kind of schematic diagram of data pull system provided by the embodiments of the present application;
Fig. 8 is the flow diagram of another data pull method provided by the embodiments of the present application;
Fig. 9 is the schematic diagram of another data pull system provided by the embodiments of the present application;
Figure 10 is the flow diagram of another data pull method provided by the embodiments of the present application;
Figure 11 is the flow diagram of another data pull method provided by the embodiments of the present application;
Figure 12 is a kind of schematic diagram of data pull device provided by the embodiments of the present application;
Figure 13 is a kind of structural schematic diagram of server provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, those of ordinary skill in the art without making creative work it is obtained it is all its His embodiment, shall fall in the protection scope of this application.
It should be noted that the description and claims of this application and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to embodiments herein described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, containing the process, method of a series of steps or units, system, product or server need not limit In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce The other step or units of product or equipment inherently.
Referring to Fig. 1, Fig. 1 is a kind of schematic diagram of application environment provided by the embodiments of the present application, as shown in Figure 1, this is answered Client 01, request of data side 02, server 03 and database 04 are included at least with environment.
In this specification embodiment, the client 01 may include the software run in entity device, such as certain The application etc. that service provider provides also may include the smart phone for being equipped with application, desktop computer, tablet computer, notebook electricity The entity device of the types such as brain, digital assistants, intelligent wearable device.The operation run in client 01 in the embodiment of the present application System can include but is not limited to Android system, IOS system, linux, windows etc..Specifically, the client 01 can be with Server 02 is reported to for recording behavior event, and by behavior event.
In this specification embodiment, request of data side 02 can be client corresponding to the server 03, specifically, The client may include the software run in entity device, such as the application etc. that certain service providers provide, and also can wrap Include the smart phone for being equipped with application, desktop computer, tablet computer, laptop, digital assistants, intelligent wearable device etc. The entity device of type.The operating system run in client 01 in the embodiment of the present application can include but is not limited to Android system System, IOS system, linux, windows etc..Specifically, the request of data side 02 can be used for initiating to server 03 to institute State the data acquisition request of the related data of the corresponding application of client 01.
In this specification embodiment, the server 03 may include an independently operated server, or distributed Server, or the server cluster being made of multiple servers.The server 03 is provided with local cache, and the local is slow Store the related data in the corresponding application of client 01.Data in the local cache can be stored using key assignments type Mode.Specifically, the behavior event that the server 03 can be used for reporting based on client 01 is to the data in local cache (in this specification embodiment, the state control to data in caching may include being to the data in caching to the control of carry out state No can be used is configured).And for the data acquisition request in response to requesting party 02, timeliness is carried out in conjunction with Behavior-based control event It is data cached under control, pulling for data is realized, to return to the requesting party 02.
In this specification embodiment, the database 04 may include non-relational database NoSQL, also may include closing It is type database MySQL.Specifically, the database 03 can be used for storing the dependency number in the corresponding application of client 01 According to.Server 02 can obtain data from the database 03, and store into local cache.
In this specification embodiment, the corresponding application of the client 01 application corresponding with server 02 can be same Using, or different applications.When the corresponding application of the client 01 application corresponding with server 02 is same answers Used time, the client 01 and requesting party 02 can be same client.
Specifically, the client that such as client 01 is certain game application, correspondingly, server 02 can answer for the game Background server.In addition, server 02 may be to show the trip when client 01 is the client of certain game application The background server of the application of related datas such as user's pet name, grade, military success, stage property in play application.
The application is introduced for different applications from the corresponding application of server 02 below in conjunction with the corresponding application of client 01 A kind of data pull method, Fig. 2 are a kind of flow diagram of data pull method provided by the embodiments of the present application, this specification The method operating procedure as described in embodiment or flow chart is provided, but may include based on routine or without creative labor More or less operating procedure.The step of enumerating in embodiment sequence is only one of numerous step execution sequences side Formula does not represent and unique executes sequence.It, can be according to embodiment or shown in the drawings when system product in practice executes Method sequence executes or parallel execution (such as environment of parallel processor or multiple threads).As shown in Fig. 2, being situated between first The embodiment of data cached state control during the data pull that continues, specifically, the method may include:
S201: the first applications client sends the data of real-time behavior event to the second application server.
In this specification embodiment, first applications client corresponds to the first application, second application server The second application is corresponded to, first application is different applications from second application.
In practical applications, the first applications client can to the data that the second application server sends real-time behavior event To include that the first applications client will be sent to the second application server in the data of the behavior event locally occurred in real time.Specifically , here be that behavior event is sent to the time of the second application server relative to behavior thing by the first applications client in real time The time interval of part time of origin, specifically, the time interval can be in conjunction with the first applications client and second in practical application Transmission performance between the equipment performance of application server and the first applications client and the second application server determines.Generally , which is a lesser numerical value, such as 0.001ms.
In practical applications, behavior event may include operation behavior of the user in the first applications client, such as Fig. 3 institute Show, such as when the first application is certain game application, user can be added the assets in game in the game application, specifically , as shown in 3 figures, assets may include the equipment used in the game process such as pistol, grenade and gold coin quantity (9538) Deng.As shown in figure 3, user can by click figure in first click addition button (in Fig. 3 be located at GLOCK-18 and Button between GRENADE) realize the addition operation of triggering pistol, correspondingly, when pistol add successfully, first apply it is objective Family end can send the behavior event that pistol adds to the second application server.
In this specification embodiment, behavior event is reported to the second application server in real time by the first applications client, It can guarantee that the second application server can obtain the behavior event that will cause the data variation in local cache in time.
S203: the second application server determines the object data that the behavior event is influenced.
In practical applications, different behavior events frequently can lead to the variation of different object datas, correspondingly, this theory In bright book embodiment, the object data that real-time behavior event is influenced may include leading to variation because of the real-time behavior event Data.
Specifically, the object data that the determination behavior event is influenced may include: the determining behavior event Referent data when generation;When the referent data change after behavior event generation, will send out The object data that the object data for changing is influenced as the behavior event.
In a specific embodiment, in conjunction with the corresponding embodiment of above-mentioned Fig. 3, the behavior event of pistol addition occurred Object data involved in journey may include: the purchaser record of item lists and user in user's assets information, and pistol adds Behavior event occur after, will lead to the purchaser record of item lists and user in user's assets information and cause to change, correspondingly, It can determine the number of objects that the behavior event that item lists and purchaser record are added by pistol in user's assets information influences According to.
In addition, behavior event referent data might not centainly change after the generation of behavior event, in reality In the application of border, some behavior event referent data can not change or behavior event after the generation of behavior event The partial objects data being related to can not change after the generation of behavior event.
In this specification embodiment, by the analysis to real-time behavior event, behavior event can be timely determined The object data influenced, so that the object data influenced in time on this in caching carries out state control.
The object data influenced described in local cache is set failure state by S205: the second application server.
In this specification embodiment, status information can be set for object data in local cache, the status information can To include effective status and failure state, specifically, the failure state can characterize the object data in local cache It is unavailable.It is available that the effective status can characterize the object data in caching.
Specifically, the object data that will be influenced described in local cache is set as failure state may include:
1) status indicator of the influenced object data is determined from the local cache.
In this specification embodiment, the status information of object data can be determined by status indicator.In practical application In, it, can be corresponding right based on user's storage in this specification embodiment since the object data of different user is often also different Image data.In addition, behavior event also tends to correspond to a certain user, correspondingly, the object data that behavior event is influenced is also right It answers a user, in this specification embodiment, can determine the object data influenced from caching in conjunction with user, in turn The status indicator of the object data is found based on object data.
2) default value is set by the status indicator, the status indicator of the default value characterizes the object data For failure state.
Specifically, the default value can be configured in conjunction with practical application, such as by the status indicator of object data It is set as 0, to characterize the object data in local cache as failure state.Conversely, for example by the status indicator of object data It is set as 1, to characterize the object data in local cache as effective status.
In a specific embodiment, by certain game it is data cached for.As shown in figure 4, the number of objects in caching According to key assignments type storage mode can be used, specifically, corresponding object data can be stored based on user.Fig. 4, military success list and The data, item lists and purchaser record that military success record belongs to user's military success info class belong to the number of user's assets information class The data of userspersonal information's class are belonged to according to, experience level and pet name head portrait.It, can will be same correspondingly, as can be seen from Fig. 4 Class object data, which are put together, to be stored.
In addition, it should be noted that, the storage mode of the object data in local cache shown in Fig. 4 is only that one kind is shown Example, can also use other modes in practical applications, and this specification embodiment is not limited with above-mentioned.
In a specific embodiment, in conjunction with the embodiment of above-mentioned Fig. 3 and Fig. 4, it is assumed that user 1 has carried out pistol addition Operation, correspondingly, in real time behavior event be pistol add, the object data that behavior event is influenced includes user 1 Item lists and purchaser record in user's assets information can set failure state for item lists and purchaser record, it is assumed that It is S by the status indicator of the object data in caching, and the status indicator and object data are stored in identical position.Specifically , as shown in Figure 5, wherein the item lists of user 1 and the status indicator S=0 of purchaser record can characterize the article of user 1 List and purchaser record are unavailable.
In this specification embodiment, by caching because the real-time changed object data of behavior event is directly set It is set to failure state, without carrying out the operation such as data deletion, the treatment effeciency of data mode control in caching can be improved, realize Rapidly and efficiently failure setting carried out to the data having had differences with real data in local cache, and then can be to avoid slow When the object data deposited is requested before next update, has differences with real data in return cache and but still exist The real-time of data available in caching is effectively ensured in data in term of validity.
In further embodiments, it is contemplated that in practical application, limited storage space in caching, often using advanced The dispatching algorithms such as first go out, be minimum recently, least commonly use recently determine cache in the object data that may store.Correspondingly, can The object data that can there is a situation where that a certain real-time behavior event is influenced is not stored in local cache.Correspondingly, Before the object data influenced described in local cache is set failure state by the second application server, it can be determined that this Whether ground caching includes the influenced object data, can when judging in caching includes the object data influenced To set failure state for the object data influenced described in local cache.
The technical solution provided by above this specification embodiment is as it can be seen that the first applications client of this specification will be real-time Behavior event is reported to the second application server, will cause in local cache so that the second application server can obtain in time The behavior event of data variation, and by the analysis to behavior event, the object data that the behavior event of determining is influenced;It connects , the second application server has by setting failure state for the object data that behavior event is influenced in local cache Effect guarantees the real-time of data in caching, and without carrying out the operation such as data deletion, data mode control in caching can be improved Treatment effeciency.
It is mainly introduced in data pull method above and state control is carried out to data in caching based on real-time behavior event Embodiment, in conjunction with it is above-mentioned based on real-time behavior event in caching data carry out state control embodiment, it is introduced below Data pull scheme in this specification embodiment when receiving request of data, specifically, as shown in Fig. 2, the data are drawn Taking method can also include:
S207: the second applications client sends data acquisition request to second application server.
In this specification embodiment, the data acquisition request may include asking to the acquisition of the data in the first application It asks.
S209: the second application server judges whether the data acquisition request requested data includes the shape that fails in caching The object data of state.
In this specification embodiment, when the second application server receives data acquisition request, the data can be first judged Acquisition request requested data whether include caching in failure state object data, so as to determination number is directly obtained from caching According to, or data are obtained from database.
Specifically, when judging data acquisition request requested data includes the object data of failure state in caching, Step S211 can be executed.Conversely, when pair that judge data acquisition request requested data not and include failure state in caching When image data, step S217 can be executed.
S211: the second application server sends data acquisition request to the first application database.
S213: the first application database sends requested data to second application server.
S215: the second application server is obtained to second applications client transmission from first application database The requested data.
S217: the second application server judges whether the data acquisition request requested data includes effective shape in caching The object data of state.
Specifically, step can be executed when judging requested data includes the object data of effective status in caching S219, conversely, step S211 can be executed.
In addition, it should be noted that, step S217 can be executed after receiving data acquisition request;When judging Data acquisition request requested data is stated not and include the object data of effective status in caching, directly can apply data from first Requested data is obtained in library.
S219: the second application server obtains the data acquisition request requested data from local cache.
S221: the second application server sends described being asked of obtaining from local cache to second applications client Seek data.
By the technical solution that is provided with above-mentioned this specification embodiment as it can be seen that this specification is by being in advance based on real-time row Failure state is set by the object data for having occurred and that variation in local cache for data, the number of objects in local cache When according to being requested before next update, newest object data directly can be got from database, improve pulling data Real-time and accuracy, meanwhile, it, can be directly from local when requested data includes the data of effective status in local cache The stability of database and the efficiency of data pull has been effectively ensured in pulling data in caching.
In further embodiments, as shown in connection with fig. 2, the data pull method in this specification embodiment can also include Update to object data in caching, specifically, the method can also include:
S223: the second application server is based in the requested data update local cache and institute's number of request According to corresponding object data.
The object data corresponding with the requested data is set effective shape by S225: the second application server State.
In addition, it should be noted that, when data acquisition request requested data includes the number of objects of failure state in caching According to, and further include caching in effective status data when, can will be obtained from the requested data and caching that database obtains The requested data taken returns to the second applications client together.
Specifically, in conjunction with the embodiment of above-mentioned Fig. 3, it is assumed that real-time behavior event is that REVOLVER-M1917 pistol adds Add, the object data that behavior event is influenced includes item lists and purchaser record in user's assets information, it is assumed that in behavior After event occurs, with the request for receiving displaying user's assets information before item lists and purchaser record next update in caching (data acquisition request), correspondingly, the data pull scheme based on this specification, the item lists in caching are arranged to fail State, after receiving the request for showing user's assets information, the second application server can obtain gold coin etc. from caching User's assets information, in addition, the item lists (object data) into the first application database request user's assets information.It connects , whole user's assets informations is returned into the second applications client, as shown in fig. 6, the second applications client can and When the accurate user's assets information of display.
In addition, it should be noted that, it is too many when there is user's assets information, when can not be shown in an interface, such as object Pistol in product list is too many, can successively show whole user's assets informations using modes such as slidings.
Below in conjunction with the embodiment of Fig. 2, a kind of data pull system of this specification embodiment is introduced.Specifically, such as Fig. 7 institute Show, the data pull system may include the first applications client 100, the second applications client 200, the second application server 300 and first application database 400.
Based on the data pull system realize data pull detailed process may include:
First applications client 100 reports real-time behavior event to the second application server 300;Second application server 300 can determine the object data that real-time behavior event is influenced, and the object data in caching is set as failing State.
Further, the second applications client 200 sends data acquisition request to the second application server 300, and second answers With server 300 when determining the data acquisition request requested data includes the object data of failure state in caching, to First applies 400 request data of data, returns to the second applications client 200, and update local cache.
It is that the application is introduced in identical application below in conjunction with the corresponding application of client 01 application corresponding with server 02 A kind of data pull method, Fig. 8 are the flow diagram of another data pull method provided by the embodiments of the present application, this explanation Book provides the method operating procedure as described in embodiment or flow chart, but can wrap based on routine or without creative labor Include more or less operating procedure.The step of enumerating in embodiment sequence is only one of numerous step execution sequences Mode does not represent and unique executes sequence.It, can be according to shown in embodiment or attached drawing when system product in practice executes Method sequence execute or parallel execute (such as environment of parallel processor or multiple threads).As shown in figure 8, first The embodiment of the data cached state control during data pull is introduced, specifically, the method may include:
S801: third applications client sends the data of real-time behavior event to third application server.
In this specification embodiment, third applications client same application corresponding with the third application server: Third application.
S803: third application server determines the object data that the behavior event is influenced.
S805: the object data influenced described in local cache is set failure state by third application server.
In further embodiments, it is contemplated that in practical application, limited storage space in caching, often using advanced The dispatching algorithms such as first go out, be minimum recently, least commonly use recently determine cache in the object data that may store.Correspondingly, can Can there is a situation where that object data that a certain real-time behavior event is influenced is not stored in caching, correspondingly, the Three application servers set the object data influenced described in local cache to before failure state, it can be determined that local slow Whether include the influenced object data, when judging in caching includes the object data influenced, can incite somebody to action if depositing The object data influenced described in local cache is set as failure state.
The technical solution provided by above this specification embodiment is as it can be seen that this specification third applications client will be real-time Behavior event is reported to third application server, so that third application server can obtain the data that will cause in caching in time The behavior event of variation, and by the analysis to behavior event, the object data that the behavior event of determining is influenced;Then, Three application servers, which pass through, sets failure state for the object data that behavior event is influenced in caching, and caching is effectively ensured The real-time of middle data, and without carrying out the operation such as data deletion, the treatment effeciency of data mode control in caching can be improved.
In conjunction with the above-mentioned data pull scheme that based on real-time behavior event data in caching are carried out with state control, below The data pull embodiment in this specification embodiment when receiving request of data is introduced, specifically, as shown in figure 8, described Data pull method can also include:
S807: third applications client sends data acquisition request to the third application server.
In this specification embodiment, the data acquisition request may include asking to the acquisition of the data in third application It asks.
S809: the second application server judges whether the data acquisition request requested data includes the shape that fails in caching The object data of state.
Specifically, when judging data acquisition request requested data includes the object data of failure state in caching, Step S811 can be executed.Conversely, when pair that judge data acquisition request requested data not and include failure state in caching When image data, step S817 can be executed.
S811: third application server sends data acquisition request to third application database.
S813: third application database sends requested data to the third application server.
S815: third application server is obtained to third applications client transmission from the third application database The requested data.
S817: third application server judges whether the data acquisition request requested data includes effective shape in caching The object data of state.
Specifically, step can be executed when judging requested data includes the object data of effective status in caching S819, conversely, step S811 can be executed.
In addition, it should be noted that, step S817 can be executed after receiving data acquisition request;When judging The object data for stating data acquisition request requested data not and include effective status in caching, can be directly from third application data Requested data is obtained in library.
S819: third application server obtains the data acquisition request requested data from local cache.
S821: third application server sends described being asked of obtaining from local cache to the third applications client Seek data.
By the technical solution that is provided with above-mentioned this specification embodiment as it can be seen that this specification third application server pass through it is pre- Failure state is first set for the object data for having occurred and that variation in caching based on real-time behavioral data, in the buffer should When object data is requested before next update, newest object data directly can be got from database, improve and pull The real-time of data, meanwhile, it, can be directly from local slow when requested data includes the data of effective status in local cache Middle pulling data is deposited, the stability of database and the efficiency of data pull has been effectively ensured.
In further embodiments, as shown in connection with fig. 8, the data pull method in this specification embodiment can also include Update to object data in caching, specifically, the method can also include:
S823: third application server is based in the requested data update local cache and institute's number of request According to corresponding object data.
S825: the object data corresponding with the requested data is set effective shape by third application server State.
In this specification embodiment, it is available that the effective status can characterize the object data in caching.
In addition, it should be noted that, when data acquisition request requested data includes the number of objects of failure state in caching According to, and further include caching in effective status data when, can will be obtained from the requested data and caching that database obtains The requested data taken returns to second applications client together.
Below in conjunction with the embodiment of Fig. 8, a kind of data pull system of this specification embodiment is introduced.Specifically, such as Fig. 9 institute Show, the data pull system may include third applications client 500, third application server 600 and third application number According to library 700.
Realizing data pull based on the data pull system, detailed process is as follows:
Third applications client 500 reports real-time behavior event to third application server 600;Third application server 600 can determine the object data that real-time behavior event is influenced, and the object data in caching is set as failing State.
Further, third applications client 500 sends data acquisition request to third application server 600, and third is answered With server 600 when determining the data acquisition request requested data includes the object data of failure state in caching, to 700 request data of third application data, returns to third applications client 500, and update local cache.
Figure 10 is the flow diagram of another data pull method provided by the embodiments of the present application, present description provides Method operating procedure as described in embodiment or flow chart, but based on it is conventional or without creative labor may include it is more or The less operating procedure of person.The step of enumerating in embodiment sequence is only one of numerous step execution sequences mode, no It represents and unique executes sequence.When system in practice, server or client production execute, can according to embodiment or Method sequence shown in the drawings executes or parallel execution (such as environment of parallel processor or multiple threads).Specifically As shown in Figure 10, the method may include:
S1001: the data acquisition request of requesting party is received.
In this specification embodiment, the requesting party may include local server or the corresponding client of local system.
S1003: when the data acquisition request requested data includes the object data of failure state in local cache, The data acquisition request requested data is obtained from database.
Specifically, obtaining the data acquisition request requested data from database here may include sending number to data According to acquisition request, the requested data that database returns is received.
Specifically, the failure state of object data may include being arranged using following manner:
1) real-time behavior event is obtained.
In this specification embodiment, the behavior event may include operation behavior.In this specification embodiment, obtain real When the executing subject of behavior event can be server, correspondingly, described, to obtain real-time behavior event may include: to receive The data for the real-time behavior event that client is sent.Specifically, the corresponding application of the client is right with local (server) The application answered can be different application, or identical application.Here client can be the real-time behavior of generation The client of event.Here server can have the service of the related data of the corresponding application of the client for local cache storage Device.
In further embodiments, the executing subject for obtaining real-time behavior event may be client, accordingly , it is described to obtain the data that real-time behavior event may include: the real-time behavior event that reception server is sent.Specifically , the corresponding application of server application corresponding from local (client) can be different application, or identical Application.Here server can be the server of the real-time behavior event of generation, or real-time behavior event occurs The corresponding background server of client.Here client can have the correlation of the corresponding application of the server for local cache storage The client of data.
2) object data that the behavior event is influenced is determined.
Specifically, referent data when the behavior event occurs can be determined;When the referent data When changing after behavior event generation, pair that changed object data is influenced as the behavior event Image data.
3) failure state is set by the object data influenced described in local cache, the failure state characterization is local The object data in caching is unavailable.
Specifically, can determine the status indicator of the influenced object data from the local cache;It will be described Status indicator is set as default value, and it is failure state that the status indicator of the default value, which characterizes the object data,.
In some embodiments before setting failure state for the object data influenced described in local cache, institute The method of stating can also include:
Judge whether local cache includes the influenced object data;
When the result judged is is, executes and set failure state for the object data influenced described in local cache The step of.
S1005: Xiang Suoshu requesting party sends the requested data obtained from the database.
In some embodiments, as shown in figure 11, the method can also include:
S1007: object corresponding with the requested data in the local cache is updated based on the requested data Data;
S1009: effective status, the effective status are set by the object data corresponding with the requested data The object data characterized in local cache is available.
In some embodiments, as shown in figure 11, the method also includes:
S1011: when the data acquisition request requested data includes the object data of effective status in local cache, The data acquisition request requested data is obtained from local cache.
S1013: Xiang Suoshu requesting party sends the requested data obtained from the local cache.
By the technical solution of above this specification embodiment offer as it can be seen that this specification is by being in advance based on real-time behavior The object data that variation is had occurred and that in local cache is directly disposed as failure state by data, and data in caching are effectively ensured Real-time, and without carrying out the operation such as data deletion, the treatment effeciency of data mode control in caching can be improved.Locally slow When the object data deposited is requested before next update, newest object data directly can be got from database, mentioned The real-time of pulling data has been risen, and has been obtained based on database and updates caching, the real-time of data in caching is effectively ensured;Separately Outside, when requested data includes the data of effective status in local cache, can directly from local cache pulling data, have Effect ensure that the stability of database and the efficiency of data pull.
The embodiment of the present application also provides a kind of data pull devices, as shown in figure 12, the apparatus may include:
Data acquisition request receiving module 1210 can be used for receiving the data acquisition request of requesting party;
First request data obtains module 1220, can be used for when the data acquisition request requested data including local In caching when the object data of failure state, the data acquisition request requested data is obtained from database;
Request data sending module 1230 can be used for sending the institute obtained from the database to the requesting party Request data;
Wherein, the failure state of the object data includes being arranged using following modules:
Behavior event obtains module, can be used for obtaining real-time behavior event;
Object data determining module is determined for the object data that the behavior event is influenced;
First state setup module, the object data that can be used for be influenced described in local cache are set as failure shape State, the object data that the failure state characterizes in local cache are unavailable.
In some embodiments, the object data determining module may include:
First object data determination unit, referent data when for determining that the behavior event occurs;
Second object data determination unit, for occurring after behavior event generation when the referent data When variation, object data that changed object data is influenced as the behavior event.
In some embodiments, the object data determining module includes:
Status indicator determination unit, for determining the state mark of the influenced object data from the local cache Know;
Failure state setting unit, for setting default value, the state of the default value for the status indicator It is failure state that mark, which characterizes the object data,.
In some embodiments, described device can also include:
Buffer update module can be used for being updated in the local cache based on the requested data and be requested with described The corresponding object data of data;
Second state setting module can be used for for the object data corresponding with the requested data being provided with Effect state, it is available that the effective status characterizes the object data in local cache.
In some embodiments, described device can also include:
Judgment module can be used for judging whether local cache includes the influenced object data;
Third state setup module can be used for when the result that the judgment module judges is is, will be in local cache The influenced object data is set as failure state.
In some embodiments, the behavior event obtains module and is specifically used for receiving the reality of client or server transmission When behavior event data.
In some embodiments, the client or corresponding apply of the server can be with local corresponding application Different applications or identical application.
In some embodiments, described device can also include:
Second request data obtains module, for including having in local cache when the data acquisition request requested data When the object data of effect state, the data acquisition request requested data is obtained from local cache;
Apparatus and method embodiment in the Installation practice is based on similarly inventive concept.
The embodiment of the present application provides a kind of data pull equipment, which includes processor and memory, At least one instruction, at least a Duan Chengxu, code set or instruction set are stored in the memory, this at least one instruction, this extremely A few Duan Chengxu, the code set or instruction set are loaded as the processor and are executed to realize as provided by above method embodiment Data pull method.
Memory can be used for storing software program and module, and processor is stored in the software program of memory by operation And module, thereby executing various function application and data processing.Memory can mainly include storing program area and storage number According to area, wherein storing program area can application program needed for storage program area, function etc.;Storage data area can store basis The equipment uses created data etc..In addition, memory may include high-speed random access memory, can also include Nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Phase Ying Di, memory can also include Memory Controller, to provide access of the processor to memory.
Embodiment of the method provided by the embodiment of the present application can be in server, mobile terminal, terminal or class As execute in arithmetic unit.For running on the server, Figure 13 is a kind of data pull provided by the embodiments of the present application The hardware block diagram of the server of method.As shown in figure 13, which can generate ratio because configuration or performance are different Biggish difference may include one or more central processing units (Central Processing Units, CPU) 1310 (processing unit that processor 1310 can include but is not limited to Micro-processor MCV or programmable logic device FPGA etc.) is used for The memory 1330 of storing data, the storage medium 1320 of one or more storage application programs 1323 or data 1322 (such as one or more mass memory units).Wherein, memory 1330 and storage medium 1320 can be of short duration storage Or persistent storage.The program for being stored in storage medium 1320 may include one or more modules, and each module can wrap It includes to the series of instructions operation in server.Further, central processing unit 1310 can be set to and storage medium 1320 communications execute the series of instructions operation in storage medium 1320 on server 1300.Server 1300 can also wrap One or more power supplys 1360 are included, one or more wired or wireless network interfaces 1350, one or more Input/output interface 1340, and/or, one or more operating systems 1321, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Input/output interface 1340 can be used for that data are received or sent via a network.Above-mentioned network is specifically real Example may include the wireless network that the communication providers of server 1300 provide.In an example, input/output interface 1340 wraps A network adapter (Network Interface Controller, NIC) is included, base station and other network equipments can be passed through It is connected so as to be communicated with internet.In an example, input/output interface 1340 can be radio frequency (Radio Frequency, RF) module, it is used to wirelessly be communicated with internet.
It will appreciated by the skilled person that structure shown in Figure 13 is only to illustrate, above-mentioned electronics is not filled The structure set causes to limit.For example, server 1300 may also include more perhaps less component or tool than shown in Figure 13 There is the configuration different from shown in Figure 13.
Embodiments herein additionally provides a kind of storage medium, and the storage medium may be disposed among equipment to save For realizing relevant at least one instruction of data pull method a kind of in embodiment of the method, an at least Duan Chengxu, code set or Instruction set, at least one instruction, an at least Duan Chengxu, the code set or the instruction set are loaded by the processor and are executed with reality The data pull method that existing above method embodiment provides.
Optionally, in the present embodiment, above-mentioned storage medium can be located in multiple network servers of computer network At least one network server.Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, only Read memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), movement The various media that can store program code such as hard disk, magnetic or disk.
By the embodiment of above-mentioned data pull method, apparatus provided by the present application, equipment or storage medium as it can be seen that the application In the object data for having occurred and that variation in local cache is directly disposed as failing by being in advance based on real-time behavioral data The real-time of data in caching is effectively ensured in state, and without carrying out the operation such as data deletion, data shape in caching can be improved The treatment effeciency of state control.It, can be directly from data when the object data in local cache is requested before next update Library gets newest object data, improves the real-time of pulling data, and obtain based on database and update caching, effectively protects The real-time of data in card caching;In addition, when requested data includes the data of effective status in local cache, it can be direct The stability of database and the efficiency of data pull has been effectively ensured in the pulling data from local cache.
It should be understood that above-mentioned the embodiment of the present application sequencing is for illustration only, do not represent the advantages or disadvantages of the embodiments. And above-mentioned this specification specific embodiment is described.Other embodiments are within the scope of the appended claims.One In a little situations, the movement recorded in detail in the claims or step can be executed according to the sequence being different from embodiment and Still desired result may be implemented.In addition, process depicted in the drawing not necessarily requires the particular order shown or company Continuous sequence is just able to achieve desired result.In some embodiments, multitasking and parallel processing it is also possible or It may be advantageous.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system, For server, equipment and computer storage medium embodiment, since it is substantially similar to the method embodiment, so the ratio of description Relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely the preferred embodiments of the application, not to limit the application, it is all in spirit herein and Within principle, any modification, equivalent replacement, improvement and so on be should be included within the scope of protection of this application.

Claims (10)

1. a kind of data pull method, which is characterized in that the described method includes:
Receive the data acquisition request of requesting party;
When the data acquisition request requested data includes the object data of failure state in local cache, obtained from database Take the data acquisition request requested data;
The requested data obtained from the database is sent to the requesting party;
Wherein, the failure state of the object data includes being arranged using following manner:
Obtain real-time behavior event;
Determine the object data that the behavior event is influenced;
Failure state is set by the object data influenced described in local cache, the failure state characterizes in local cache The object data it is unavailable.
2. the method according to claim 1, wherein the object data that the determination behavior event is influenced Include:
Determine referent data when the behavior event occurs;
When the referent data change after behavior event generation, changed object data is made The object data influenced by the behavior event.
3. the method according to claim 1, wherein the object data that will be influenced described in local cache Being set as failure state includes:
The status indicator of the influenced object data is determined from the local cache;
Default value is set by the status indicator, it is failure that the status indicator of the default value, which characterizes the object data, State.
4. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
Object data corresponding with the requested data in the local cache is updated based on the requested data;
Effective status is set by the object data corresponding with the requested data, the effective status characterization is local slow The object data in depositing is available.
5. method according to any one of claims 1 to 3, which is characterized in that in pair that will be influenced described in local cache Image data is set as before failure state, the method also includes:
Judge whether local cache includes the influenced object data;
When the result judged is is, the step for setting the object data influenced described in local cache to failure state is executed Suddenly.
6. method according to any one of claims 1 to 3, which is characterized in that described to obtain real-time behavior event and include:
Receive the data of the real-time behavior event of client or server transmission.
7. according to the method described in claim 6, it is characterized in that, the client or the corresponding application of the server and sheet The corresponding application in ground is different application or identical application.
8. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
When the data acquisition request requested data includes the object data of effective status in local cache, from local cache Obtain the data acquisition request requested data.
9. a kind of data pull equipment, which is characterized in that the equipment includes processor and memory, is stored in the memory Have at least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, The code set or instruction set are loaded by the processor and are executed to realize that data as described in any of the claims 1 to 8 are drawn Take method.
10. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, extremely in the storage medium A few Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or instruction Collection is loaded by processor and is executed to realize data pull method as described in any of the claims 1 to 8.
CN201910300131.4A 2019-04-15 2019-04-15 A kind of data pull method, equipment and storage medium Pending CN110147480A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910300131.4A CN110147480A (en) 2019-04-15 2019-04-15 A kind of data pull method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910300131.4A CN110147480A (en) 2019-04-15 2019-04-15 A kind of data pull method, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110147480A true CN110147480A (en) 2019-08-20

Family

ID=67588520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910300131.4A Pending CN110147480A (en) 2019-04-15 2019-04-15 A kind of data pull method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110147480A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597163A (en) * 2020-12-25 2021-04-02 珠海金山网络游戏科技有限公司 Data processing system, method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030163550A1 (en) * 2002-02-22 2003-08-28 Microsoft Corporation Opportunistic directory cache
CN101090401A (en) * 2007-05-25 2007-12-19 金蝶软件(中国)有限公司 Data buffer store method and system at duster environment
US20130006931A1 (en) * 2011-07-01 2013-01-03 International Business Machines Corporation Data quality monitoring
CN108334505A (en) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 A kind of data processing method, device, server and inventory system
CN109284066A (en) * 2017-07-19 2019-01-29 阿里巴巴集团控股有限公司 A kind of data processing method, device, equipment and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030163550A1 (en) * 2002-02-22 2003-08-28 Microsoft Corporation Opportunistic directory cache
CN101090401A (en) * 2007-05-25 2007-12-19 金蝶软件(中国)有限公司 Data buffer store method and system at duster environment
US20130006931A1 (en) * 2011-07-01 2013-01-03 International Business Machines Corporation Data quality monitoring
CN108334505A (en) * 2017-01-19 2018-07-27 阿里巴巴集团控股有限公司 A kind of data processing method, device, server and inventory system
CN109284066A (en) * 2017-07-19 2019-01-29 阿里巴巴集团控股有限公司 A kind of data processing method, device, equipment and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597163A (en) * 2020-12-25 2021-04-02 珠海金山网络游戏科技有限公司 Data processing system, method and device
CN112597163B (en) * 2020-12-25 2024-05-28 珠海金山数字网络科技有限公司 Data processing system, method and device

Similar Documents

Publication Publication Date Title
US9304760B2 (en) Identifying software code experts
US10264120B2 (en) Automated data collection and analytics
JP5371572B2 (en) Similarity calculation device, recommended POI determination device, POI recommendation system, similarity calculation method, and program
CN117203612A (en) Intelligent generation and management of computing device application updated estimates
US9727201B2 (en) Contextual help
CN107357932B (en) File storage method and device
CN112966438A (en) Machine learning algorithm selection method and distributed computing system
US11379539B2 (en) Efficient freshness crawl scheduling
US20190347621A1 (en) Predicting task durations
CN106844744B (en) Click model application method and device and search system
CN111405030A (en) Message pushing method and device, electronic equipment and storage medium
CN110147480A (en) A kind of data pull method, equipment and storage medium
US11607167B2 (en) User device based parkinson disease detection
CN111913759A (en) Method, apparatus, computing device, and medium for controlling execution of application program
CN106371853A (en) Learning application program starting method and device
KR102596273B1 (en) The method and appartus for scheduling of medical device based on medical device characteristics and medical personnel operation experience
JPWO2012124064A1 (en) File sharing method and terminal
CN111564165B (en) Data storage method, device, equipment and storage medium
CN113242457B (en) Resource distribution method and device, electronic equipment and storage medium
CN111612280B (en) Data analysis method and device
CN109639783A (en) A kind of method, server, the client of determining location information
CN114756788A (en) Cache updating method, device, equipment and storage medium
JP7185093B1 (en) Information processing device, information processing method and program
Sathyaraja Crowdsourcing Available Parking and Available Storage Using Smartphones
CN114549049A (en) Advertisement effect prediction system based on big data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination