CN110266813B - 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
CN110266813B
CN110266813B CN201910611385.8A CN201910611385A CN110266813B CN 110266813 B CN110266813 B CN 110266813B CN 201910611385 A CN201910611385 A CN 201910611385A CN 110266813 B CN110266813 B CN 110266813B
Authority
CN
China
Prior art keywords
video
service
preset service
target data
data request
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
CN201910611385.8A
Other languages
Chinese (zh)
Other versions
CN110266813A (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 CN201910611385.8A priority Critical patent/CN110266813B/en
Publication of CN110266813A publication Critical patent/CN110266813A/en
Application granted granted Critical
Publication of CN110266813B publication Critical patent/CN110266813B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • 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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • 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/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/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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • 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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • 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/81Monomedia components thereof
    • H04N21/812Monomedia components thereof involving advertisement data
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Computer Graphics (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Information Transfer Between Computers (AREA)

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, reading the target data from a local file; acquiring information to be released corresponding to the target data through an information releasing service; and returning the information to be released and the target data to the data request sending end. By the technical scheme of the embodiment of the disclosure, the purpose of improving the success rate of acquiring the target data and ensuring the advertising benefit of the service system is achieved.

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 carries most of the advertising revenue of each application developer, and a small Feed accident (usually, the failure to display the information list normally or to respond to the user's viewing request) may cause great economic loss to the developer, and also may 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, a data request processing device, a terminal device and a storage medium, so as to improve the success rate of acquiring target data and ensure the advertising benefit of a service system.
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, reading the target data from a local file;
acquiring information to be released corresponding to the target data through an information releasing service;
and returning the information to be released and the target data to the data request sending end.
Further, when the target data is successfully acquired based on the preset service, the successfully acquired target data is backed up to the local file each time.
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 first preset service for acquiring a video identification ID and a second preset service for acquiring video information corresponding to the video ID based on a preset video refreshing request processing flow.
Further, the obtaining target data based on the preset service includes:
acquiring a video ID according to the interest characteristics of the video refreshing request sender through the first preset service;
acquiring video information corresponding to the video ID through the second preset service;
correspondingly, when the video information is successfully acquired based on the second preset service, the successfully acquired video information is backed up to the local file based on a set rule.
Further, if the video information corresponding to the video ID fails to be acquired through the second preset service, after the video information is read from the local file, the method further includes:
and performing deduplication processing on the read video information to avoid returning the same video information to the sending end of the video refreshing request.
Further, the backing up the video information successfully acquired to the local file based on the set 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.
Further, the method further comprises: if the video ID is failed to be acquired based on the first preset service, 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 first preset service;
and if the video information corresponding to the video ID is failed to be acquired based on the second preset service, acquiring the video information corresponding to the video ID based on the backup service of the second preset service.
Further, returning the information to be delivered and the target data to the data request sending end includes:
splicing the information to be launched and the target data based on a set splicing structure;
and returning the spliced data to the data request sending end. In a second aspect, an embodiment of the present disclosure further provides a data request processing apparatus, where the apparatus includes:
the first target data 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 target data acquisition module is used for reading the target data from the local file if the target data acquisition based on the preset service fails;
the information to be released acquisition module is used for acquiring information to be released corresponding to the target data through an information release service;
and the return module is used for returning the information to be released and the target data to the data request sending end.
Further, when the target data is successfully acquired based on the preset service, the successfully acquired target data is backed up to the local file each time.
Further, the first target data obtaining module includes: the device comprises a determining unit, a processing unit and a processing unit, wherein the determining unit is used for determining a preset service for processing a 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 unit is specifically configured to: determining a first preset service for acquiring a video identification ID and a second preset service for acquiring video information corresponding to the video ID based on a preset video refreshing request processing flow.
Further, the first target data obtaining module further includes: a first obtaining unit, configured to obtain, through the first preset service, a video ID according to an interest feature of the video refresh request sender; acquiring video information corresponding to the video ID through the second preset service;
correspondingly, when the video information is successfully acquired based on the second preset service, the successfully acquired video information is backed up to the local file based on a set rule.
Further, the apparatus further includes a duplicate elimination module, configured to, if the video information corresponding to the video ID fails to be obtained through the second preset service, perform duplicate elimination processing on the read video information after the video information is read from the local file, so as to avoid returning the same video information to the sending end of the video refresh request.
Further, the first target data obtaining module further includes: a second obtaining unit, configured to, if obtaining of the video ID based on the first preset service fails, obtain, through a backup service of the first preset service, the video ID based on a browsing amount or a praise amount of each video in a video library; and if the video information corresponding to the video ID is failed to be acquired based on the second preset service, acquiring the video information corresponding to the video ID based on the backup service of the second preset service.
Further, the return module comprises a splicing unit and a return unit, wherein the splicing unit is used for splicing the information to be launched and the target data based on a set splicing structure;
the return unit is used for returning the spliced data to the data request sending end.
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, reading the target data from a local file; acquiring information to be released corresponding to the target data through an information releasing service; returning the information to be released and the target data to the data request sending terminal; and when the target data is successfully acquired based on the preset service, backing up the successfully acquired target data to the local file, so that the aim of improving the success rate of acquiring the target data and ensuring the advertising benefit of a service system is fulfilled.
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 in the case of responding to data requests, and may be performed by a data request processing device, which may be constituted by hardware and/or software, and is generally integrated in 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 any request for requesting 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.
And 120, reading the target data from the local file if the target data acquisition based on the preset service fails.
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 data of the local file is obtained by the following method: and when the target data is successfully acquired based on the preset service, backing up the successfully acquired target data to the local file. Specifically, in consideration of the problem of the storage capacity of the local file, each time the target data is successfully acquired through the preset service, target information of a preset proportion is randomly determined from the successfully acquired target data, and the determined target information is written into the local file. For example, if 100 pieces of video information are successfully acquired through the preset service at the current time, any 20 pieces of video information are written into the local file.
And step 130, obtaining information to be released corresponding to the target data through an information releasing service.
The information to be delivered generally includes advertisement information, and the information delivery service refers to a service for acquiring advertisement information through a preset channel. In order to realize the advertisement revenue, the advertisement delivery system delivers the advertisement information to the user based on a certain strategy, so that the user enters a page for watching the advertisement information from a set entrance, and the advertisement delivery system can obtain the flow of the user, thereby generating the corresponding advertisement revenue. The information delivery service is specifically a service for acquiring advertisement information from an advertisement delivery system. The target data is data requested by a user, and the information to be delivered corresponding to the target data refers to advertisement information which is expected to be displayed to the user together with the target data, for example, if the target data is video information, the information to be delivered refers to advertisement information interspersed in the video information, and the purpose is to improve the conversion rate of the advertisement information through the video information, that is, the advertisement information is expected to be watched by more users, so that the advertisement profit is realized.
Generally, a preset service for processing the data request is docked with an information delivery service, that is, corresponding information to be delivered can be obtained while target data is obtained through the preset service, that is, the target data includes information to be delivered, and an Ack (Acknowledgement character) is performed on the information to be delivered through a relevant service docked by the preset service, so that a corresponding economic benefit can be obtained from the information to be delivered obtained through the preset service. However, when the preset service cannot work normally, if the message to be launched in the cached target data is read from the local file, the part of the message to be launched cannot perform Ack on the part of the message to be launched through the relevant service docked by the preset service (because the preset service cannot work normally, the docked relevant service cannot be called), and therefore the part of the message to be launched cannot obtain corresponding economic benefits. Based on this, in order to ensure the advertisement benefit of the service system, in the data request processing method provided in this embodiment, when the target data is not obtained based on the preset service and the target data is read from the local file, the information delivery service is separately called again to obtain the information to be delivered corresponding to the target data, so that the corresponding economic benefit is realized, and the advertisement benefit of the service system is ensured.
And step 140, returning the information to be released and the target data to the data request sending end.
Specifically, returning the information to be delivered and the target data to the data request sending end includes:
splicing the information to be launched and the target data based on a set splicing structure;
and returning the spliced data to the data request sending end.
The set splicing structure determines the position relation between the information to be released and the target data and the data format of the information to be released and the target data. For example, if the information to be delivered is advertisement information and the target data is video information, the splicing structure determines the problem that the advertisement information is displayed at which stage the video is played, and also determines that the advertisement information and the video information need to be finally converted into a JSON format that can be identified by a client.
According to the technical scheme of the embodiment, when a data request is received, a preset service for processing the data request is determined, and target data are obtained based on the preset service; if the target data acquisition based on the preset service fails, reading the target data from a local file; acquiring information to be released corresponding to the target data through an information releasing service; returning the information to be released and the target data to the data request sending terminal; and when the target data is successfully acquired based on the preset service, backing up the successfully acquired target data to the local file, so that the aim of improving the success rate of acquiring the target data and ensuring the advertising benefit of a service system is fulfilled.
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, videos which are interesting to the client are calculated and searched according to interests and hobbies of the client user, and the videos which are interesting to the user are finally 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 first preset service for acquiring a video identifier ID and a second preset service for acquiring video information corresponding to the video ID based on a preset video refresh request processing flow.
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 corresponding 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. Based on the above, when a video refresh request is received, a first preset service for acquiring a video ID and a second preset service for acquiring video information corresponding to the video ID are determined based on a preset video refresh request processing flow, a recommended video ID is acquired based on the first preset service, and after the recommended video ID is successfully acquired, video information corresponding to the recommended video ID is acquired based on the second preset service.
And step 220, acquiring a video ID according to the interest characteristics of the video refreshing request sender through the first 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 230, if the video ID acquisition based on the first preset service fails, acquiring the video ID based on the browsing amount or the approval amount of each video in the video library through the backup service of the first preset service.
Specifically, in this embodiment, the backup service of the first preset service is different from the service logic of the first preset service, the service logic of the backup service is simple, the service logic of the first preset service is complex, the recommended video ID acquired through the first preset service is a video ID that is interesting to the video refresh request sending user, and the recommended video ID acquired through the first preset service can bring better user experience to the video refresh request sending user; the video ID acquired through the backup service is only 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 guaranteed through the video ID acquired through the backup service, better experience cannot be brought to the user, and the stability of the system is improved.
It can be understood that if the service logic of the backup service of the first preset service is set to be the same as the service logic of the first preset service, that is, both the backup service of the first preset service and the service logic of the first preset service are used for obtaining the recommended video ID that the user is interested in, a considerable number of service servers need to be correspondingly configured to carry the service logic, which inevitably results in a higher cost of a service system.
It should be noted that, if the video ID is not obtained based on the browsing amount or the approval amount of each video in the video library through the backup service of the first preset service, the video information is read from the local file, so as to ensure the basic user experience.
It can be understood that, if the video ID is successfully obtained based on the first preset service, the backup service of the first preset service is not enabled, and step 240 is directly performed, and the video information corresponding to the video ID is obtained through the second preset service.
And step 240, acquiring the video information corresponding to the video ID through the second preset service.
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.
Correspondingly, when the video information is successfully acquired based on the second preset service, the successfully acquired video information is backed up to the local file based on a set rule. It can be understood that if the video ID is a recommended video ID acquired through the first preset service and in which the user is interested, the video information backed up to the local file is the recommended video information, and if the video ID is a high-heat video ID acquired through the backup service of the first preset service, the video information backed up to the local file is high-heat video information.
Illustratively, the backing up the video information that is successfully acquired to the local file based on the set 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.
And step 250, if the video information corresponding to the video ID is failed to be acquired based on the second preset service, reading the video information from the local file.
Further, if the video information corresponding to the video ID is failed to be acquired based on the second preset service, the video information corresponding to the video ID may be preferentially acquired based on the backup service of the second preset service, and when the video information corresponding to the video ID is failed to be acquired based on the backup service of the second preset service, the video information is read from the local file. Correspondingly, when the video information is successfully acquired based on the backup service of the second preset service, the acquired video information is backed up to the local file based on a preset rule.
It can be understood that, if the video information corresponding to the video ID is successfully acquired based on the second preset service, or the video information corresponding to the video ID is successfully acquired based on the backup service of the second preset service, the video information that is successfully acquired is returned to the video refresh request sending end.
And step 260, performing deduplication processing on the read video information to avoid returning the same video information to the sending end of the video refresh request.
The purpose of performing deduplication processing on the read video information is to avoid returning the same video information to the sending end of the video refresh request. Specifically, each video refresh request sending end corresponds to one user, for example, for a user a, by recording a video ID returned to the user a each time, when the video ID needs to be returned to the user a again, the video ID which needs to be returned to the user a at the current time is compared with the already recorded video ID, so that the repeated video ID is deleted from the video ID list which needs to be returned to the user a at the current time, and the same video information is prevented from being presented to the user a, and the user experience is prevented from being influenced. The identifier of each user can be represented by a user number or an equipment number carried in the video refresh request. And if the number of the video IDs obtained after the duplicate removal processing is 0 or the duplicate removal processing operation fails, randomly reading a preset number of video information from the local file and returning the video information to the client.
And 270, obtaining information to be released corresponding to the duplicate-removed video information through an information release service, and returning the information to be released and the duplicate-removed video information to the video refresh request sending terminal.
It should be noted that, when a video refresh request is received, in a Feed service framework, there are many preset services determined based on a preset video refresh request processing flow for processing the video refresh request, the first preset service for acquiring a video identifier ID and the second preset service for acquiring video information corresponding to the video ID are only two more critical preset services, other preset services include, for example, a service for acquiring video background music, a service for acquiring a video sticker ID, a service for acquiring video meta-information (such as an author and a title of a video, and the like), all of these non-critical preset services are collectively referred to as RPC (Remote Procedure Call) services, and if any one of the RPC services cannot work normally or an unknown system error causes that video information cannot be acquired successfully, the data request processing method provided by the embodiment can be adopted, namely, the video information is directly read from the local file, so that the basic user experience is ensured.
According to the technical scheme, when the first preset service for acquiring the video ID fails to acquire the video ID, or the second preset service for acquiring the video information fails to acquire the video information, or the video information cannot be acquired due to the fact that any RPC service cannot normally work, or the video information cannot be successfully acquired due to an unknown system error, the video information is read from the local file, the bottom of each preset service in the Feed service framework is realized, the stability of the Feed service framework is improved, and meanwhile, the corresponding advertising benefit is guaranteed.
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 target data acquisition module 310, a second target data acquisition module 320, a to-be-released information acquisition module 330, and a return module 340;
the first target data 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 target data obtaining module 320, configured to, if obtaining the target data based on the preset service fails, read the target data from the local file; a to-be-released information obtaining module 330, configured to obtain, through an information releasing service, to-be-released information corresponding to the target data; a returning module 340, configured to return the information to be delivered and the target data to the data request sending end; and when the target data is successfully acquired based on the preset service, the successfully acquired target data is backed up to the local file.
Further, the first target data obtaining module 310 includes: the device comprises a determining unit, a processing unit and a processing unit, wherein the determining unit is used for determining a preset service for processing a 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 unit is specifically configured to: determining a first preset service for acquiring a video identification ID and a second preset service for acquiring video information corresponding to the video ID based on a preset video refreshing request processing flow.
Further, the first target data obtaining module 310 further includes: a first obtaining unit, configured to obtain, through the first preset service, a video ID according to an interest feature of the video refresh request sender; acquiring video information corresponding to the video ID through the second preset service;
correspondingly, when the video information is successfully acquired based on the second preset service, the successfully acquired video information is backed up to the local file based on a set rule.
Further, the apparatus further includes a duplicate elimination module, configured to, if the video information corresponding to the video ID fails to be obtained through the second preset service, perform duplicate elimination processing on the read video information after the video information is read from the local file, so as to avoid returning the same video information to the sending end of the video refresh request.
Further, the first target data obtaining module 310 further includes: a second obtaining unit, configured to, if obtaining of the video ID based on the first preset service fails, obtain, through a backup service of the first preset service, the video ID based on a browsing amount or a praise amount of each video in a video library; and if the video information corresponding to the video ID is failed to be acquired based on the second preset service, acquiring the video information corresponding to the video ID based on the backup service of the second preset service.
Further, the return module 340 includes a splicing unit and a return unit, where the splicing unit is configured to splice the information to be launched and the target data based on a set splicing structure; the return unit is used for returning the spliced data to the data request sending end.
In the data request processing apparatus provided in this embodiment, when a data request is received, a preset service for processing the data request is determined, and target data is obtained based on the preset service; if the target data acquisition based on the preset service fails, reading the target data from a local file; acquiring information to be released corresponding to the target data through an information releasing service; returning the information to be released and the target data to the data request sending terminal; and when the target data is successfully acquired based on the preset service, backing up the successfully acquired target data to the local file, so that the aim of improving the success rate of acquiring the target data and ensuring the advertising benefit of a service system is fulfilled.
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, reading the target data from a local file; acquiring information to be released corresponding to the target data through an information releasing service; returning the information to be released and the target data to the data request sending terminal; and when the target data is successfully acquired based on the preset service, the successfully acquired target data is backed up to the local file.
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 (10)

1. A method for processing a data request, comprising:
when a data request is received, determining a preset service for processing the data request, and acquiring target data based on the preset service;
when the target data are successfully acquired based on the preset service, backing up the successfully acquired target data to a local file;
if the target data acquisition based on the preset service fails, reading the target data from a local file;
acquiring information to be released corresponding to the target data through an information releasing service;
and returning the information to be released and the target data to the data request sending end.
2. The method of claim 1, wherein determining a predetermined 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 first preset service for acquiring a video identification ID and a second preset service for acquiring video information corresponding to the video ID based on a preset video refreshing request processing flow.
4. The method of claim 3, wherein the obtaining target data based on the preset service comprises:
acquiring a video ID according to the interest characteristics of the video refreshing request sender through the first preset service;
acquiring video information corresponding to the video ID through the second preset service;
correspondingly, when the video information is successfully acquired based on the second preset service, the successfully acquired video information is backed up to the local file based on a set rule.
5. The method according to claim 4, wherein if the video information corresponding to the video ID is not obtained through the second predetermined service, after the video information is read from a local file, the method further comprises:
and performing deduplication processing on the read video information.
6. The method of claim 4, further comprising: if the video ID is failed to be acquired based on the first preset service, 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 first preset service;
and if the video information corresponding to the video ID is failed to be acquired based on the second preset service, acquiring the video information corresponding to the video ID based on the backup service of the second preset service.
7. The method according to any one of claims 1-6, wherein returning the information to be delivered and the target data to the data request sender comprises:
splicing the information to be launched and the target data based on a set splicing structure;
and returning the spliced data to the data request sending end.
8. A data request processing apparatus, comprising:
the first target data 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 target data acquisition module is used for backing up the target data which is successfully acquired to a local file when the target data is successfully acquired based on the preset service, and reading the target data from the local file if the target data is unsuccessfully acquired based on the preset service;
the information to be released acquisition module is used for acquiring information to be released corresponding to the target data through an information release service;
and the return module is used for returning the information to be released and the target data to the data request sending end.
9. 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-7.
10. 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 7.
CN201910611385.8A 2019-07-08 2019-07-08 Data request processing method and device, terminal equipment and storage medium Active CN110266813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910611385.8A CN110266813B (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
CN201910611385.8A CN110266813B (en) 2019-07-08 2019-07-08 Data request processing method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110266813A CN110266813A (en) 2019-09-20
CN110266813B true CN110266813B (en) 2022-03-15

Family

ID=67924992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910611385.8A Active CN110266813B (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) CN110266813B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111241137B (en) * 2020-01-08 2023-08-22 北京字节跳动网络技术有限公司 Data processing method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100886A (en) * 2014-04-22 2015-11-25 腾讯科技(北京)有限公司 Publish control method and system of network media information, device and server
WO2018064939A1 (en) * 2016-10-09 2018-04-12 腾讯科技(深圳)有限公司 Method for disaster recovery of audio and video communication connection, apparatus and system
CN108108996A (en) * 2017-11-29 2018-06-01 北京百度网讯科技有限公司 Advertisement placement method, device, computer equipment and readable medium in video
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
US8543622B2 (en) * 2007-12-07 2013-09-24 Patrick Giblin Method and system for meta-tagging media content and distribution

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100886A (en) * 2014-04-22 2015-11-25 腾讯科技(北京)有限公司 Publish control method and system of network media information, device and server
WO2018064939A1 (en) * 2016-10-09 2018-04-12 腾讯科技(深圳)有限公司 Method for disaster recovery of audio and video communication connection, apparatus and system
CN108108996A (en) * 2017-11-29 2018-06-01 北京百度网讯科技有限公司 Advertisement placement method, device, computer equipment and readable medium in video
CN109600672A (en) * 2018-10-19 2019-04-09 北京微播视界科技有限公司 Video content method for pushing and device

Also Published As

Publication number Publication date
CN110266813A (en) 2019-09-20

Similar Documents

Publication Publication Date Title
CN111510760B (en) Video information display method and device, storage medium and electronic equipment
CN107846629B (en) Method, device and server for recommending videos to users
CN111784380B (en) Advertisement putting attribution method and device
CN109684589B (en) Client comment data processing method and device and computer storage medium
CN110351581B (en) Data request processing method and device, terminal equipment and storage medium
CN110334246A (en) A kind of data request processing method, apparatus, terminal device and storage medium
CN111046292A (en) Live broadcast recommendation method and device, computer-readable storage medium and electronic device
CN109635131B (en) Multimedia content list display method, pushing method, device and storage medium
CN109714626B (en) Information interaction method and device, electronic equipment and computer readable storage medium
CN110266813B (en) Data request processing method and device, terminal equipment and storage medium
CN111225255B (en) Target video push playing method and device, electronic equipment and storage medium
CN114817698A (en) Information pushing method and device, information display method and device, equipment and medium
CN110619101B (en) Method and apparatus for processing information
CN112287171A (en) Information processing method and device and electronic equipment
WO2022042398A1 (en) Method and apparatus for determining object addition mode, electronic device, and medium
CN111246254A (en) Video recommendation method and device, server, terminal equipment and storage medium
CN115563134A (en) Interaction method, interaction device, electronic equipment and computer readable medium
CN111625745B (en) Recommendation method, recommendation device, electronic equipment and computer readable medium
JP2024500300A (en) Information interaction methods, devices, and equipment
CN111309935A (en) Song recommendation method and device and computer storage medium
CN111259174B (en) Multimedia transmission method, device, electronic equipment and medium
CN110602513A (en) Information processing method and device and electronic equipment
CN111641691B (en) Session message transmission method and device and electronic equipment
CN108540840B (en) Content output method and device, medium and computing equipment
CN109815408B (en) Method and device for pushing information

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