CN110351581B - Data request processing method and device, terminal equipment and storage medium - Google Patents

Data request processing method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN110351581B
CN110351581B CN201910611396.6A CN201910611396A CN110351581B CN 110351581 B CN110351581 B CN 110351581B CN 201910611396 A CN201910611396 A CN 201910611396A CN 110351581 B CN110351581 B CN 110351581B
Authority
CN
China
Prior art keywords
preset
service
video
target data
acquiring
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.)
Active
Application number
CN201910611396.6A
Other languages
Chinese (zh)
Other versions
CN110351581A (en
Inventor
张晓聪
张小斌
林明星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201910611396.6A priority Critical patent/CN110351581B/en
Publication of CN110351581A publication Critical patent/CN110351581A/en
Application granted granted Critical
Publication of CN110351581B publication Critical patent/CN110351581B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/241Operating system [OS] processes, e.g. server setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25866Management of end-user data
    • H04N21/25891Management of end-user data being end-user preferences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26258Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/482End-user interface for program selection
    • H04N21/4825End-user interface for program selection using a list of items to be played back in a given order, e.g. playlists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream

Abstract

The embodiment of the disclosure discloses a data request processing method, a data request processing device, a terminal device and a storage medium, wherein the method comprises the following steps: when a data request is received, determining a preset service for processing the data request, and acquiring target data based on the preset service; if the target data acquisition based on the preset service fails, determining a backup service corresponding to the preset service, and acquiring the target data based on the backup service; if the target data acquisition based on the backup service fails, acquiring the target data from a preset database; and writing the data in the preset database through the backup service based on a preset frequency. Through the technical scheme of the embodiment of the disclosure, the success rate of the data request is improved.

Description

Data request processing method and device, terminal equipment and storage medium
Technical Field
The present disclosure relates to application software data processing technologies, and in particular, to a data request processing method and apparatus, a terminal device, and a storage medium.
Background
With the wide use of intelligent terminals, various application software is continuously updated. A list page (commonly referred to as Feed page) is a common interface presentation form in the existing application software client. The Feed page displays the list items one by one or recommends the display list items according to the interests and hobbies of the user for the user to check, and the user can enter the detail page to check the details or trigger the playing of the related list items by clicking the corresponding list items.
Because the Feed pages of some application software clients show the interestingness of the content and the accuracy of content recommendation, the interest and hobbies of each user are perfectly met, a large number of fan users are attracted, and the fan users are enabled to be refreshed. Thus, Feed pages of some application clients need to carry huge daily data.
It can be seen that the Feed page of the application client bears most of the advertising revenue of each application developer, and a small Feed accident (usually, the information list cannot be displayed normally or the viewing request of the user cannot be responded to, and the most important step in responding to the viewing request of the user is to acquire the target data to be displayed) may cause great economic loss to the developer and also affect the customer experience. Therefore, the stability of the application client Feed page is very important.
Disclosure of Invention
The embodiment of the disclosure provides a data request processing method and device, terminal equipment and a storage medium, so as to improve the success rate of data requests.
In a first aspect, an embodiment of the present disclosure provides a data request processing method, including:
when a data request is received, determining a preset service for processing the data request, and acquiring target data based on the preset service;
if the target data acquisition based on the preset service fails, determining a backup service corresponding to the preset service, and acquiring the target data based on the backup service;
if the target data acquisition based on the backup service fails, acquiring the target data from a preset database;
and writing the data in the preset database through the backup service based on a preset frequency.
Further, if the target data is not obtained from the preset database, the method further comprises:
reading target data from a local file;
and writing the successfully acquired target data into the local file each time the target data is successfully acquired based on the preset service or the backup service.
Further, when a data request is received, determining a preset service for processing the data request includes:
determining a preset service for processing the data request based on a preset data request processing flow;
or, determining a preset service for processing the data request based on a request target of the data request.
Further, when the received data request is a video refresh request, the determining, based on a preset data request processing flow, a preset service for processing the data request includes:
determining a preset service for acquiring a video ID (Identification) based on a preset video refresh request processing flow;
correspondingly, acquiring target data based on the preset service includes:
and acquiring a video ID according to the interest characteristics of the video refreshing request sender through the preset service.
Further, obtaining target data based on the backup service includes:
and acquiring the video ID based on the browsing amount or praise amount of each video in the video library through the backup service of the preset service.
Further, when the video ID is successfully obtained, the method further includes: determining a preset service for acquiring video information corresponding to the video ID, and acquiring the video information corresponding to the video ID based on the preset service for acquiring the video information corresponding to the video ID;
if the video information fails to be acquired, reading the video information from a local file;
and writing the successfully acquired video information into the local file based on a preset rule every time the video information is successfully acquired based on a preset service for acquiring the video information corresponding to the video ID.
Further, the writing the video information successfully acquired into the local file based on a preset rule includes:
randomly determining target information with a preset proportion from the successfully acquired video information;
and writing the determined target information into the local file.
In a second aspect, an embodiment of the present disclosure further provides a data request processing apparatus, where the apparatus includes:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for determining a preset service for processing a data request when the data request is received, and acquiring target data based on the preset service;
the second obtaining module is used for determining a backup service corresponding to the preset service if the target data is failed to be obtained based on the preset service, and obtaining the target data based on the backup service;
the third acquisition module is used for acquiring the target data from a preset database if the target data acquisition based on the backup service fails;
and writing the data in the preset database through the backup service based on a preset frequency.
Further, the apparatus further comprises: the fourth acquisition module is used for reading the target data from the local file if the target data acquisition from the preset database fails;
and writing the successfully acquired target data into the local file each time the target data is successfully acquired based on the preset service or the backup service.
Further, the first obtaining module specifically includes: a determining unit and an acquiring unit;
the determining unit is used for determining a preset service for processing the data request based on a preset data request processing flow when the data request is received; or, determining a preset service for processing the data request based on a request target of the data request;
the acquisition unit is used for acquiring target data based on the preset service.
Further, when the received data request is a video refresh request, the determining unit is specifically configured to: determining a preset service for acquiring a video ID based on a preset video refresh request processing flow;
correspondingly, the obtaining unit is specifically configured to: and acquiring a video ID according to the interest characteristics of the video refreshing request sender through the preset service.
Further, the second obtaining module is specifically configured to: and acquiring the video ID based on the browsing amount or praise amount of each video in the video library through the backup service of the preset service.
Further, the apparatus further comprises: the device comprises a first video information acquisition module and a second video information acquisition module;
the first video information acquisition module is used for determining a preset service for acquiring video information corresponding to a video ID when the video ID is successfully acquired, and acquiring the video information corresponding to the video ID based on the preset service for acquiring the video information corresponding to the video ID;
the second video information acquisition module is used for reading the video information from the local file if the video information acquisition by the first video information acquisition module fails;
and writing the successfully acquired video information into the local file based on a preset rule every time the video information is successfully acquired based on a preset service for acquiring the video information corresponding to the video ID.
Further, the writing the video information successfully acquired into the local file based on a preset rule includes:
randomly determining target information with a preset proportion from the successfully acquired video information;
and writing the determined target information into the local file.
In a third aspect, an embodiment of the present disclosure further provides a terminal device, where the terminal device includes:
one or more processing devices;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processing devices, the one or more processing devices are caused to implement the data request processing method according to the embodiment of the present disclosure.
In a fourth aspect, the disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processing device, implements a data request processing method according to the disclosed embodiments.
According to the data request processing method provided by the embodiment of the disclosure, when a data request is received, a preset service for processing the data request is determined, and target data is acquired based on the preset service; if the target data acquisition based on the preset service fails, determining a backup service corresponding to the preset service, and acquiring the target data based on the backup service; and if the target data acquisition based on the backup service fails, acquiring the target data from a preset database, wherein the data in the preset database is written in based on a preset frequency through the backup service, so that the purpose of improving the success rate of data request processing is achieved, and the stability of a system for responding to the data request is improved.
Drawings
Fig. 1 is a schematic flowchart of a data request processing method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a data request processing method according to a second embodiment of the disclosure;
fig. 3 is a schematic structural diagram of a data request processing apparatus according to a third embodiment of the present disclosure;
fig. 4 is a schematic diagram of a hardware structure of a terminal device according to a fourth embodiment of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the disclosure and are not limiting of the disclosure. It should be further noted that, for the convenience of description, only some of the structures relevant to the present disclosure are shown in the drawings, not all of them.
In the following embodiments, optional features and examples are provided in each embodiment, and various features described in the embodiments may be combined to form a plurality of alternatives, and each numbered embodiment should not be regarded as only one technical solution.
Example one
Fig. 1 is a schematic flowchart of a data request processing method according to an embodiment of the present disclosure. The method is applicable to the case of responding to a data request sent by a client, and can be executed by a data request processing device, which can be formed by hardware and/or software and is generally integrated with a server. Referring to fig. 1, the method specifically includes the following steps:
step 110, when a data request is received, determining a preset service for processing the data request, and acquiring target data based on the preset service.
The data request comprises a request for requesting any data, for example, if a user wants to check a certain picture of a friend circle through a mobile phone, the user can send a request for acquiring picture data to a server through the mobile phone; for example, if a user wants to refresh a fun video through an application of a mobile phone, a request for acquiring video data may be sent through a related video refresh page. The preset service for processing the data request refers to a service for responding to the data request to obtain corresponding target data.
Illustratively, the determining the predetermined service for processing the data request includes:
determining a preset service for processing the data request based on a preset data request processing flow;
or, determining a preset service for processing the data request based on a request target of the data request.
If the data request needs to be processed by at least two services with different functions and the at least two services with different functions are interdependent, determining a preset service for processing the data request according to a preset data request processing flow. For example, when the data request is a video refresh request sent by a client, it is determined that the preset services for processing the video refresh request are respectively: the service for acquiring the video ID and the service for acquiring the video information corresponding to the video ID. If only one independent service is required for processing the data request, a preset service for processing the data request may be determined based on a request target of the data request. For example, when the data request is a display request of a specific picture sent by a client, the preset service for processing the display request is determined as follows according to a request target of the display request (request of the specific picture data): a service for downloading specific picture data from a picture library.
Step 120, if the target data acquisition based on the preset service fails, determining a backup service corresponding to the preset service, and acquiring the target data based on the backup service.
Wherein, the condition of failure to acquire the target data based on the preset service comprises: and the preset service returns error data aiming at the data request, or the preset service does not return data aiming at the data request within a set time length. The backup service corresponding to the preset service refers to a service having the same or similar service function as the preset service, if the backup service and the preset service have the same service logic, the backup service and the preset service have the same service function, the backup service is only a copy of the preset service, and the purpose is that when the preset service is abnormal, the backup service can continue to process the received data request, so that the stability of the system for processing the data request is improved. If the backup service and the preset service have different service logics (usually, the backup service has a simpler service logic, a lower calculation amount, a more complex service logic, and a higher calculation amount), but both have similar service functions, usually, the backup service is a bottom-of-pocket service of the preset service, and is used for processing a data request instead of the preset service when the preset service is abnormal, at this time, the priority of processing the data request by the backup service is lower than the priority of processing the data request by the preset service, that is, when the data request arrives, the data request is preferentially processed by the preset service for processing the data request to acquire target data, and if the acquisition of the target data based on the preset service fails, the data request is processed based on the backup service of the preset service, to obtain target data. It can be understood that, when the priority of the data request processing by the backup service is lower than the priority of the data request processing by the preset service, the result of processing the data request based on the backup service is not as good as the result of processing the data request based on the preset service according to the design expectation, and the design is designed to ensure the basic capability of the system for processing the data request when the preset service is abnormal, thereby ensuring the basic user experience.
Step 130, if the target data acquisition based on the backup service fails, acquiring the target data from a preset database.
The data in the preset database is written in through the backup service based on a preset frequency, that is, no matter whether a data request is received or not, the target data is obtained through the backup service according to a certain frequency, and the obtained target data is written in the preset database. The bottom-binding scheme mainly aims at the condition that the service pressure of the preset service is suddenly high, when the service pressure of the preset service is high, the probability of abnormity of the preset service is correspondingly increased, when the preset service is abnormal, all the service pressure can be added to the backup service, and if the backup service is also abnormal, the target data can be read from the preset database to respond to the received data request in order to ensure the basic service function. The preset database may typically be a Redis, which is an open-source log-type and Key-Value database written in ANSI C language, supporting network, and based on memory and can also be persistent. Compared with the method for acquiring the target data based on the preset service or the backup service, the method for reading the target data from the Redis does not need the server to perform logic operation processing, the pressure of the server is greatly reduced, and the success rate of the data request is ensured.
Further, if the target data is not obtained from the preset database, the method further comprises:
reading target data from a local file;
and writing the successfully acquired target data into the local file each time the target data is successfully acquired. The local service server is used for carrying the preset service and the backup service. And the target data successfully acquired each time comprises the target data successfully acquired based on the preset service and the target data successfully acquired based on the backup service.
According to the technical scheme of the embodiment, when a data request is received, target data are obtained based on a preset service for processing the data request, and if the target data are failed to be obtained based on the preset service, the target data are obtained based on a backup service corresponding to the preset service; if the target data acquisition based on the backup service fails, acquiring the target data from a preset database; the data in the preset database is written in through the backup service based on the preset frequency, if the target data are unsuccessfully obtained from the preset database, the target data are read from the local file, and the target data which are successfully obtained are written in the local file every time the target data are successfully obtained, so that the purpose of improving the success rate of data requests is achieved, and the stability of the system is improved.
Example two
Fig. 2 is a flowchart illustrating a data request processing method according to a second embodiment of the disclosure. The present embodiment is embodied on the basis of various alternatives in the above embodiments, and provides an alternative data request processing method. Specifically, the data request processing method is applied to a Feed request scene, and the Feed request scene is as follows: the method comprises the steps that a user sends a video refreshing request through a client, when a server corresponding to the client receives the refreshing request, recommended videos which are interesting to the user are calculated and searched according to interests and hobbies of the user at the client, and finally the recommended videos which are interesting to the user are returned to the client. At present, a plurality of application clients specially recommend interesting videos for users, perfectly cater to the interests of each user, and enable the users to brush up and feel like their own. Therefore, the Feed page of the client needs to carry huge daily data, the service pressure of the server corresponding to the client is increased day by day, and the data request processing scheme of the embodiment is provided for improving the stability of the server. Specifically referring to fig. 2, the data request processing method includes the following steps:
step 210, when a video refresh request is received, determining a preset service for acquiring a video ID based on a preset video refresh request processing flow, and acquiring the video ID based on the preset service.
The video refreshing request is a video refreshing request sent by a client. When a video refresh request is received, determining a preset service for acquiring a video ID based on a preset processing flow, wherein the video ID specifically refers to a recommended video ID which is interested by a user and is sent by the video refresh request.
Specifically, obtaining a video ID based on the preset service includes:
and acquiring a video ID according to the interest characteristics of the video refreshing request sender through the preset service.
The interest characteristics of the video refresh request sender can be calculated based on the gender, age, occupation, historical video watching type or historical click behavior of the sending user. Matching the interest characteristics of the sending user with the video types represented by the video IDs on the basis of a preset rule, sequencing the video IDs according to the matching degree, and finally taking a certain number of video IDs sequenced at the front as recommended video IDs.
Step 220, if the video ID acquisition based on the preset service fails, the video ID is acquired based on the backup service of the preset service.
Specifically, the high-heat video ID is acquired based on the browsing amount or the praise amount of each video in the video library through the backup service of the preset service. In this embodiment, the backup service is different from the preset service in service logic, the backup service is simpler in service logic and the preset service is more complex in service logic, the recommended video ID acquired by the preset service is a video ID that is interesting for the video refresh request sending user, and the recommended video ID acquired by the preset service can bring better user experience to the video refresh request sending user; the video ID acquired through the backup service is the ID of the high-heat video, and the interest and hobbies of the user are not considered, so that the basic experience of the user can be ensured through the video ID acquired through the backup service. Correspondingly, the priority of the video refreshing request processed by the preset service is higher than that of the video refreshing request processed by the backup service, when the server receives the video refreshing request, the recommended video ID is preferentially obtained based on the preset service, and if the recommended video ID fails to be obtained based on the preset service, the high-heat video ID is obtained based on the backup service, so that the stability of the server is improved.
Step 230, if the video ID acquisition based on the backup service fails, acquiring the video ID from a preset database.
The video ID in the preset database is written based on a preset frequency through the backup service, so that it can be understood that the video ID in the preset database is a high-heat video ID, not a recommended video ID.
The most critical steps in the Feed service framework include two steps: the first step is to obtain a recommended video ID which is interested by a user; and secondly, acquiring video information based on the acquired recommended video ID, and returning the acquired video information to the client to realize refreshing display of the video. In any of the two steps, the video refreshing function of the client cannot be realized when a problem occurs, that is, the video display cannot be performed at the client, and the user cannot watch the interesting video, so that the two steps are very important for the user experience. Based on this, the embodiment provides a bottom-pocking scheme when the preset service for acquiring the recommended video ID is abnormal, which improves the stability of the Feed service framework.
And step 240, reading the video ID from the local file if the video ID is not obtained from the preset database.
And writing the successfully acquired high-heat video ID into a local file each time the high-heat video ID is successfully acquired based on the backup service.
Step 250, when the video ID is successfully acquired, determining a preset service for acquiring the video information corresponding to the video ID, and acquiring the video information corresponding to the video ID based on the preset service for acquiring the video information corresponding to the video ID.
The video information is video content information corresponding to the video ID, and specifically includes: video title information, background music information of the video, bitrate of the video, frame rate information, author information of the video, and the like.
And step 260, if the video information is failed to be acquired, reading the video information from the local file.
And writing the successfully acquired video information into the local file based on a preset rule when the video information is successfully acquired through the preset service for acquiring the video information corresponding to the video ID.
Illustratively, the writing the video information that is successfully acquired into the local file based on a preset rule includes: randomly determining target information with a preset proportion from the successfully acquired video information;
and writing the determined target information into the local file.
For example, if 100 pieces of video information are successfully acquired at the present time, any 20 pieces of video information are written into the local file.
The stability of the Feed service framework is further improved by carrying out bottom packing on the preset service for acquiring the video information in the Feed service framework.
According to the data request processing method provided by the embodiment, the preset service for acquiring the recommended video ID and the preset service for acquiring the video information corresponding to the video ID by the user are respectively subjected to bottom-covering, so that bottom-covering of the two most important services in the Feed service framework is realized, and the stability of the Feed service framework is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a data request processing apparatus according to a third embodiment of the present disclosure. Referring to fig. 3, the data request processing apparatus includes: a first acquisition module 310, a second acquisition module 320, and a third module 330;
the first obtaining module 310 is configured to, when a data request is received, determine a preset service for processing the data request, and obtain target data based on the preset service; a second obtaining module 320, configured to determine, if obtaining target data based on the preset service fails, a backup service corresponding to the preset service, and obtain the target data based on the backup service; a third obtaining module 330, configured to obtain the target data from a preset database if obtaining the target data based on the backup service fails; and writing the data in the preset database through the backup service based on a preset frequency.
Further, the apparatus further comprises: the fourth acquisition module is used for reading the target data from the local file if the target data acquisition from the preset database fails; and writing the successfully acquired target data into the local file each time the target data is successfully acquired based on the preset service or the backup service.
Further, the first obtaining module 310 specifically includes: a determining unit and an acquiring unit;
the determining unit is used for determining a preset service for processing the data request based on a preset data request processing flow when the data request is received; or, determining a preset service for processing the data request based on a request target of the data request;
the acquisition unit is used for acquiring target data based on the preset service.
Further, when the received data request is a video refresh request, the determining unit is specifically configured to: determining a preset service for acquiring a video ID based on a preset video refresh request processing flow;
correspondingly, the obtaining unit is specifically configured to: and acquiring a video ID according to the interest characteristics of the video refreshing request sender through the preset service.
Further, the second obtaining module 320 is specifically configured to: and acquiring the video ID based on the browsing amount or praise amount of each video in the video library through the backup service of the preset service.
Further, the apparatus further comprises: the device comprises a first video information acquisition module and a second video information acquisition module;
the first video information acquisition module is used for determining a preset service for acquiring video information corresponding to a video ID when the video ID is successfully acquired, and acquiring the video information corresponding to the video ID based on the preset service for acquiring the video information corresponding to the video ID;
the second video information acquisition module is used for reading the video information from the local file if the video information acquisition by the first video information acquisition module fails;
and writing the successfully acquired video information into the local file based on a preset rule every time the video information is successfully acquired based on a preset service for acquiring the video information corresponding to the video ID.
Further, the writing the video information successfully acquired into the local file based on a preset rule includes:
randomly determining target information with a preset proportion from the successfully acquired video information;
and writing the determined target information into the local file.
According to the technical scheme of the embodiment, when a data request is received, target data are obtained based on a preset service for processing the data request, and if the target data are failed to be obtained based on the preset service, the target data are obtained based on a backup service corresponding to the preset service; if the target data acquisition based on the backup service fails, acquiring the target data from a preset database; the data in the preset database is written in through the backup service based on the preset frequency, if the target data are unsuccessfully obtained from the preset database, the target data are read from the local file, and the target data which are successfully obtained are written in the local file every time the target data are successfully obtained, so that the purpose of improving the success rate of data requests is achieved, and the stability of the system is improved.
The data request processing device can execute the data request processing method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Referring now to fig. 4, a block diagram of a terminal device 400 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The terminal device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the terminal device 400 may include a processing means (e.g., a central processing unit, a graphic processor, etc.) 401 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the terminal apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the terminal device 400 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 illustrates a terminal apparatus 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be included in the terminal device; or may exist separately without being assembled into the terminal device.
The computer readable medium carries one or more programs which, when executed by the terminal device, cause the terminal device to: when a data request is received, determining a preset service for processing the data request, and acquiring target data based on the preset service; if the target data acquisition based on the preset service fails, determining a backup service corresponding to the preset service, and acquiring the target data based on the backup service; if the target data acquisition based on the backup service fails, acquiring the target data from a preset database; and writing the data in the preset database through the backup service based on a preset frequency.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or service server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the designation of a module or unit does not in some cases constitute a limitation of the module or unit itself.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present disclosure and the technical principles employed. Those skilled in the art will appreciate that the present disclosure is not limited to the particular embodiments described herein, and that various obvious changes, adaptations, and substitutions are possible, without departing from the scope of the present disclosure. Therefore, although the present disclosure has been described in greater detail with reference to the above embodiments, the present disclosure is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present disclosure, the scope of which is determined by the scope of the appended claims.

Claims (9)

1. A method for processing a data request, comprising:
acquiring target data according to a preset frequency through a backup service corresponding to a preset service, and writing the acquired target data into a preset database;
when a data request is received, determining the preset service for processing the data request, and acquiring target data based on the preset service;
if the target data acquisition based on the preset service fails, determining a backup service corresponding to the preset service, and acquiring the target data based on the backup service;
if the target data acquisition based on the backup service fails, acquiring the target data from the preset database;
if the target data are failed to be acquired from the preset database, reading the target data from a local file;
and writing the successfully acquired target data into the local file each time the target data is successfully acquired based on the preset service or the backup service.
2. The method of claim 1, wherein determining a pre-set service for processing the data request when the data request is received comprises:
determining a preset service for processing the data request based on a preset data request processing flow;
or, determining a preset service for processing the data request based on a request target of the data request.
3. The method according to claim 2, wherein when the received data request is a video refresh request, the determining a preset service for processing the data request based on a preset data request processing flow comprises:
determining a preset service for acquiring a video identifier ID based on a preset video refresh request processing flow;
correspondingly, acquiring target data based on the preset service includes:
and acquiring a video ID according to the interest characteristics of the video refreshing request sender through the preset service.
4. The method of claim 3, wherein obtaining target data based on the backup service comprises:
and acquiring the video ID based on the browsing amount or praise amount of each video in the video library through the backup service of the preset service.
5. The method of claim 3, wherein upon successful acquisition of the video ID, the method further comprises: determining a preset service for acquiring video information corresponding to the video ID, and acquiring the video information corresponding to the video ID based on the preset service for acquiring the video information corresponding to the video ID;
if the video information fails to be acquired, reading the video information from a local file;
and writing the successfully acquired video information into the local file based on a preset rule every time the video information is successfully acquired based on a preset service for acquiring the video information corresponding to the video ID.
6. The method according to claim 5, wherein writing the successfully acquired video information into the local file based on a preset rule comprises:
randomly determining target information with a preset proportion from the successfully acquired video information;
and writing the determined target information into the local file.
7. A data request processing apparatus, comprising:
the first acquisition module is used for acquiring target data according to a preset frequency through a backup service corresponding to a preset service and writing the acquired target data into a preset database; when a data request is received, determining the preset service for processing the data request, and acquiring target data based on the preset service;
the second obtaining module is used for determining a backup service corresponding to the preset service if the target data is failed to be obtained based on the preset service, and obtaining the target data based on the backup service;
a third obtaining module, configured to obtain target data from the preset database if obtaining of the target data based on the backup service fails;
the data request processing apparatus further includes:
the fourth acquisition module is used for reading the target data from the local file if the target data acquisition from the preset database fails; and writing the successfully acquired target data into the local file each time the target data is successfully acquired based on the preset service or the backup service.
8. A terminal device, characterized in that the device comprises:
one or more processing devices;
storage means for storing one or more programs;
when executed by the one or more processing devices, cause the one or more processing devices to implement a data request processing method as claimed in any one of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processing device, carries out a data request processing method according to any one of claims 1 to 6.
CN201910611396.6A 2019-07-08 2019-07-08 Data request processing method and device, terminal equipment and storage medium Active CN110351581B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910611396.6A CN110351581B (en) 2019-07-08 2019-07-08 Data request processing method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910611396.6A CN110351581B (en) 2019-07-08 2019-07-08 Data request processing method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110351581A CN110351581A (en) 2019-10-18
CN110351581B true CN110351581B (en) 2022-02-18

Family

ID=68178442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910611396.6A Active CN110351581B (en) 2019-07-08 2019-07-08 Data request processing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110351581B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114077639A (en) * 2020-08-20 2022-02-22 北京字节跳动网络技术有限公司 Data writing method and device, electronic equipment and storage medium
CN113268666B (en) * 2021-05-25 2024-01-23 北京达佳互联信息技术有限公司 Content recommendation method, device, server and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431648A (en) * 2008-12-11 2009-05-13 北京东方广视科技有限责任公司 Cable television VOD backup method, system and equipment
CN104486438A (en) * 2014-12-22 2015-04-01 华为技术有限公司 Disaster-tolerant method and disaster-tolerant device of distributed storage system
CN108900337A (en) * 2018-06-29 2018-11-27 郑州云海信息技术有限公司 A kind of fault recovery method of Metadata Service, server, client and system
CN109600672A (en) * 2018-10-19 2019-04-09 北京微播视界科技有限公司 Video content method for pushing and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170142454A1 (en) * 2015-11-13 2017-05-18 Le Holdings (Beijing) Co., Ltd. Third-party video pushing method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431648A (en) * 2008-12-11 2009-05-13 北京东方广视科技有限责任公司 Cable television VOD backup method, system and equipment
CN104486438A (en) * 2014-12-22 2015-04-01 华为技术有限公司 Disaster-tolerant method and disaster-tolerant device of distributed storage system
CN108900337A (en) * 2018-06-29 2018-11-27 郑州云海信息技术有限公司 A kind of fault recovery method of Metadata Service, server, client and system
CN109600672A (en) * 2018-10-19 2019-04-09 北京微播视界科技有限公司 Video content method for pushing and device

Also Published As

Publication number Publication date
CN110351581A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN109976620B (en) Method, device, equipment and storage medium for determining list item display attribute information
CN109684589B (en) Client comment data processing method and device and computer storage medium
CN111444356B (en) Recommendation method and device based on search
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN110334246A (en) A kind of data request processing method, apparatus, terminal device and storage medium
CN112395022B (en) Information display method, information display device, electronic equipment and computer readable storage medium
US20140337091A1 (en) Method and system for contextual profiling for object interactions and its application to matching symmetrical objects
CN108600780B (en) Method for pushing information, electronic device and computer readable medium
CN110351581B (en) Data request processing method and device, terminal equipment and storage medium
CN111291258A (en) Recommendation method and device for searching hot words, electronic equipment and readable medium
CN109902726B (en) Resume information processing method and device
CN112836128A (en) Information recommendation method, device, equipment and storage medium
CN110266813B (en) Data request processing method and device, terminal equipment and storage medium
CN110619101B (en) Method and apparatus for processing information
CN111260445A (en) House resource information display method, device, terminal and storage medium
CN115563134A (en) Interaction method, interaction device, electronic equipment and computer readable medium
CN110347467A (en) A kind of data request processing method, apparatus, terminal device and storage medium
CN109684015B (en) Interface data loading method and device, electronic equipment and storage medium
CN110809087A (en) Screen locking information display method and device and electronic equipment
CN110347951A (en) A kind of data request processing method, apparatus, terminal device and storage medium
CN111475749A (en) Information display target optimization method and device, electronic equipment and readable medium
CN111310031B (en) House source information display method, device, terminal and storage medium
US11856251B1 (en) Systems and methods for providing notifications based on geographic location
CN111259174B (en) Multimedia transmission method, device, electronic equipment and medium
CN111625162B (en) Information list generation method and device

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
GR01 Patent grant
GR01 Patent grant