CN110334246A - A kind of data request processing method, apparatus, terminal device and storage medium - Google Patents

A kind of data request processing method, apparatus, terminal device and storage medium Download PDF

Info

Publication number
CN110334246A
CN110334246A CN201910612132.2A CN201910612132A CN110334246A CN 110334246 A CN110334246 A CN 110334246A CN 201910612132 A CN201910612132 A CN 201910612132A CN 110334246 A CN110334246 A CN 110334246A
Authority
CN
China
Prior art keywords
data
video
request
preset service
local cache
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
CN201910612132.2A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910612132.2A priority Critical patent/CN110334246A/en
Publication of CN110334246A publication Critical patent/CN110334246A/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/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/74Browsing; Visualisation therefor

Abstract

The embodiment of the present disclosure discloses a kind of data request processing method, apparatus, terminal device and storage medium, the described method includes: when a request for data is received, it determines the preset service for handling the request of data, target data is obtained based on the preset service;If obtaining target data failure based on the preset service, target data is read from local cache;Wherein, the data of the local cache are written by the backup services of the preset service based on predeterminated frequency.By the technical solution of the embodiment of the present disclosure, realizes and improve the purpose that target data obtains success rate.

Description

A kind of data request processing method, apparatus, terminal device and storage medium
Technical field
The embodiment of the present disclosure is related to application of software data processing technique more particularly to a kind of data request processing method, dress It sets, terminal device and storage medium.
Background technique
With being widely used for intelligent terminal, various application software are continued to introduce new.Wherein, list page is (commonly referred to as Feed pages) it is a kind of relatively common interface appearance form in existing application software client.Can be shown one by one in Feed pages or Person recommends display list items according to the hobby of user, checks for user, and user can be entered by clicking corresponding list items Details page checks details or triggers the broadcasting of related column list item.
It is complete due to the interest of Feed pages of presentation content of some application software clients and the accuracy of commending contents The hobby for beauteously having catered to each user has attracted a large amount of bean vermicelli user, so that bean vermicelli user brush gets up to be so fond that will not let out of one's hand. In this way, causing Feed pages of some application software clients to need to carry huge day live data.
As it can be seen that Feed pages of the application software client most of advertising income for carrying each application software developer, Primary small Feed accident (is often referred to normally to show information list or cannot respond to user checks request, and respond User's checks that a most important step is to obtain target data to be shown in request) huge warp may be brought to developer Ji loss, while also will affect customer experience.Therefore, Feed pages of application software client of stability is extremely important.
Summary of the invention
The embodiment of the present disclosure provides a kind of data request processing method, apparatus, terminal device and storage medium, to improve mesh Mark data acquisition success rate.
In a first aspect, the embodiment of the present disclosure provides a kind of data request processing method, comprising:
When a request for data is received, it determines the preset service for handling the request of data, is based on the default clothes Business obtains target data;
If obtaining target data failure based on the preset service, target data is read from local cache;
Wherein, the data of the local cache are written by the backup services of the preset service based on predeterminated frequency.
Further, described to determine the preset service for handling the request of data when a request for data is received, packet It includes:
The preset service for handling the request of data is determined based on preset data request processing process;
Alternatively, the request target requested based on the data determines the preset service for handling the request of data.
Further, described based at preset request of data when the request of data received is video refresh request Reason process determines the preset service for handling the request of data, comprising:
It is determined based on preset video refresh request process flow for obtaining video ID (Identification, identity Mark) the first preset service and the second preset service for obtaining the corresponding video information of the video ID;
Corresponding, the data of the local cache obtain in the following way:
Predeterminated frequency is based on by the backup services of first preset service and obtains video ID, and pre- by described second If the backup services of service obtain the corresponding video information of the video ID;
The video ID that will acquire and corresponding video information are stored to the local cache.
Further, if obtaining video ID failure based on first preset service, video ID is read from local cache.
Further, after local cache reading video ID, the method also includes:
Disappeared to the video ID read and handled again, is asked to avoid identical video information is returned to the video refreshing The sender asked;
The corresponding video information of video ID after disappearing weight is read from local cache.
Further, if obtaining video ID success based on first preset service, and based on for obtaining the video Second preset service of the corresponding video information of ID obtains video information failure, then reads video ID and described from local cache The corresponding video information of video ID.
Further, the method also includes: if from local cache read target data failure, from local file read Target data;
Wherein, when obtaining target data success every time, the target data successfully got is based on preset rules, institute is written State local file.
Second aspect, the embodiment of the present disclosure additionally provide a kind of data request processing device, which includes:
First obtains module, for when a request for data is received, determining the default clothes for handling the request of data Business obtains target data based on the preset service;
Second obtains module, if reading for obtaining target data failure based on the preset service from local cache Target data;
Wherein, the data of the local cache are written by the backup services of the preset service based on predeterminated frequency.
Further, the first acquisition module specifically includes determination unit, and the determination unit is used for based on preset Data request processing process determines the preset service for handling the request of data;Alternatively, that requests based on the data asks Target is asked to determine the preset service for handling the request of data.
Further, when the request of data received is video refresh request, the determination unit is specifically used for: being based on Preset video refresh request process flow is determined for obtaining the first preset service of video identifier ID and for obtaining State the second preset service of the corresponding video information of video ID;
Corresponding, the data of the local cache obtain in the following way:
Predeterminated frequency is based on by the backup services of first preset service and obtains video ID, and pre- by described second If the backup services of service obtain the corresponding video information of the video ID;
The video ID that will acquire and corresponding video information are stored to the local cache.
Further, described device further includes read module, if for obtaining video ID based on first preset service Failure then reads video ID from local cache.
Further, described device further include: disappear molality block, after reading video ID from local cache, to reading To video ID disappeared and handled again, to avoid the sender that identical video information is returned to the video refresh request;
Corresponding, the read module is also used to read the corresponding video information of video ID after disappearing weight from local cache.
Further, the read module is also used to: if based on first preset service acquisition video ID success, and base Video information failure is obtained in the second preset service for obtaining the corresponding video information of the video ID, then from local cache Read video ID and the corresponding video information of the video ID.
Further, the read module is also used to: if target data failure is read from local cache, from local file Read target data;
Wherein, when obtaining target data success every time, the target data successfully got is based on preset rules, institute is written State local file.
The third aspect, the embodiment of the present disclosure additionally provide a kind of terminal device, which includes:
One or more processing units;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processing units, so that one or more of places Manage data request processing method of the device realization as described in the embodiment of the present disclosure.
Fourth aspect, the embodiment of the present disclosure additionally provide a kind of computer readable storage medium, are stored thereon with computer Program realizes the data request processing method as described in the embodiment of the present disclosure when program is executed by processing unit.
A kind of data request processing method that the embodiment of the present disclosure provides is used by when a request for data is received, being based on Target data is obtained in the preset service for handling the request of data;If obtaining target data failure based on the preset service, Then target data is read from local cache;Wherein, the backup services base that the data of the local cache pass through the preset service In the technological means of predeterminated frequency write-in, the purpose for improving target data acquisition success rate is realized, and then improves system and rings Answer the stability of request of data.
Detailed description of the invention
Fig. 1 is a kind of flow diagram for data request processing method that the embodiment of the present disclosure one provides;
Fig. 2 is a kind of flow diagram for data request processing method that the embodiment of the present disclosure two provides;
Fig. 3 is a kind of structural schematic diagram for data request processing device that the embodiment of the present disclosure three provides;
Fig. 4 is a kind of hardware structural diagram for terminal device that the embodiment of the present disclosure four provides.
Specific embodiment
The disclosure 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 the disclosure, rather than the restriction to the disclosure.It also should be noted that in order to just Part relevant to the disclosure is illustrated only in description, attached drawing rather than entire infrastructure.
In following each embodiments, optional feature and example are provided simultaneously in each embodiment, that records in embodiment is each A feature can be combined, and form multiple optinal plans, and the embodiment of each number should not be considered merely as to a technical solution.
Fig. 1 is a kind of flow diagram for data request processing method that the embodiment of the present disclosure one provides.This method can fit The case where for responding to request of data, can be executed by data request processing device, which can be by hardware and/or soft Part is constituted, and is generally integrated in server.Shown in Figure 1, the method specifically comprises the following steps:
Step 110, when a request for data is received, determines the preset service for handling the request of data, is based on institute It states preset service and obtains target data.
Wherein, the request of data includes requesting the request of any data, such as user wants to check circle of friends by mobile phone Certain picture, then user can by mobile phone to server send obtain image data request;Such as user wants to pass through again Certain of mobile phone applies brush entertaining video, then the request etc. for obtaining video data can be sent by relevant video refresh page.Institute The preset service for handling the request of data is stated to refer to for responding the request of data to obtain corresponding target data Service.
Illustratively, the determination is used to handle the preset service of the request of data, comprising:
The preset service for handling the request of data is determined based on preset data request processing process;
Alternatively, the request target requested based on the data determines the preset service for handling the request of data.
Wherein, if carrying out processing to the request of data needs to rely on the services of at least two different function, and it is described extremely It interdepends, then need to determine according to preset data request processing process for handling between the service of few two different function State the preset service of request of data.Such as it when the request of data is the video refresh request sent by client, is based on Preset video refresh request process flow determination is respectively as follows: for handling the preset service of the video refresh request for obtaining Take the service of the service of video ID video information corresponding with for obtaining the video ID.If at the request of data Reason only needs an independent service, then the request target that can be requested based on the data is determined for handling the request of data Preset service.For example, when the display request that the request of data is certain particular picture sent by client, then basis The request target (requesting the particular picture data) of display request determines the preset service for handling the display request Are as follows: from the service of picture library downloading particular picture data.
If step 120 obtains target data failure based on the preset service, target data is read from local cache.
Wherein, the data of the local cache are written by the backup services of the preset service based on predeterminated frequency.Base It include: the preset service the case where preset service obtains target data failure for request of data return mistake Data or the preset service are for the request of data not returned data within the set duration.The preset service is corresponding Backup services refer to the preset service have same or similar service function service.If the backup services with it is described Preset service service logic having the same, then the two service function having the same, the backup services are only described default The copy of service, the preset service are used for real-time response request of data, and the backup services are used to respond based on predeterminated frequency Request of data is to obtain target data, and the target data that will acquire is stored to local cache, when based on the default clothes Business obtain target data failure when, can from local cache read target data, with this come improve system processes data request it is steady It is qualitative.If the backup services have different service logics, the usually service logic of backup services from the preset service Relatively simple, calculation amount is lower, and the service logic of preset service is more complex, and calculation amount is higher, but the two has similar service function Energy.The preset service is for real-time response request of data to obtain target data;The backup services are used for based on specific Service logic obtains target data with predeterminated frequency, and the target data that will acquire is stored to local cache, when based on institute When stating preset service acquisition target data failure, target data can be read from local cache.It is understood that based on backup clothes The target data got of being engaged in is not so good as to meet design expectation, the purpose designed in this way based on the target data that preset service is got It is when preset service exception, it can be ensured that the ability of the basic processing request of data of system, and then guarantee basic user experience.
Further, the method also includes: if from local cache read target data failure, from local file read Target data;
Wherein, when obtaining target data success every time, the target data successfully got is based on preset rules, institute is written State local file.Specifically, when obtaining target data success by the preset service every time, from the number of targets successfully got The local file is written in determining target information by the target information for determining preset ratio at random in.For example, when previous logical 100 video informations that the preset service is successfully got are crossed, then by any local text of 20 video informations write-in therein Part.
The local file refers specifically to carry the disk of the service server of the preset service and the backup services File;The local cache refers to the temporary storage RAM of the service server, i.e. a part of service server memory, from Local cache, which reads data, has faster reading speed.
The technical solution of the present embodiment, by when a request for data is received, based on for handling the request of data Preset service obtains target data;If obtaining target data failure based on the preset service, target is read from local cache Data;Wherein, the technology that the data of the local cache are written by the backup services of the preset service based on predeterminated frequency Means realize the purpose for improving target data acquisition success rate, and then improve the stability of system response data request.
Embodiment two
Fig. 2 is a kind of flow diagram for data request processing method that the embodiment of the present disclosure two provides.The present embodiment with It is embodied based on each optinal plan in above-described embodiment, provides optional data request processing method.Specifically The data request processing method is applied in Feed request scene, the Feed requests scene are as follows: user passes through client Video refresh request is sent, when server-side corresponding with client receives the refresh requests, according to the client user Hobby calculate and search the interested video of the client user, finally to the client return user it is interested Video.Currently, there are many applications clients to recommend entertaining video exclusively for user, ideally cater to each user's Hobby, so that user's brush gets up to be so fond that will not let out of one's hand.In this way, causing Feed pages of client to need to carry number living of huge day Be also according to, the service pressure of server-side corresponding with client it is growing day by day, in order to improve the stability of server-side, propose this The data request processing scheme of embodiment.Referring specifically to shown in Fig. 2, the data request processing method includes the following steps:
Step 210, when receiving video refresh request, based on preset video refresh request process flow determination be used for Obtain the first preset service of video ID and the second preset service for obtaining the corresponding video information of the video ID.
Step 220 obtains video ID based on first preset service.
Include two steps the step of most critical in Feed service framework: the first step is to obtain the interested recommendation video of user ID;Second step is that the video information that obtains corresponding video information based on the recommendation video ID got, and will acquire returns It is shown to client with the refreshing for realizing video.Any one in above-mentioned two step, which goes wrong, all cannot achieve client Video refresh function, i.e., can not carry out video display in client, user cannot then watch entertaining video.Based on this, when When receiving video refresh request, determine that first for obtaining video ID is pre- based on preset video refresh request process flow If service and the second preset service for obtaining the corresponding video information of the video ID, and based on the described first default clothes Business, which obtains, recommends video ID, after successfully getting recommendation video ID, obtains the recommendation view based on second preset service The corresponding video information of frequency ID.
Illustratively, it is obtained based on first preset service and recommends video ID, comprising:
By first preset service, is obtained according to the interest characteristics of the video refresh request sender and recommend video ID.Wherein, the interest characteristics of the video refresh request sender can be based on gender, age, occupation, the conception of history for sending user See that video type or history click behavior etc. are calculated.By will send user interest characteristics and each video ID generation The video type of table is based on preset rules and is matched, and is ranked up according to matching degree to each video ID, and finally sequence exists Preceding a certain number of video ID are as recommendation video ID.
If step 230a, obtaining video ID failure based on first preset service, video ID is read from local cache.
Wherein, the data of the local cache obtain in the following way:
Predeterminated frequency is based on by the backup services of first preset service and obtains video ID, and pre- by described second If the backup services of service obtain the corresponding video information of the video ID;
The video ID that will acquire and corresponding video information are stored to the local cache.
Specifically, the backup services by first preset service obtain video ID, comprising:
By the backup services of first preset service, pageview or the amount of thumbing up based on video each in video library are obtained Take video ID.In the present embodiment, the service logic of the backup services of first preset service and first preset service is not Together, the service logic of the backup services is simpler, and the service logic of first preset service is more complex, passes through described first The recommendation video ID that preset service is got is that video refresh request sends the interested video ID of user, first default by this Service acquisition to recommendation video ID can to video refresh request send user bring preferable user experience;And by described standby Part service acquisition to video ID be only high fever video ID, do not account for the hobby of user, therefore, pass through the backup The video ID that service acquisition arrives can guarantee the basic experience of user, and preferable experience can not be brought to user, is to improve with this The stability of system.It is understood that the video information of local cache is high fever video information, rather than recommend video information, Recommend video information to only account for the hobby of some user, is only applicable to some user, and high fever video can then cater to greatly The hobby of most users.
It is understood that if the backup services of first preset service are identical as the first preset service setting Service logic then need the corresponding considerable business of configuration that is, both for obtaining interested the recommendations video ID of user Server carries the service logic, certainly will so will lead to operation system higher cost, therefore, usually pre- by described first If the service logic setting of the backup services of service is relatively simple, it is only used for realizing that basic service function is basic to guarantee User experience.
Step 240a, disappeared to the video ID read and handled again, and read the video ID after disappearing weight from local cache Corresponding video information.
It is to avoid identical video information returning to the video to the video ID read the purpose handled that disappeared again The sender of refresh requests.Specifically, each corresponding user of the video refresh request sender, for example, being directed to user A, will be current when needing to return to video ID to user a again by recording to the video ID for returning to user a every time The secondary video ID for needing to return to user a is compared with recorded video ID, by duplicate video ID from when previous It needs to return to and be deleted in the video ID list of user a, be presented to the user a to avoid by identical video information, influence user Experience.Further, the mark of each user can be by the Customs Assigned Number or equipment that carry in the video refresh request Number is indicated.
Further, if the video ID quantity obtained after the processing again that disappears is 0, or the weight processing operation failure that disappears, then The video information for reading preset quantity at random from local cache returns to client.
If step 230b, video ID success is obtained based on first preset service, based on for obtaining the video Second preset service of the corresponding video information of ID obtains video information.
Wherein, the video information is the corresponding video content information of the video ID, is specifically included: video title letter Breath, the background music information of video, the code rate of video, frame per second information and author information of video etc..
If step 240b, obtaining video based on the second preset service for obtaining the corresponding video information of the video ID Information failure, then read video ID and the corresponding video information of the video ID from local cache.
Likewise, reading video ID and the corresponding video information of the video ID from local cache, comprising: preferentially to from The video ID that local cache is read is disappeared to be handled again, then reads the corresponding view of video ID after disappearing weight from local cache again Frequency information influences user experience to avoid the sender that identical video information is returned to video refresh request.
If step 250 reads the corresponding video information failure of the video ID and video ID from local cache, from this Ground file reads video ID and the corresponding video information of the video ID.
Wherein, when the corresponding video information of the acquisition video ID and video ID is successful every time, by what is successfully got Video ID and the corresponding video information of the video ID are based on preset rules and the local file are written, particularly will be each The high fever successfully got by the backup services of first preset service and the backup services of second preset service Video information is saved to the local file, it is contemplated that the problem of local file memory space, the high fever that will can get every time A part of video information is saved to the local file, such as the 2% of the high fever video information got every time is saved extremely The local file.
A kind of data request processing method provided in this embodiment, when default based on first for obtaining recommendation video ID When service acquisition recommends video ID failure, video ID and corresponding video information are read from local cache, is realized to described First preset service is revealed all the details;Recommend video ID success when obtaining based on the first preset service for obtaining recommendation video ID, Video information failure is obtained based on the second preset service for obtaining the corresponding video information of the video ID, then from local slow It deposits and reads video ID and the corresponding video information of the video ID, realize and reveal all the details to second preset service, pass through It reveals all the details respectively to two services most important in Feed service framework, improves the stability of Feed service framework.
Embodiment three
Fig. 3 is a kind of structural schematic diagram for data request processing device that the embodiment of the present disclosure three provides.With reference to Fig. 3, number It include: that the first acquisition module 310 and second obtains module 320 according to request processing unit;
Wherein, first module 310 is obtained, for when a request for data is received, determining for handling the request of data Preset service, based on the preset service obtain target data;Second obtains module 320, if for being based on the default clothes Business obtains target data failure, then reads target data from local cache;Wherein, the data of the local cache pass through described pre- If the backup services of service are written based on predeterminated frequency.
Further, the first acquisition module 310 specifically includes determination unit, and the determination unit is used to be based on preset number The preset service for handling the request of data is determined according to request processing flow;Alternatively, the request requested based on the data Target determines the preset service for handling the request of data.
Further, when the request of data received is video refresh request, the determination unit is specifically used for: being based on Preset video refresh request process flow is determined for obtaining the first preset service of video identifier ID and for obtaining State the second preset service of the corresponding video information of video ID;
Corresponding, the data of the local cache obtain in the following way:
Predeterminated frequency is based on by the backup services of first preset service and obtains video ID, and pre- by described second If the backup services of service obtain the corresponding video information of the video ID;
The video ID that will acquire and corresponding video information are stored to the local cache.
Further, described device further includes read module, if for obtaining video ID based on first preset service Failure then reads video ID from local cache.
Further, described device further include: disappear molality block, after reading video ID from local cache, to reading To video ID disappeared and handled again, to avoid the sender that identical video information is returned to the video refresh request;
Corresponding, the read module is also used to read the corresponding video information of video ID after disappearing weight from local cache.
Further, the read module is also used to: if based on first preset service acquisition video ID success, and base Video information failure is obtained in the second preset service for obtaining the corresponding video information of the video ID, then from local cache Read video ID and the corresponding video information of the video ID.
Further, the read module is also used to: if target data failure is read from local cache, from local file Read target data;
Wherein, when obtaining target data success every time, the target data successfully got is based on preset rules, institute is written State local file.
The technical solution of the present embodiment, by when a request for data is received, based on for handling the request of data Preset service obtains target data;If obtaining target data failure based on the preset service, target is read from local cache Data;Wherein, the technology that the data of the local cache are written by the backup services of the preset service based on predeterminated frequency Means realize the purpose for improving target data acquisition success rate, and then improve the stability of system response data request.
Method provided by disclosure any embodiment can be performed in the said goods, has the corresponding functional module of execution method And beneficial effect.
Example IV
Below with reference to Fig. 4, it illustrates the structural representations for the terminal device 400 for being suitable for being used to realize the embodiment of the present disclosure Figure.Terminal device in the embodiment of the present disclosure can include but is not limited to such as mobile phone, laptop, digital broadcasting and connect Receive device, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle Carry navigation terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.End shown in Fig. 4 End equipment is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 4, terminal device 400 may include processing unit (such as central processing unit, graphics processor etc.) 401, random access can be loaded into according to the program being stored in read-only memory (ROM) 402 or from storage device 408 Program in memory (RAM) 403 and execute various movements appropriate and processing.In RAM 403, it is also stored with terminal device Various programs and data needed for 400 operations.Processing unit 401, ROM 402 and RAM 403 pass through the phase each other of bus 404 Even.Input/output (I/O) interface 405 is also connected to bus 404.
In general, following device can connect to I/O interface 405: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 406 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 407 of dynamic device etc.;Storage device 408 including such as tape, hard disk etc.;And communication device 409.Communication device 409, which can permit terminal device 400, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 4 shows tool There is the terminal device 400 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.
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 communication device 409, or from storage device 408 It is mounted, or is mounted from ROM 402.When the computer program is executed by processing unit 401, the embodiment of the present disclosure is executed Method in the above-mentioned function that limits.
It should be noted that the above-mentioned computer-readable medium of the disclosure 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 the disclosure, 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 open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate 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: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned terminal device;It is also possible to individualism, and not It is fitted into the terminal device.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the end When end equipment executes, so that the terminal device: when a request for data is received, determining for handling the default of the request of data Service obtains target data based on the preset service;If target data failure is obtained based on the preset service, from local Caching reads target data;Wherein, the data of the local cache are based on default frequency by the backup services of the preset service Rate write-in.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+ +, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package, Part executes on the remote computer or holds on remote computer or service server completely on the user computer for part Row.In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize internet Service provider is connected by internet).
Flow chart and block diagram in attached drawing, illustrate the method and computer program product according to the various embodiments of the disclosure Architecture, function and operation in the cards.In this regard, each box in flowchart or block diagram can represent one A part of module, program segment or code, a part of the module, program segment or code include it is one or more for realizing The executable instruction of defined logic function.It should also be noted that in some implementations as replacements, function marked in the box It can also can occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated can actually base Originally it is performed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that It is the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, can uses 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 module or unit involved in the embodiment of the present disclosure can be realized by way of software, can also It is realized in a manner of through hardware.Wherein, module or the title of unit are not constituted under certain conditions to the module or list The restriction of member itself.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.
Note that above are only the preferred embodiment and institute's application technology principle of the disclosure.It will be appreciated by those skilled in the art that The present disclosure is not limited to specific embodiments described here, be able to carry out for a person skilled in the art it is various it is apparent variation, The protection scope readjusted and substituted without departing from the disclosure.Therefore, although being carried out by above embodiments to the disclosure It is described in further detail, but the disclosure is not limited only to above embodiments, in the case where not departing from disclosure design, also It may include more other equivalent embodiments, and the scope of the present disclosure is determined by the scope of the appended claims.

Claims (10)

1. a kind of data request processing method characterized by comprising
When a request for data is received, it determines the preset service for handling the request of data, is obtained based on the preset service Take target data;
If obtaining target data failure based on the preset service, target data is read from local cache;
Wherein, the data of the local cache are written by the backup services of the preset service based on predeterminated frequency.
2. the method according to claim 1, wherein it is described when a request for data is received, determine for handling The preset service of the request of data, comprising:
The preset service for handling the request of data is determined based on preset data request processing process;
Alternatively, the request target requested based on the data determines the preset service for handling the request of data.
3. according to the method described in claim 2, it is characterized in that, when the request of data received be video refresh request when, The preset service determined based on preset data request processing process for handling the request of data, comprising:
The first preset service and use for obtaining video identifier ID are determined based on preset video refresh request process flow In the second preset service for obtaining the corresponding video information of the video ID;
Corresponding, the data of the local cache obtain in the following way:
Predeterminated frequency is based on by the backup services of first preset service and obtains video ID, and passes through the described second default clothes The backup services of business obtain the corresponding video information of the video ID;
The video ID that will acquire and corresponding video information are stored to the local cache.
4. according to the method described in claim 3, it is characterized in that, being lost if obtaining video ID based on first preset service It loses, then reads video ID from local cache.
5. according to the method described in claim 4, it is characterized in that, the method is also after local cache reading video ID Include:
Disappeared to the video ID read and handled again, returns to the video refresh request to avoid by identical video information Sender;
The corresponding video information of video ID after disappearing weight is read from local cache.
6. according to the method described in claim 3, it is characterized in that, if based on first preset service obtain video ID at Function, and based on for obtaining the corresponding video information of the video ID the second preset service obtain video information failure, then from Local cache reads video ID and the corresponding video information of the video ID.
7. method according to claim 1-6, which is characterized in that the method also includes: if from local cache Target data failure is read, then reads target data from local file;
Wherein, when obtaining target data success every time, the target data successfully got is based on preset rules and is written described Ground file.
8. a kind of data request processing device characterized by comprising
First obtains module, for when a request for data is received, determining the preset service for handling the request of data, base Target data is obtained in the preset service;
Second obtains module, if reading target from local cache for obtaining target data failure based on the preset service Data;
Wherein, the data of the local cache are written by the backup services of the preset service based on predeterminated frequency.
9. a kind of terminal device, which is characterized in that the equipment includes:
One or more processing units;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processing units, so that one or more of processing fill Set the data request processing method realized as described in any in claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that program dress processed Set the data request processing method realized as described in any in claim 1-7 when execution.
CN201910612132.2A 2019-07-08 2019-07-08 A kind of data request processing method, apparatus, terminal device and storage medium Pending CN110334246A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910612132.2A CN110334246A (en) 2019-07-08 2019-07-08 A kind of data request processing method, apparatus, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910612132.2A CN110334246A (en) 2019-07-08 2019-07-08 A kind of data request processing method, apparatus, terminal device and storage medium

Publications (1)

Publication Number Publication Date
CN110334246A true CN110334246A (en) 2019-10-15

Family

ID=68144349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910612132.2A Pending CN110334246A (en) 2019-07-08 2019-07-08 A kind of data request processing method, apparatus, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN110334246A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111311014A (en) * 2020-02-27 2020-06-19 广州酷旅旅行社有限公司 Service data processing method and device, computer equipment and storage medium
CN111488521A (en) * 2020-04-07 2020-08-04 支付宝(杭州)信息技术有限公司 Data processing method and device
CN111510482A (en) * 2020-04-09 2020-08-07 广州酷狗计算机科技有限公司 Method and device for determining failed network request and computer storage medium
CN111526404A (en) * 2020-04-27 2020-08-11 杭州海康威视系统技术有限公司 Single frame playing method, device, equipment and storage medium
CN112199281A (en) * 2020-09-30 2021-01-08 中国平安财产保险股份有限公司 Data processing method and device, terminal equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036948A (en) * 2012-11-21 2013-04-10 北京航空航天大学 Network file processing method and execution node and software as a service (SaaS) platform
JP2014191840A (en) * 2013-03-27 2014-10-06 Hitachi-Lg Data Storage Inc Library device, library regeneration method, and library system
CN104918071A (en) * 2015-06-05 2015-09-16 广东欧珀移动通信有限公司 Video playing method, device and terminal equipment
CN105100886A (en) * 2014-04-22 2015-11-25 腾讯科技(北京)有限公司 Publish control method and system of network media information, device and server
CN107222567A (en) * 2017-07-07 2017-09-29 北京京东尚科信息技术有限公司 Method, device and the service cluster of processing data request

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036948A (en) * 2012-11-21 2013-04-10 北京航空航天大学 Network file processing method and execution node and software as a service (SaaS) platform
JP2014191840A (en) * 2013-03-27 2014-10-06 Hitachi-Lg Data Storage Inc Library device, library regeneration method, and library system
CN105100886A (en) * 2014-04-22 2015-11-25 腾讯科技(北京)有限公司 Publish control method and system of network media information, device and server
CN104918071A (en) * 2015-06-05 2015-09-16 广东欧珀移动通信有限公司 Video playing method, device and terminal equipment
CN107222567A (en) * 2017-07-07 2017-09-29 北京京东尚科信息技术有限公司 Method, device and the service cluster of processing data request

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111311014A (en) * 2020-02-27 2020-06-19 广州酷旅旅行社有限公司 Service data processing method and device, computer equipment and storage medium
CN111311014B (en) * 2020-02-27 2024-04-12 广州酷旅旅行社有限公司 Service data processing method, device, computer equipment and storage medium
CN111488521A (en) * 2020-04-07 2020-08-04 支付宝(杭州)信息技术有限公司 Data processing method and device
CN111510482A (en) * 2020-04-09 2020-08-07 广州酷狗计算机科技有限公司 Method and device for determining failed network request and computer storage medium
CN111526404A (en) * 2020-04-27 2020-08-11 杭州海康威视系统技术有限公司 Single frame playing method, device, equipment and storage medium
CN111526404B (en) * 2020-04-27 2022-07-08 杭州海康威视系统技术有限公司 Single frame playing method, video playing device, monitoring equipment and storage medium
CN112199281A (en) * 2020-09-30 2021-01-08 中国平安财产保险股份有限公司 Data processing method and device, terminal equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US11823677B2 (en) Interaction with a portion of a content item through a virtual assistant
CN110334246A (en) A kind of data request processing method, apparatus, terminal device and storage medium
US10593118B2 (en) Learning opportunity based display generation and presentation
US10969927B2 (en) Displaying information using expandable widgets
CN109299348A (en) A kind of data query method, apparatus, electronic equipment and storage medium
US11586772B2 (en) Method and device for displaying information
CN108965389A (en) Method for showing information
US20160261921A1 (en) Context based shopping capabilities when viewing digital media
CN109684589B (en) Client comment data processing method and device and computer storage medium
US20200034893A1 (en) Social infusion of media content
CN110392312A (en) Group chat construction method, system, medium and electronic equipment
CN110889263A (en) Document backlog generation method, device, equipment and storage medium
CN110472166A (en) Method and apparatus for showing the page
CN111931464A (en) Document editing method and device and electronic equipment
CN109116718B (en) Method and device for setting alarm clock
US11681895B2 (en) Cognitive assistant with recommendation capability
CN110351581A (en) A kind of data request processing method, apparatus, terminal device and storage medium
US11544765B1 (en) Item swap feature
CN110347467A (en) A kind of data request processing method, apparatus, terminal device and storage medium
CN113763009A (en) Picture processing method, picture skipping method, device, equipment and medium
US20130036374A1 (en) Method and apparatus for providing a banner on a website
US20200118193A1 (en) Digital content publisher negotiated transactional advertiser
CN110266813A (en) A kind of data request processing method, apparatus, terminal device and storage medium
CN110347951A (en) A kind of data request processing method, apparatus, terminal device and storage medium
US20190163830A1 (en) Customer service advocacy on social networking sites using natural language query response from site-level search results

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