CN110019256A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN110019256A
CN110019256A CN201710655952.0A CN201710655952A CN110019256A CN 110019256 A CN110019256 A CN 110019256A CN 201710655952 A CN201710655952 A CN 201710655952A CN 110019256 A CN110019256 A CN 110019256A
Authority
CN
China
Prior art keywords
data
mentioned
under
preset path
application
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
CN201710655952.0A
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.)
Xi'an Jingxundi Supply Chain Technology Co ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710655952.0A priority Critical patent/CN110019256A/en
Publication of CN110019256A publication Critical patent/CN110019256A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

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

Abstract

The embodiment of the present application discloses data processing method and device, the specific real-time mode of the one of this method includes: the more new command in response to receiving the first data including being provided with the first Data Identification, it is determined that whether there is Data Identification historical data identical with first Data Identification under local preset path;The historical data if it exists, the historical data under the preset path is then revised as first data, and the more new information including first data is sent to the Information Push Server connected, so that first data are sent to using each application in group by the Information Push Server, wherein, this is the application for including the historical data using each application in group.This embodiment improves data updating efficiencies.

Description

Data processing method and device
Technical field
This application involves field of computer technology, and in particular to Internet technical field more particularly to data processing method And device.
Background technique
Existing data processing method is in data more new technological process, usually by historical data to be updated in back-end data It is directly updated in library.However, existing application (such as the application being deployed in server-side) is most of to have data buffer storage Function, such as can be by used data buffer storage on the electronic equipment at place.This has been cached with if it exists to be updated to go through The application of history data, then the historical data to be updated that the application is read from the electronic equipment at place is often out of date Data.
Summary of the invention
The purpose of the embodiment of the present application is to propose a kind of improved data processing method and device, to solve background above The technical issues of technology segment is mentioned.
In a first aspect, the embodiment of the present application provides a kind of data processing method, this method comprises: in response to receiving packet Include the more new command for being provided with the first data of the first Data Identification, it is determined that whether there is data mark under local preset path Know historical data identical with above-mentioned first Data Identification, wherein every data under above-mentioned preset path is provided with data mark Know;Above-mentioned historical data under above-mentioned preset path is then revised as above-mentioned first data by above-mentioned historical data if it exists, and to The Information Push Server connected sends the more new information including above-mentioned first data, so that above- mentioned information push server will Above-mentioned first data are sent to using each application in group, wherein each application in above-mentioned application group be include above-mentioned go through The application of history data.
In some embodiments, above-mentioned first data are revised as in the above-mentioned above-mentioned historical data by under above-mentioned preset path Later, the above method further include: by the above-mentioned historical data in the cache server cluster and/or database server that are connected It is revised as above-mentioned first data.
In some embodiments, the above method further include: in response to above-mentioned history is not present under the above-mentioned preset path of determination Then above-mentioned first data are written under above-mentioned preset path for data, and above-mentioned cache server collection is written in above-mentioned first data Group and/or above-mentioned database server.
In some embodiments, before under the above-mentioned above-mentioned preset path by the write-in of above-mentioned first data, the above method is also Comprise determining that whether the data under above-mentioned preset path meet preset condition, if satisfied, then to the data under above-mentioned preset path Be purged operation, wherein above-mentioned preset condition is following any one: data count mesh is empty beyond quantity threshold, total occupancy Between exceed occupied space threshold value.
In some embodiments, the above-mentioned data under above-mentioned preset path are purged operation, comprising: use present count The data under above-mentioned preset path are removed according to algorithm is removed, wherein it is following any one that above-mentioned preset data, which removes algorithm: most It is close at least to use lru algorithm, recently least common LFU algorithm, fifo fifo algorithm.
In some embodiments, the above method further include: periodically empty the data under above-mentioned preset path.
In some embodiments, the above method further include: in response to receiving the data query including the second Data Identification Instruction, it is determined that with the presence or absence of target data indicated by above-mentioned second Data Identification under above-mentioned preset path;It is above-mentioned if it exists Target data then obtains above-mentioned target data and is returned under above-mentioned preset path.
In some embodiments, the above method further include: in response to above-mentioned target is not present under the above-mentioned preset path of determination Data then further determine that in above-mentioned cache server cluster with the presence or absence of above-mentioned target data;In response to the above-mentioned caching of determination There are above-mentioned target datas in server cluster, then obtain above-mentioned target data from above-mentioned cache server cluster and returned It returns, above-mentioned target data is written under above-mentioned preset path.
In some embodiments, the above method further include: in response to there is no upper in the above-mentioned cache server cluster of determination Target data is stated, then is further determined that in above-mentioned database server with the presence or absence of above-mentioned target data;If above-mentioned database clothes Being engaged in device, there are above-mentioned target datas, then obtain above-mentioned target data from above-mentioned database server and returned, will be above-mentioned Target data is written under above-mentioned preset path and/or above-mentioned cache server cluster.
In some embodiments, before under the above-mentioned above-mentioned preset path by the write-in of above-mentioned target data, the above method is also Comprise determining that whether the data under above-mentioned preset path meet above-mentioned preset condition, if satisfied, then under above-mentioned preset path Data are purged operation.
Second aspect, the embodiment of the present application provide a kind of data processing equipment, which includes: the first determination unit, It is configured to the more new command in response to receiving the first data including being provided with the first Data Identification, it is determined that local is pre- If whether there is Data Identification historical data identical with above-mentioned first Data Identification under path, wherein under above-mentioned preset path Every data be provided with Data Identification;Processing unit is configured to above-mentioned historical data if it exists, then by above-mentioned preset path Under above-mentioned historical data be revised as above-mentioned first data, and sending to the Information Push Server connected includes above-mentioned first The more new information of data, so that above-mentioned first data are sent to using each application in group by above- mentioned information push server, Wherein, each application in above-mentioned application group is the application for including above-mentioned historical data.
In some embodiments, above-mentioned apparatus further include: modification unit is configured to the cache server collection that will be connected Group and/or database server in above-mentioned historical data be revised as above-mentioned first data.
In some embodiments, above-mentioned apparatus further include: writing unit is configured in response to the above-mentioned preset path of determination Above-mentioned historical data is not present down, then above-mentioned first data are written under above-mentioned preset path, and above-mentioned first data are written Above-mentioned cache server cluster and/or above-mentioned database server.
In some embodiments, above-mentioned apparatus further include: clearing cell is configured to determine the number under above-mentioned preset path According to whether preset condition is met, if satisfied, being then purged operation to the data under above-mentioned preset path, wherein above-mentioned default Condition is following any one: data count mesh exceeds occupied space threshold value beyond quantity threshold, total occupied space.
In some embodiments, above-mentioned clearing cell includes: removing subelement, is configured to remove using preset data and calculate Method removes the data under above-mentioned preset path, wherein it is following any one that above-mentioned preset data, which removes algorithm: at least being made recently With lru algorithm, LFU algorithm, fifo fifo algorithm are least commonly used recently.
In some embodiments, above-mentioned apparatus further include: the first clearing cell is configured to periodically empty above-mentioned default road Data under diameter.
In some embodiments, above-mentioned apparatus further include: the second determination unit is configured in response to receiving including The data query of two Data Identifications instructs, it is determined that with the presence or absence of indicated by above-mentioned second Data Identification under above-mentioned preset path Target data;Acquiring unit is configured to above-mentioned target data if it exists, then obtains above-mentioned number of targets under above-mentioned preset path According to and returned.
In some embodiments, above-mentioned apparatus further include: third determination unit is configured to above-mentioned default in response to determination Above-mentioned target data is not present under path, then further determines that in above-mentioned cache server cluster with the presence or absence of above-mentioned number of targets According to;First processing units are configured in response to there are above-mentioned target datas in the above-mentioned cache server cluster of determination, then from upper It states cache server cluster to obtain above-mentioned target data and returned, above-mentioned target data is written under above-mentioned preset path.
In some embodiments, above-mentioned apparatus further include: the 4th determination unit is configured in response to the above-mentioned caching of determination Above-mentioned target data is not present in server cluster, then further determines that in above-mentioned database server with the presence or absence of above-mentioned target Data;The second processing unit, if being configured in above-mentioned database server there are above-mentioned target data, from above-mentioned database Server obtains above-mentioned target data and is returned, and above-mentioned target data is written under above-mentioned preset path and/or above-mentioned slow Deposit server cluster.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, which includes: one or more processing Device;Storage device, for storing one or more programs;When said one or multiple programs are by said one or multiple processors It executes, so that said one or multiple processors realize the method as described in implementation any in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence realizes the method as described in implementation any in first aspect when above procedure is executed by processor.
Data processing method and device provided by the embodiments of the present application, by receiving including being provided with the first data mark After the more new command for the first data known, determine under local preset path with the presence or absence of Data Identification and first Data Identification Identical historical data, in order to which there are when the historical data, this under the preset path is being gone through under determining the preset path History data modification is first data, and sends the update including first data to the Information Push Server connected and believe Breath, so that first data are sent to using each application in group by the Information Push Server.It is pre- to be effectively utilized If path, and sending to Information Push Server includes the more new information of first data so that the Information Push Server will First data are sent to makes this all with first number to its using each application in group using each application in group It is updated according to corresponding historical data, improves data updating efficiency.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the data processing method of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the data processing method of the application;
Fig. 4 is the flow chart according to another embodiment of the data processing method of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the data processing equipment of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the electronic equipment of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the exemplary system of the embodiment of the data processing method or data processing equipment of the application System framework 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104,106, data processing Server 105 and Information Push Server 107.Network 104 is in terminal device 101,102,103 and data processing server The medium of communication link is provided between 105.Network 106 is between data processing server 105 and Information Push Server 107 The medium of communication link is provided.Network 104,106 may include various connection types, for example, wired, wireless communication link or Fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with data processing server 105, with Receive or send information etc..Various telecommunication customer end applications can be installed, such as webpage is clear on terminal device 101,102,103 Device of looking at application, shopping class application etc..
Terminal device 101,102,103 can be various electronic equipments, including but not limited to smart phone, tablet computer, Pocket computer on knee and desktop computer etc..
Data processing server 105 can be to provide the server of various services, for example, receiving terminal apparatus 101,102, The 103 more new commands sent, and more new command is handled etc. to this.
Information Push Server 107 can be to provide the server of various services, such as receive data processing server 105 The more new information sent, and more new information is handled etc. to this.
It should be noted that data processing method provided by the embodiment of the present application is generally by data processing server 105 It executes, correspondingly, data processing equipment is generally positioned in data processing server 105.
It should be understood that the number of terminal device, data processing server, Information Push Server and network in Fig. 1 is only It is only illustrative.According to needs are realized, any number of terminal device, data processing server, information push can have Server and network.
With continued reference to Fig. 2, the process 200 of one embodiment of the data processing method according to the application is shown.The number According to processing method, comprising the following steps:
Step 201, in response to receiving the more new commands of the first data including being provided with the first Data Identification, it is determined that It whether there is Data Identification historical data identical with the first Data Identification under local preset path.
In the present embodiment, data processing method operation thereon electronic equipment (such as data processing shown in FIG. 1 clothes It is engaged in device 105) it can be by wired connection mode or radio connection from terminal device (such as terminal device shown in FIG. 1 101,102,103) receiving includes the more new command for being provided with the first data of the first Data Identification.Above-mentioned electronic equipment is receiving To after this more new command, can first determine identical as first Data Identification with the presence or absence of Data Identification under local preset path Historical data.Wherein, which can be the path in the hard disk, memory or caching of above-mentioned electronic equipment, this implementation Example does not do any restriction to content in this respect.In addition, Data Identification has can be set in every data under the preset path.As Example, above-mentioned electronic equipment can compare the Data Identification of the data under above-mentioned preset path and above-mentioned first Data Identification It is right, whether there is above-mentioned historical data under the above-mentioned preset path of determination.
Step 202, the above-mentioned historical data under preset path is then revised as the first number by above-mentioned historical data if it exists According to, and the more new information including the first data is sent to the Information Push Server connected, so that Information Push Server will First data are sent to using each application in group.
In the present embodiment, if there are above-mentioned historical data under above-mentioned preset path, above-mentioned electronic equipment can will be upper It states the above-mentioned historical data under preset path and is revised as above-mentioned first data.Later, above-mentioned electronic equipment can also be to being connected Information Push Server (such as Information Push Server 107 shown in FIG. 1) send include above-mentioned first data update believe Breath, so that above-mentioned first data are sent to using each application in group by the Information Push Server.Wherein, this is using in group Each application can be the application including above-mentioned historical data.It should be noted that this can be with using each application in group Different functions is provided, and this can be disposed on the same server using each application in group, can also be deployed in not On same server, the present embodiment does not do any restriction to content in this respect.In addition, this can have using each application in group There is data buffer storage function.This can be buffered in this using institute using above-mentioned historical data included by each application in group in advance Server on (such as in the memory of the server), when the application receive above- mentioned information push server transmission it is above-mentioned After first data, which can be revised as above-mentioned first data for the above-mentioned historical data cached, to avoid in local reading Take expired data.
In the present embodiment, above- mentioned information push server can in real time or each periodically into above-mentioned application group answers With the first data are sent, so that the timing update or real-time update of data may be implemented in each application in above-mentioned application group.When So, above- mentioned information push server can also be to each the first data of application Batch sending in above-mentioned application group, so that above-mentioned The batch updating of data may be implemented using each application in group.As an example, when above- mentioned information push server is from above-mentioned When the number of first data included by the more new information that electronic equipment receives reaches preset value, above- mentioned information push server The each application that first batch data can be sent in above-mentioned application group.
In some optional implementations of the present embodiment, above-mentioned electronic equipment be can have in the caching clothes connected It is engaged in carrying out the permission of data read-write operation in device cluster and database server.Above-mentioned electronic equipment is will be under above-mentioned preset path Above-mentioned historical data be revised as the first data included by above-mentioned more new command after, above-mentioned electronic equipment can also be by the caching Above-mentioned historical data in server cluster and/or the database server is revised as first data.Here, above-mentioned database Server can be background data base server, which can for example be deployed with relevant database management System (such as MySQL etc.).Above-mentioned cache server cluster can belong to cache server cluster group, the cache server collection Key-value storage system can be for example deployed on each cache server cluster in group, and (such as Redis, Redis are One open source write using ANSI C language, support network, it is memory-based also can persistence log type, Key-Value Database).It should be noted that ANSI C is by American National Standards Association (American National Standards Institute, ANSI) and International Organization for standardization (International Organization for Standardization, ISO) release the standard about C language.It should be pointed out that above-mentioned electronic equipment is current connected It is what above-mentioned electronic equipment was specified that cache server cluster can be in advance, is also possible to above-mentioned electronic equipment and utilizes load balancing What algorithm was chosen in above-mentioned cache server cluster group, the present embodiment does not do any restriction to content in this respect.Load balancing Algorithm may include polling method, randomized, Smallest connection number method, weighted polling method etc..Since load-balancing algorithm is current The well-known technique studied and applied extensively, details are not described herein.
In some optional implementations of the present embodiment, determined under above-mentioned preset path in response to above-mentioned electronic equipment There is no above-mentioned historical datas, then above-mentioned electronic equipment the first data included by above-mentioned more new command can be written above-mentioned pre- If under path, and first data to be written to connected cache server cluster and/or database server.
In some optional implementations of the present embodiment, above-mentioned electronic equipment is above-mentioned pre- by first data write-in If before under path, above-mentioned electronic equipment can first determine whether the data under above-mentioned preset path meet preset condition, if full Foot, then above-mentioned electronic equipment can be purged operation to the data under above-mentioned preset path.Wherein, which can be Following any one: data count mesh exceeds occupied space threshold value beyond quantity threshold, total occupied space.Here, above-mentioned electronics Equipment can remove algorithm using preset data and remove the data under above-mentioned preset path, which can be following Any one: LRU (Least Recently Used, least recently used) algorithm, LFU (Least Frequently Used, It is least common recently) algorithm, FIFO (First Input First Output, first in, first out) algorithm etc..Utilize lru algorithm The data that the maximum duration under above-mentioned preset path is not used by can be removed.Above-mentioned default road can be removed using LFU algorithm It is accessed the least data of number over a period to come under diameter.It can be removed under above-mentioned preset path most using FIFO algorithm The data being first written into.It should be noted that the starting and ending time of above-mentioned regular period can carry out according to actual needs Setting, the present embodiment do not do any restriction to content in this respect.
In some optional implementations of the present embodiment, above-mentioned electronic equipment can also (such as every other day periodically Or two weeks etc.) empty data under above-mentioned preset path.
In some optional implementations of the present embodiment, above-mentioned electronic equipment can also be received including the second data mark The data query of knowledge instructs.When above-mentioned electronic equipment receives data query instruction, above-mentioned electronic equipment can be by such as Method shown in Fig. 4 handles data query instruction.Fig. 4 shows the stream of another embodiment of data processing method Cheng Tu.
With continued reference to the schematic diagram that Fig. 3, Fig. 3 are according to the application scenarios of the data processing method of the present embodiment.? In the application scenarios of Fig. 3, the preset path of data processing server local can be the path in memory.As shown in label 301, Data processing server can receive the more new command of the first data A including the first Data Identification from terminal device, wherein the One data A can be article G in the newest total sales volume of current year.Then, as shown in label 302, above-mentioned data processing server can To search Data Identification historical data A1, i.e. article G identical with the first Data Identification under the preset path in local memory History total sales volume.Then, in response to finding historical data A1 under above-mentioned preset path, then above-mentioned as shown in label 303 Historical data A1 under above-mentioned preset path can be revised as the first data A by data processing server.Finally, such as label 304 Shown, above-mentioned data processing server, which can send the update including the first data A to the Information Push Server connected, to be believed Breath, so that first data A is sent to using each application in group by the Information Push Server, wherein this can using group To include having cached historical data A1, occupation rate of market for analyzing article G to apply B.It is counted when receiving first using B After A, the historical data A1 that it is cached can be updated using B.In this way, newest data can be used (i.e. using B First data A) analyze the current occupation rate of market of article G.
The method provided by the above embodiment of the application is effectively utilized preset path, and sends out to Information Push Server The more new information including the first data is sent so that first data are sent to using each in group by the Information Push Server Using, it is updated this to its all historical data corresponding with first data using each application in group, thus Improve data updating efficiency.
With further reference to Fig. 4, it illustrates the process 400 of another embodiment of data processing method, the data processings The process 400 of method, comprising the following steps:
Step 401, it is instructed in response to receiving the data query including the second Data Identification, it is determined that local default road With the presence or absence of target data indicated by the second Data Identification under diameter.
In the present embodiment, data processing method operation thereon electronic equipment (such as data processing shown in FIG. 1 clothes It is engaged in device) it can be by wired connection mode or radio connection receiving terminal apparatus (such as terminal device shown in FIG. 1 101, the data query including the second Data Identification 102,103) sent instructs.Later, above-mentioned electronic equipment can determine this Whether second Data Identification indicated by target data is deposited under the preset path on ground.Wherein, which can be above-mentioned Data Identification has can be set in path in the hard disk of electronic equipment, memory or caching, every data under the preset path.Make For example, above-mentioned electronic equipment can compare the Data Identification of the data under above-mentioned preset path and second Data Identification It is right, whether there is above-mentioned target data under the above-mentioned preset path of determination.If there are above-mentioned target data under above-mentioned preset path, Then above-mentioned electronic equipment can execute step 402;If above-mentioned target data is not present under above-mentioned preset path, above-mentioned electronics is set It is standby to execute step 403.
Step 402, target data is obtained under preset path and is returned.
In the present embodiment, determine that there are above-mentioned target datas under above-mentioned preset path in response to above-mentioned electronic equipment, then Above-mentioned electronic equipment can obtain above-mentioned target data under above-mentioned preset path, and above-mentioned target data is back to above-mentioned number According to sender's (such as above-mentioned terminal device) of inquiry request.
Step 403, it determines in cache server cluster with the presence or absence of target data.
In the present embodiment, it is determined in response to above-mentioned electronic equipment and above-mentioned target data is not present under above-mentioned preset path, Then above-mentioned electronic equipment may further determine that in connected cache server cluster with the presence or absence of above-mentioned target data.As Example, above-mentioned electronic equipment can search Data Identification and above-mentioned second Data Identification in the memory of the cache server cluster Identical data, if finding, above-mentioned electronic equipment can determine that there are above-mentioned target datas in the cache server cluster; If not finding, above-mentioned electronic equipment can determine that there is no above-mentioned target datas in the cache server cluster.Here, if Above-mentioned electronic equipment determines that there are above-mentioned target datas in above-mentioned cache server cluster, then above-mentioned electronic equipment can execute step Rapid 404;If above-mentioned electronic equipment determines that there is no above-mentioned target data, above-mentioned electronic equipments in above-mentioned cache server cluster Step 405 can be executed.
Step 404, target data being obtained from caching server cluster and being returned, preset path is written into target data Under.
In the present embodiment, determine that there are above-mentioned number of targets in above-mentioned cache server cluster in response to above-mentioned electronic equipment Above-mentioned target data can be obtained from above-mentioned cache server cluster according to, above-mentioned electronic equipment, and by acquired above-mentioned target Data are written under above-mentioned preset path.
Step 405, it determines in database server with the presence or absence of target data.
In the present embodiment, determine that there is no above-mentioned targets in above-mentioned cache server cluster in response to above-mentioned electronic equipment Data, above-mentioned electronic equipment may further determine that in connected database server with the presence or absence of above-mentioned target data.Make For example, above-mentioned electronic equipment can search Data Identification and above-mentioned second data in the tables of data in the database server Identical data are identified, if finding, above-mentioned electronic equipment can determine that there are above-mentioned number of targets in the database server According to.Here, Data Identification has can be set in every data in the tables of data.If above-mentioned electronic equipment determines the database service There are above-mentioned target datas in device, then above-mentioned electronic equipment can execute step 406.
Step 406, target data being obtained from database server and being returned, target data is written under preset path And/or cache server cluster.
In the present embodiment, determine that there are above-mentioned number of targets in above-mentioned database server in response to above-mentioned electronic equipment According to then above-mentioned electronic equipment can obtain above-mentioned target data from above-mentioned database server, and above-mentioned target data is returned To the sender of above-mentioned data inquiry request.Above-mentioned target data can also be written under above-mentioned preset path for above-mentioned electronic equipment And/or above-mentioned cache server cluster.
In some optional implementations of the present embodiment, in the case where above-mentioned target data to be written to above-mentioned preset path it Before, above-mentioned electronic equipment can first determine whether the data under above-mentioned preset path meet preset condition, if satisfied, then above-mentioned electricity Sub- equipment can be purged operation to the data under above-mentioned preset path.Wherein, which can be following any one : data count mesh exceeds occupied space threshold value beyond quantity threshold, total occupied space.Here, above-mentioned electronic equipment can be adopted Algorithm is removed with preset data and removes the data under above-mentioned preset path, which can be following any one: LRU (Least Recently Used, least recently used) algorithm, LFU (Least Frequently Used, recently least It is common) algorithm, FIFO (First Input First Output, first in, first out) algorithm etc..It can be removed using lru algorithm The data that maximum duration under above-mentioned preset path is not used by.Using LFU algorithm can remove under above-mentioned preset path The least data of number are accessed in regular period.Being written under above-mentioned preset path at first can be removed using FIFO algorithm Data.It should be noted that the starting and ending time of above-mentioned regular period can be configured according to actual needs, this reality It applies example and any restriction is not done to content in this respect.
The process 400 of data processing method in the present embodiment, which highlights, handles the data inquiry request received The step of.The scheme of the present embodiment description is not stored in by the effective use to preset path, and by what is found as a result, Target data under the preset path is written under the preset path and/or cache server cluster, uses the mesh in order to subsequent The target data can be rapidly got when marking data, so as to improve efficiency data query.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides a kind of data processing dresses The one embodiment set, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to respectively In kind electronic equipment.
As shown in figure 5, data processing equipment 500 shown in the present embodiment includes: the first determination unit 501 and processing unit 502.Wherein, the first determination unit 501 is configured in response to receiving the first data including being provided with the first Data Identification More new command, it is determined that under local preset path whether there is Data Identification history identical with above-mentioned first Data Identification Data, wherein every data under above-mentioned preset path is provided with Data Identification;And processing unit 502 is configured to if it exists Above-mentioned historical data under above-mentioned preset path is then revised as above-mentioned first data by above-mentioned historical data, and to being connected Information Push Server send include above-mentioned first data more new information so that above- mentioned information push server is by above-mentioned first Data are sent to using each application in group, wherein each application in above-mentioned application group includes above-mentioned historical data Using.
In the present embodiment, in data processing equipment 500: the specific processing of the first determination unit 501 and processing unit 502 And its brought technical effect can refer to the related description of the step 201 and step 202 in Fig. 2 corresponding embodiment respectively, This is repeated no more.
In some optional implementations of the present embodiment, above-mentioned apparatus 500 can also include: modification unit (in figure It is not shown), the above-mentioned historical data modification being configured in the cache server cluster that will be connected and/or database server For above-mentioned first data.
In some optional implementations of the present embodiment, above-mentioned apparatus 500 can also include: writing unit (in figure It is not shown), it is configured to then write above-mentioned first data in response to above-mentioned historical data is not present under the above-mentioned preset path of determination Enter under above-mentioned preset path, and above-mentioned cache server cluster and/or above-mentioned database server is written into above-mentioned first data.
In some optional implementations of the present embodiment, above-mentioned apparatus 500 can also include: clearing cell (in figure It is not shown), it is configured to determine whether the data under above-mentioned preset path meet preset condition, if satisfied, then to above-mentioned default Data under path are purged operation, wherein above-mentioned preset condition is following any one: data count mesh exceeds number threshold Value, total occupied space exceed occupied space threshold value.
In some optional implementations of the present embodiment, above-mentioned clearing cell may include: to remove subelement (in figure It is not shown), it is configured to remove the data under above-mentioned preset path using preset data removing algorithm, wherein above-mentioned present count It is following any one according to algorithm is removed: least recently used lru algorithm, recently least common LFU algorithm, fifo fifo Algorithm.
In some optional implementations of the present embodiment, above-mentioned apparatus 500 can also include: the first clearing cell (not shown) is configured to periodically empty the data under above-mentioned preset path.
In some optional implementations of the present embodiment, above-mentioned apparatus 500 can also include: the second determination unit (not shown) is configured in response to receiving the data query instruction including the second Data Identification, it is determined that above-mentioned pre- If with the presence or absence of target data indicated by above-mentioned second Data Identification under path;Acquiring unit (not shown), configuration are used In above-mentioned target data if it exists, then above-mentioned target data is obtained under above-mentioned preset path and is returned.
In some optional implementations of the present embodiment, above-mentioned apparatus 500 can also include: third determination unit (not shown) is configured to then further determine that in response to above-mentioned target data is not present under the above-mentioned preset path of determination It whether there is above-mentioned target data in above-mentioned cache server cluster;First processing units (not shown) is configured to ring Above-mentioned mesh then should be obtained from above-mentioned cache server cluster in determining that there are above-mentioned target datas in above-mentioned cache server cluster Mark data are simultaneously returned, and above-mentioned target data is written under above-mentioned preset path.
In some optional implementations of the present embodiment, above-mentioned apparatus 500 can also include: the 4th determination unit (not shown) is configured in response to above-mentioned target data is not present in the above-mentioned cache server cluster of determination, then into one Step, which determines, whether there is above-mentioned target data in above-mentioned database server;The second processing unit (not shown), configuration are used If there are above-mentioned target datas in above-mentioned database server, above-mentioned target data is obtained simultaneously from above-mentioned database server It is returned, above-mentioned target data is written under above-mentioned preset path and/or above-mentioned cache server cluster.
The device provided by the above embodiment of the application is effectively utilized preset path, and sends out to Information Push Server More new information is sent so that the first data are sent to using each application in group, to improve data by Information Push Server Update efficiency.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the electronic equipment for being suitable for being used to realize the embodiment of the present application Structural schematic diagram.Electronic equipment shown in Fig. 6 is only an example, function to the embodiment of the present application and should not use model Shroud carrys out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 502 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media 611 are mounted.When the computer program is executed by central processing unit (CPU) 601, executes and limited in the system of the application Above-mentioned function.
It should be noted that computer-readable medium shown in the application can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In this application, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In application, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet Include the first determination unit and processing unit.Wherein, the title of these units is not constituted to the unit itself under certain conditions Restriction, for example, the first determination unit be also described as " determine under local preset path with the presence or absence of Data Identification with The unit of the identical historical data of first Data Identification ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment. Above-mentioned computer-readable medium carries one or more program, when the electronics is set by one for said one or multiple programs It is standby when executing so that the electronic equipment include: in response to receive including be provided with the first Data Identification the first data more New command, it is determined that whether there is Data Identification history number identical with above-mentioned first Data Identification under local preset path According to, wherein every data under above-mentioned preset path is provided with Data Identification;Above-mentioned historical data if it exists, then will be above-mentioned pre- If the above-mentioned historical data under path is revised as above-mentioned first data, and it includes upper for sending to the Information Push Server connected The more new information of the first data is stated, so that above-mentioned first data are sent to using each in group by above- mentioned information push server Using, wherein each application in above-mentioned application group is the application for including above-mentioned historical data.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (15)

1. a kind of data processing method, which is characterized in that the described method includes:
In response to receiving the more new command of the first data including being provided with the first Data Identification, it is determined that local default road It whether there is Data Identification historical data identical with first Data Identification under diameter, wherein every under the preset path Data is provided with Data Identification;
The historical data under the preset path is then revised as first data by the historical data if it exists, and The more new information including first data is sent to the Information Push Server connected, so that the Information Push Server First data are sent to using each application in group, wherein each application in the application group be include described The application of historical data.
2. the method according to claim 1, wherein in the historical data by under the preset path It is revised as after first data, the method also includes:
The historical data in the cache server cluster and/or database server that are connected is revised as first number According to.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
In response to the historical data is not present under the determination preset path, then the default road is written into first data Under diameter, and the cache server cluster and/or the database server is written into first data.
4. according to the method described in claim 3, it is characterized in that, the preset path is written in first data described Before lower, the method also includes:
Determine whether the data under the preset path meet preset condition, if satisfied, then to the data under the preset path Be purged operation, wherein the preset condition is following any one: data count mesh is empty beyond quantity threshold, total occupancy Between exceed occupied space threshold value.
5. according to the method described in claim 4, it is characterized in that, the data under the preset path are purged behaviour Make, comprising:
Algorithm is removed using preset data and removes the data under the preset path, wherein the preset data removes algorithm and is Following any one: least recently used lru algorithm, recently least common LFU algorithm, fifo fifo algorithm.
6. the method according to claim 1, wherein the method also includes:
Periodically empty the data under the preset path.
7. according to the method described in claim 2, it is characterized in that, the method also includes:
In response to receiving the data query instruction including the second Data Identification, it is determined that whether there is institute under the preset path State target data indicated by the second Data Identification;
The target data if it exists then obtains the target data and is returned under the preset path.
8. the method according to the description of claim 7 is characterized in that the method also includes:
In response to the target data is not present under the determination preset path, then the cache server cluster is further determined that In whether there is the target data;
In response to there are the target datas in the determination cache server cluster, then obtained from the cache server cluster The target data is simultaneously returned, and the target data is written under the preset path.
9. according to the method described in claim 8, it is characterized in that, the method also includes:
In response to the target data is not present in the determination cache server cluster, then the database clothes are further determined that It is engaged in whether there is the target data in device;
If there are the target datas in the database server, the target data is obtained from the database server And returned, the target data is written under the preset path and/or the cache server cluster.
10. method according to claim 8 or claim 9, which is characterized in that described that target data write-in is described default Before under path, the method also includes:
Determine whether the data under the preset path meet the preset condition, if satisfied, then under the preset path Data are purged operation.
11. a kind of data processing equipment, which is characterized in that described device includes:
First determination unit is configured to refer in response to the update for receiving the first data including being provided with the first Data Identification It enables, it is determined that it whether there is Data Identification historical data identical with first Data Identification under local preset path, In, every data under the preset path is provided with Data Identification;
Processing unit is configured to the historical data if it exists, then modifies the historical data under the preset path For first data, and send to the Information Push Server connected include first data more new information so that First data are sent to using each application in group by the Information Push Server, wherein in the application group Each application is the application for including the historical data.
12. device according to claim 11, which is characterized in that described device further include:
Modify unit, the history number being configured in the cache server cluster that will be connected and/or database server According to being revised as first data.
13. device according to claim 12, which is characterized in that described device further include:
Second determination unit is configured in response to receiving the data query instruction including the second Data Identification, it is determined that institute It states under preset path with the presence or absence of target data indicated by second Data Identification;
Acquiring unit is configured to the target data if it exists, then obtains the target data under the preset path simultaneously It is returned.
14. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-10.
15. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed The method as described in any in claim 1-10 is realized when device executes.
CN201710655952.0A 2017-08-03 2017-08-03 Data processing method and device Pending CN110019256A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710655952.0A CN110019256A (en) 2017-08-03 2017-08-03 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710655952.0A CN110019256A (en) 2017-08-03 2017-08-03 Data processing method and device

Publications (1)

Publication Number Publication Date
CN110019256A true CN110019256A (en) 2019-07-16

Family

ID=67186039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710655952.0A Pending CN110019256A (en) 2017-08-03 2017-08-03 Data processing method and device

Country Status (1)

Country Link
CN (1) CN110019256A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113783916A (en) * 2020-10-16 2021-12-10 北京沃东天骏信息技术有限公司 Information synchronization method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040103199A1 (en) * 2002-11-22 2004-05-27 Anthony Chao Method and system for client browser update from a lite cache
CN103873451A (en) * 2012-12-17 2014-06-18 ***通信集团公司 Data synchronization method, equipment and system
CN105718542A (en) * 2016-01-18 2016-06-29 厦门雅迅网络股份有限公司 Data cache and updating method and system
CN105847430A (en) * 2016-05-20 2016-08-10 北京小米移动软件有限公司 Hybrid application page data access method and device
CN106155925A (en) * 2015-04-09 2016-11-23 阿里巴巴集团控股有限公司 A kind of method and device obtaining data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040103199A1 (en) * 2002-11-22 2004-05-27 Anthony Chao Method and system for client browser update from a lite cache
CN103873451A (en) * 2012-12-17 2014-06-18 ***通信集团公司 Data synchronization method, equipment and system
CN106155925A (en) * 2015-04-09 2016-11-23 阿里巴巴集团控股有限公司 A kind of method and device obtaining data
CN105718542A (en) * 2016-01-18 2016-06-29 厦门雅迅网络股份有限公司 Data cache and updating method and system
CN105847430A (en) * 2016-05-20 2016-08-10 北京小米移动软件有限公司 Hybrid application page data access method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113783916A (en) * 2020-10-16 2021-12-10 北京沃东天骏信息技术有限公司 Information synchronization method and device

Similar Documents

Publication Publication Date Title
CN109697075A (en) File updating method, system and device
CN109409119A (en) Data manipulation method and device
CN110019213A (en) Data managing method, device, electronic equipment and storage medium
CN110598138A (en) Cache-based processing method and device
CN109413127A (en) A kind of method of data synchronization and device
CN110019080A (en) Data access method and device
CN110334036A (en) A kind of method and apparatus for realizing data cached scheduling
CN110019263A (en) Information storage means and device
CN108804447A (en) Utilize the method and system of cache responses request of data
CN109657174A (en) Method and apparatus for more new data
CN109388654A (en) A kind of method and apparatus for inquiring tables of data
CN109634833A (en) A kind of Software Defects Predict Methods and device
CN108733787A (en) Database operation method, device, electronic equipment and storage medium
CN110019552A (en) User pays close attention to the method and apparatus that state updates
CN108776692A (en) Method and apparatus for handling information
CN110427415A (en) Knowledge share method, device, system media and electronic equipment
CN110389812A (en) For managing the method, equipment and computer readable storage medium of virtual machine
CN109885593A (en) Method and apparatus for handling information
CN108011949A (en) Method and apparatus for obtaining data
CN110365745A (en) Data processing system, method, apparatus, server and computer-readable medium
CN109597810A (en) A kind of task cutting method, device, medium and electronic equipment
CN109033312A (en) Method and apparatus for obtaining information
CN108399046A (en) File operation requests treating method and apparatus
CN109409419A (en) Method and apparatus for handling data
CN109697034A (en) A kind of method for writing data, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200512

Address after: 710100 Building 5, center square, aerospace city, No. 666, East Chang'an Street, national civil aerospace industry base, Xi'an City, Shaanxi Province

Applicant after: Xi'an jingxundi Supply Chain Technology Co.,Ltd.

Address before: 100080 Beijing city Haidian District xingshikou Road No. 65 building 11C Creative Park West West west Shan East 1-4 layer 1-4 layer

Applicant before: BEIJING JINGDONG SHANGKE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: BEIJING JINGDONG CENTURY TRADING Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190716