CN113453047A - Resource request processing method and device, electronic equipment and storage medium - Google Patents

Resource request processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113453047A
CN113453047A CN202110752689.3A CN202110752689A CN113453047A CN 113453047 A CN113453047 A CN 113453047A CN 202110752689 A CN202110752689 A CN 202110752689A CN 113453047 A CN113453047 A CN 113453047A
Authority
CN
China
Prior art keywords
resource
data
target
source station
data source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110752689.3A
Other languages
Chinese (zh)
Inventor
李尾冬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud 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 Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110752689.3A priority Critical patent/CN113453047A/en
Publication of CN113453047A publication Critical patent/CN113453047A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/26208Content 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 the scheduling operation being performed under constraints
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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
    • 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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • 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/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method and a device for processing a resource request, electronic equipment and a storage medium, aiming at the acquired resource request, under the condition that a target resource indicated by the request is not cached locally, resource state information of the target resource detected in advance or in real time is acquired, whether the target resource exists in a data source station or not is determined according to the detected resource state information, and response information used for representing resource request errors is fed back when the target resource does not exist. When the source station is judged whether the needed resources exist, the resource state information serving as the judgment basis is obtained by pre-detecting or detecting each source station in a parallel mode in real time, compared with the traditional mode of initiating the streaming media request to each source station in a polling mode and judging by combining the set overtime, the time consumption required by judgment is reduced, under the condition that the needed resources do not exist in the source station, the information representing the resource request error can be quickly responded to the user, and the user waiting time is reduced.

Description

Resource request processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer networks, and in particular, to a method and an apparatus for processing a resource request, an electronic device, and a storage medium.
Background
A CDN (Content Delivery Network) is an intelligent virtual Network constructed on the internet, and by means of servers (e.g., edge servers) deployed in various places, users can obtain required Content nearby through functions of load balancing, Content Delivery, scheduling, and the like of a central platform, so as to achieve the purposes of reducing Network congestion and improving user access response speed and hit rate.
When the server in the CDN does not cache the resource requested by the user, the resource indicated by the resource request is pulled by performing a back-to-source operation on the source station, and if the resource indicated by the resource request does not exist in the source station, the server responds to the client user with information (e.g., a resource request error status code) indicating a resource request error to disconnect the user request.
The current CDN technology determines whether a source station has a required resource by initiating a streaming media request (back-to-source request) to each source station in a polling manner and combining a set timeout, which takes a long time, and cannot quickly respond to a user with information indicating that a resource request is incorrect when a source station does not have a resource required by a user, thereby prolonging user waiting time.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, an electronic device, and a storage medium for processing a resource request, which are used to quickly determine whether a required resource exists in a source station, so as to quickly respond to a user with information representing a resource request error at least when the source station does not have a data resource indicated by a user request, thereby reducing user waiting time.
The specific technical scheme is as follows:
a method for processing resource requests comprises the following steps:
acquiring a resource request of a client;
if the target resource indicated by the resource request is not cached locally, acquiring resource state information of the target resource detected in advance or in real time; in the case that there are a plurality of corresponding data source stations, the real-time detection includes: detecting whether the target resource exists in each data source station in a parallel mode in real time to obtain resource state information of the target resource;
determining whether the target resource exists in a data source station or not according to the resource state information;
if not, feeding back response information for representing resource request errors to the client;
wherein, when there are a plurality of corresponding data source stations, the target resource does not exist in the data source station: the target resource does not exist in a plurality of the data source stations.
Optionally, the detecting resource status information of the target resource in real time includes:
acquiring a source station address of a data source station corresponding to the target resource in real time;
under the condition that the target resource corresponds to a plurality of data source stations, sending a detection request carrying a resource identifier of the target resource to each data source station in a parallel mode according to the source station address of each data source station;
acquiring detection results fed back by each data source station, wherein the detection results fed back by the data source stations are used for indicating whether the target resources exist in the data source stations or not;
determining resource state information of the target resource according to the detection result fed back by each data source station;
and if all detection results corresponding to the target resources indicate that the target resources do not exist, the resource state information represents that the target resources do not exist in the data source station.
Optionally, the detecting the resource state information of the target resource in advance includes:
when the detection condition is met, sending a detection request carrying the resource identifier of the data resource to each data source station corresponding to the data resource; the data resource is at least one locally cached data resource;
acquiring detection results fed back by each data source station corresponding to the data resources, wherein the detection results fed back by the data source stations are used for indicating whether the data resources exist in the data source stations or not;
determining resource state information of the data resource according to the acquired detection results; if all the detection results corresponding to the data resources indicate that the data resources do not exist, the resource state information of the data resources represents that the data resources do not exist in the data source station;
constructing and recording a corresponding relation between metadata of the data resources and resource state information; the metadata of the data asset includes at least an asset identification of the data asset.
Optionally, the detecting the resource state information of the target resource in advance includes:
acquiring a state notification of the data resource sent by each data source station corresponding to the data resource, wherein the state notification is used for indicating that the corresponding data resource is on line of the data source station or off line of the data source station;
determining resource state information of the data resources according to state notifications sent by each data source station corresponding to the data resources; if all data source stations corresponding to the data resources send a status notification indicating that the data resources are offline, the resource status information of the data resources indicates that the data resources do not exist in the data source stations;
constructing and recording a corresponding relation between metadata of the data resources and resource state information; the metadata of the data asset includes at least an asset identification of the data asset.
Optionally, the obtaining of the resource state information of the target resource, which is detected in advance, includes:
and inquiring the resource state information matched with the resource identifier of the target resource from the corresponding relation set between the metadata of the data resource and the resource state information to obtain the resource state information of the target resource.
Optionally, the probe request is a hypertext transfer protocol HTTP request or a hypertext transfer security protocol HTTPs request generated based on a predetermined scripting language.
Optionally, the target resource is a live streaming media resource or a non-live data resource;
under the condition that the target resource is a live streaming media resource, detecting resource state information of the target resource in real time;
and under the condition that the target resource is a non-live data resource, detecting the resource state information of the target resource in advance or in real time.
Optionally, the method further includes:
if the target resource exists in the data source station, determining at least one data source station with the target resource according to the resource state information;
under the condition that the number of the data source stations with the target resources is multiple, determining target source stations meeting source station conditions from the multiple data source stations with the target resources;
and sending a source returning request to the target source station to acquire the target resource from the target source station, and feeding back response information including at least part of the target resource to the client.
Optionally, the method further includes:
in the process of obtaining the target resource from the target source station to realize the back-to-source processing, if a resource request for requesting the target resource is obtained again, whether the back-to-source processing is overtime is determined;
if the time is out, detecting the resource state information of the target resource in real time;
and if not, continuously acquiring the target resource from the target source station.
An apparatus for processing resource requests, comprising:
the first acquisition module is used for acquiring a resource request of a client;
the second acquisition module is used for acquiring the resource state information of the target resource detected in advance or in real time under the condition that the target resource indicated by the resource request is not cached locally; in the case that there are a plurality of corresponding data source stations, the real-time detection includes: detecting whether the target resource exists in each data source station in a parallel mode in real time to obtain resource state information of the target resource;
a determining module, configured to determine whether the target resource exists in a data source station according to the resource status information;
a feedback module, configured to feed back, to the client, response information used for representing a resource request error when the determination result of the determination module is non-existent;
wherein, when there are a plurality of corresponding data source stations, the target resource does not exist in the data source station: the target resource does not exist in a plurality of the data source stations.
An electronic device, comprising:
a memory for storing at least one set of instruction sets;
a processor for implementing a method of processing resource requests as claimed in any preceding claim by executing a set of instructions stored on said memory.
A computer readable storage medium having stored therein a set of instructions which, when executed by a processor, implement a method of processing a resource request as claimed in any one of the preceding claims.
According to the above scheme, the resource request processing method, device, electronic device and storage medium provided by the present application, in response to an acquired resource request, in a case that a target resource indicated by the request is not locally cached, resource state information of a target resource detected in advance or in real time is acquired, whether the target resource exists in a data source station is determined according to the detected resource state information, and response information for representing a resource request error is fed back when the target resource does not exist. When the source station is judged whether the needed resources exist, the resource state information serving as the judgment basis is obtained by pre-detecting or detecting each source station in a parallel mode in real time, compared with the traditional mode of initiating the streaming media request to each source station in a polling mode and judging by combining the set overtime, the time consumption required by judgment is reduced, under the condition that the needed resources do not exist in the source station, the information representing the resource request error can be quickly responded to the user, and the user waiting time is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a block diagram of an exemplary application scenario provided herein;
FIG. 2 is a flow chart illustrating a method for processing a resource request provided herein;
FIG. 3 is a process diagram of detecting resource status information of a target resource in real-time as provided herein;
FIG. 4 is a schematic diagram of a server concurrently issuing probe requests to multiple source stations via multiple threads;
FIG. 5 is a process diagram for pre-probing resource status information of a target resource based on an active probing manner according to the present application;
fig. 6 is a process diagram for pre-detecting resource status information of a target resource based on a passive detection manner according to the present application;
FIG. 7 is a schematic flow chart diagram illustrating a method for processing a resource request provided herein;
FIG. 8 is a schematic flow chart of a method for processing resource requests provided herein;
FIG. 9 is a schematic diagram of a processing apparatus for processing resource requests provided herein;
fig. 10 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the current CDN technology, a streaming media request (back-to-source request) is initiated to each source station in a polling manner and a set timeout period is combined to determine whether a resource required by the source station exists in the source station, specifically, a server in the CDN initiates the streaming media request to each corresponding source station in a polling manner to pull a resource indicated by a user request from the source station, and if the pulling fails until the polling is completed or the set timeout period is reached, it is determined that the resource required does not exist in the source station, and a status code indicating that the resource request is incorrect is responded to the client. In the method, when the polling of each source station is finished or the set timeout duration is reached, it can be determined that the source station does not have the required resource, so that the required time consumption is long, and when the source station does not have the data resource required by the user, the information representing the resource request error cannot be quickly responded to the user, so that the user waiting time is prolonged.
In order to at least solve the above technical problem, the present application discloses a method and an apparatus for processing a resource request, an electronic device, and a storage medium.
Referring to fig. 1, a component architecture of a typical application scenario of the present application is provided, and includes a client 10, a server 20, and a source station 30, where the number of the client 10, the server 20, and the source station 30 is not limited, and may be one or more, and the server 20 may be, but is not limited to, a server in a CDN, such as an edge server or a central server in the CDN. The method comprises the steps that a client user sends a resource request to a server (such as an edge server) in the CDN, required data resources are obtained based on the response of the server, after the server obtains the resource request of the client user, whether resources indicated by the resource request are cached locally is firstly confirmed, if the resources are not cached locally, the required resources are pulled by further executing a source returning operation on a source station, and if the required resources do not exist in the source station, the server responds information (such as a resource request error state code) representing resource request errors to the client so as to disconnect the client request.
Referring to fig. 2, fig. 2 shows a flowchart of a method for processing a resource request disclosed in the present application, where the method may be applied to a server in the architecture shown in fig. 1, but is not limited thereto, in other embodiments, the method may also be applied to a management device/management platform independent from the server in the CDN, when the server does not have a target resource indicated by the resource request, response processing based on resource status detection provided by the method is implemented by the management device/management platform, and the method may be implemented in a form of, but not limited to, an embedded code module, or an independent service/plug-in/middleware, or the like.
The following description will mainly use the application of the method of the present application to the server in the architecture shown in fig. 1 as an example.
As shown in fig. 2, the method of the present application may include the following processing steps:
step 201, acquiring a resource request of a client.
The client user can initiate a resource request for indicating to acquire the target resource to the server by executing corresponding operation on the client. For example, a user initiates a resource request for instructing to acquire streaming media data to a server by performing a play operation for the streaming media data in a live or on-demand format on a browser page or an App (Application program) page, or initiates a resource request for instructing to acquire a data file to a server by performing a download operation for the data file.
The server receives a resource request of the client through the network.
The target resource obtained by the resource request indication may be a live streaming media resource, or a data resource in any format in a non-live form, such as a non-live data resource in a format of text, picture, video, and the like.
Step 202, if the target resource indicated by the resource request is not cached locally, acquiring the resource state information of the target resource detected in advance or in real time.
Wherein, under the condition that a plurality of data source stations corresponding to the target data are provided, the real-time detection comprises: and detecting whether the target resource indicated by the resource request exists in each data source station in real time in a parallel mode to obtain the resource state information of the target resource.
The local area refers to a local area corresponding to an execution subject of the method of the present application, such as a local end corresponding to a server in the CDN, and is opposite to a data source station serving as a source end of a data resource.
The CDN caches data resources pulled from the source station in servers (e.g., edge servers) deployed in various regions, and improves the user access response speed through functions of load balancing, content distribution, scheduling, and the like of the central platform. After obtaining the resource request of the client, the server in the CDN firstly determines whether a target resource indicated by the resource request exists in the local cache, and if so, directly responds to the client based on the target resource of the local cache, and if not, that is, the target resource indicated by the local uncached resource request does not exist, then the server needs to further pull the required target resource from the source station.
In order to avoid the defect that information representing resource request errors can be fed back to the client after a long period of time when the source station does not have the required resources, the embodiment of the application can quickly judge whether the target resources indicated by the resource requests exist in the data source station by detecting the resource state information of the target resources in the data source station in advance or in real time.
Referring to fig. 3, the process of detecting resource status information of a target resource in real time includes:
and 301, acquiring a source station address of a data source station corresponding to the target resource in real time.
When detecting whether a target resource indicated by a resource request exists in a data source station in real time, first, a source station address of the data source station corresponding to the target resource is obtained, for example, an IP (Internet Protocol) address of the data source station is obtained.
One data resource usually corresponds to a plurality of data source stations, and the plurality of data source stations realize mutual backup by respectively storing the same data resource so as to support switching to a standby non-failure source station when a certain source station fails. In a specific application scenario, according to actual requirements, data resources (e.g., live or on-demand streaming media data) may be brought online to one or more data source stations, or the data resources may be deleted/brought offline from one or more source stations.
In the case that the target resource corresponds to a plurality of data source stations, in this step 301, a plurality of source station addresses, such as a plurality of IP addresses, of the plurality of data source stations corresponding to the target resource are correspondingly obtained.
Step 302, under the condition of multiple data source stations corresponding to the target resource, sending a probe request carrying a resource identifier of the target resource to each data source station in a parallel manner according to a source station address of each data source station.
In the case that the target resource corresponds to multiple data source stations, in this embodiment, a probe request carrying a resource identifier of the target resource is sent to each data source station in a parallel manner according to a source station address of each data source station, so as to quickly determine whether the target resource indicated by the resource request exists in the data source station.
Specifically, referring to fig. 4, the server creates a corresponding number of threads according to the number of the source station addresses, where each thread corresponds to each source station one to one, and initiates a probe request to a corresponding data source station according to the corresponding source station address in each thread. The information carried in the probe request includes, but is not limited to, a resource identifier of the target resource and an address of the source station, and the resource identifier of the target resource may be, but is not limited to, any one or more of a resource ID (Identity document), a resource name, and a resource number.
After receiving the probe request, each data source station determines whether a target resource indicated by the probe request exists, for example, the target resource is not deleted after being online, the target resource exists in the data source station, or the target resource is offline from the data source station, and the target resource does not exist correspondingly.
Optionally, the server may quickly request all source stations corresponding to the target resource in an lua detection manner, and obtain status codes returned by all source stations, where in the lua detection manner, the detection request initiated by the server to each data source station may be an HTTP (Hypertext Transfer Protocol) request or an HTTPs (Hypertext Transfer Protocol over secure Protocol) request generated based on the lua (a lightweight and compact scripting language). But not limited to, in practical applications, the corresponding probe request may also be generated in other scripting languages based on other probe manners.
The status code returned by the data source station may be, but is not limited to, an http status code, such as http status code 200 indicating the presence of the data resource in the source station.
And 303, acquiring a detection result fed back by each data source station, wherein the detection result fed back by the data source station is used for indicating whether the target resource indicated by the resource request exists in the data source station.
And step 304, determining the resource state information of the target resource according to the detection result fed back by each data source station.
The detection results fed back by different data source stations can be the same or different, depending on the actual offline condition of the target data at different data source stations (for example, after the target data is online to 3 source stations, the target data is offline from one source station based on actual requirements).
And the server acquires the detection results fed back by each data source station, and summarizes and integrates the detection results to determine the resource state information of the target resource. If all the detection results corresponding to the target resource indicate that the target resource does not exist, if all the detection results are non-200 status codes (all the data source stations delete/offline the target resource), it indicates that the target resource indicated by the resource request does not exist in the data source stations, and accordingly determines resource status information capable of representing that the target resource does not exist in the data source stations, that is, resource status information of the target resource, for the target resource.
On the contrary, if at least one of the probing results indicates that the target resource exists, e.g., if the status code 200 exists in each probing result, it indicates that the target data indicated by the resource request exists in the data source station, and accordingly determines the resource status information capable of characterizing that the target resource exists in the data source station for the target resource.
The present CDN technology, which initiates streaming media requests (back-to-source requests) to each source station in a polling manner and determines whether a required resource exists in the source station in combination with a set timeout, researches and discovers that initiating streaming media requests to different source stations in a polling manner is performed to avoid repeatedly pulling the same resource from multiple source stations, so based on this characteristic, it is difficult to solve the problem of long response time when responding to information that characterizes a resource request error to a user by simply adjusting the polling initiation request manner to initiate requests in a parallel manner, which may cause other problems (e.g., cause repeatedly pulling the same resource from multiple source stations), for this purpose, the present application proposes to initiate a probe request that does not involve resource pulling/back-to-source first before initiating a back-to-source request to a source station, and initiate a probe request to each source station in a parallel manner, the problem of long response time is effectively solved, and the waiting time of the user is reduced.
The implementation modes of detecting the resource state information of the target resource in advance comprise active detection and passive detection.
The process of detecting the resource state information of the target resource in advance based on the active detection mode can be implemented as the flow shown in fig. 5:
step 501, when the detection condition is met, sending a detection request carrying a resource identifier of a data resource to each data source station corresponding to the data resource; the data resource is at least one data resource which is cached locally.
In this embodiment, the server sets the matching detection conditions in advance based on a certain detection policy. Among them, the probing strategy may be, but is not limited to: for all the data resources cached by the server, under the condition that the time condition is met, the source station detects whether the data resources are offline, or only the source station detects whether the data resources meeting the attribute condition are offline from the source station by combining the attribute characteristics of the data resources, and the like.
The detection condition may specifically include a time condition and/or an attribute condition of the resource.
The time condition may refer to a certain fixed time reaching the setting, or a periodic time node reaching the setting.
The attribute condition may be, but is not limited to: the type of the data resource cached by the server side is a preset type, or the data resource comprises a sensitive vocabulary, or an associated object of the data resource is identified as a sensitive object, and the like. For example, real-time news has high real-time performance and is frequently online and offline at a source station; if the source of the article/video comprises sensitive words, or the publisher of the article/video is identified as a sensitive character, or the article/video content relates to introduction of a sensitive character, etc., the article/video can be predicted to be possibly offline in the source station in advance. For the above situations, the server can set the matched attribute conditions, so that the server screens out the data resources meeting the attribute conditions, and the source station detects whether the data resources are offline, so as to record the resource state information in advance, and facilitate to directly and quickly respond according to the record when obtaining the request of the client to the resources.
When the detection condition is met, the server sends a detection request carrying the resource identifier of the data resource to each data source station corresponding to the data resource, wherein the detection request can be initiated to a plurality of data source stations in a parallel mode or a polling mode (serial mode).
Step 502, obtaining a detection result fed back by each data source station corresponding to the data resource, where the detection result fed back by the data source station is used to indicate whether the data source station has the data resource indicated by the detection request.
The detection result here may also be, but not limited to, in the form of a status code or a notification message, and different status codes or different notification messages are used to indicate different statuses of the target resource at the data source station, such as yes or no.
Step 503, determining resource state information of the data resource according to the detection result fed back by each data source station corresponding to the data resource.
And the server acquires the detection results fed back by each data source station, and summarizes and integrates the detection results to determine the resource state information of the data resources.
Similarly, if all the detection results corresponding to the data resource indicate that the data resource does not exist, if all the detection results are the non-200 status codes (all the data source stations delete/log off the target resource), it indicates that the data target resource does not exist in the data source stations, and accordingly determines resource status information, that is, resource status information of the data resource, which can characterize that the data resource does not exist in the data source stations, for the data resource.
On the contrary, if at least one detection result corresponding to the data resource indicates that the data resource exists, if the status code 200 exists in each detection result, it indicates that the data resource exists in the data source station, and correspondingly determines resource status information capable of characterizing that the data resource exists in the data source station for the data resource.
Step 504, constructing and recording a corresponding relation between metadata of the data resources and resource state information; the metadata of the data asset includes at least an asset identification of the data asset.
On the basis of obtaining the resource state information of each data resource, further constructing a corresponding relationship between the metadata of each data resource and the resource state information thereof, and forming a corresponding relationship set of the metadata of the data resource and the resource state information thereof, wherein the corresponding relationship set can be, but not limited to, represented in the form of a resource state information table.
The server determines and records the metadata of each cached data resource in advance.
Metadata of the data resource includes, but is not limited to, at least part of the name (e.g., file name) of the data resource, the information summary, information (e.g., source station address, source station identification) of the corresponding respective source station, and the like.
On the basis of the constructed corresponding relationship between the metadata of a certain data resource and the resource state information, the corresponding relationship can be synchronously adjusted according to a new round of detection results, for example, if a certain data resource is offline from all the corresponding source stations, the server end can synchronously adjust the corresponding relationship information of the data according to the detection results fed back by all the data source stations, so that the data resource does not exist in the data source station represented by the server end.
Referring to fig. 6, in an embodiment, based on the passive probing method, the process of probing the resource status information of the target resource in advance may be implemented as:
step 601, obtaining a status notification of the data resource sent by each data source station corresponding to the data resource, where the status notification is used to indicate that the corresponding data resource is online or offline at the data source station.
Step 602, determining resource status information of the data resource according to the status notification sent by each data source station corresponding to the data resource.
In this embodiment, an interaction protocol between the server and the source station is pre-established, based on this protocol, when a new data resource is online in the data source station or the data resource is offline/deleted from the source station, the source station sends a status notification (or call-back notification) indicating that the data resource is online or offline/deleted to the server, and subsequently when the offline/deleted data resource is online again, the status notification indicating that the data resource is online again is sent again.
The server receives notification information sent by each data source station, summarizes and integrates the notification information, and determines the resource state information of the data resource by summarizing and integrating the notification sent by each data source station corresponding to the same data resource, wherein if all the source stations corresponding to a certain data resource feed back the state notification indicating that the data resource is offline, the resource state information capable of representing that the data resource does not exist in the data source station is determined for the data resource; otherwise, determining the resource state information capable of representing the existence of the data resource in the data source station for the data resource.
Step 603, constructing and recording a corresponding relation between metadata of the data resources and resource state information; the metadata of a data asset comprises at least an asset identification of said data asset.
Similar to the aforementioned active probing manner, on the basis of obtaining the resource state information of each data resource, a corresponding relationship between the metadata of each data resource and the resource state information thereof is further constructed, and a corresponding relationship set between the metadata of the data resource and the resource state information thereof is formed, which may be, but is not limited to, represented in the form of a resource state information table.
On the basis of the constructed corresponding relationship between the metadata of a certain data resource and the resource state information, the corresponding relationship can be synchronously adjusted according to the state notification fed back by the data source station, for example, if a certain data resource is offline from all the source stations corresponding to the data resource, the server side can synchronously adjust the corresponding relationship information of the data according to the received notifications, so that the data resource does not exist in the representation data source station.
For the acquisition scene of the live broadcast streaming media resources, the server responds to the client in real time through a mode of pulling and pushing streams from the source station to the client, so that when the resource request of the client is acquired, the server can acquire the resource state information of the target resource in a real-time detection mode so as to judge whether the live broadcast streaming media resources requested by the user exist in the data source station.
For the acquisition scene of the non-live data resource, the resource state information of the target resource can be acquired by adopting a real-time detection mode, or the resource state information matched with the resource identifier of the target resource is inquired from the corresponding relation set to acquire the resource state information of the target resource.
Step 203, determining whether a target resource corresponding to the resource request exists in the data source station according to the obtained resource state information.
And step 204, if the resource request does not exist, feeding back response information for representing the resource request error to the client.
And if the target resource indicated by the resource request does not exist in the data source station based on the obtained resource state information, the server feeds back response information for representing resource request errors to the client so as to disconnect the connection with the client request.
The response information fed back by the server to the client for characterizing the resource request error may be, but is not limited to, a common error status code of http, such as 404.
According to the above scheme, the resource request processing method provided by the application judges whether the required resource exists in the source station by detecting the resource state information of the target resource in advance or in real time. Compared with the traditional mode of initiating streaming media requests to each source station in a polling mode and judging by combining set timeout, the method reduces the time consumption required by judgment, can quickly respond information representing resource request errors to users under the condition that the source stations do not have required resources, and reduces the waiting time of the users.
Optionally, in an embodiment, in order to facilitate directly initiating a source return request to a source station where a target resource exists (instead of initiating a source return request to each source station in a polling manner) in the case that the target resource exists in the data source station, the determined resource state information of the target resource may indicate that at least one data source station of the target resource exists in the case that the target resource exists, in addition to characterizing whether the target resource exists in the data source station.
The above functions may be extended for the resource state information by recording, in the resource state information of the target resource, source station information of at least one data source station where the target resource exists, such as a source station identifier or a source station address.
On this basis, referring to the flowchart of the processing method for the resource request shown in fig. 7, after step 203, the method of the present application may further include:
step 701, if a target resource exists in the data source stations, determining at least one data source station having the target resource according to the resource state information of the target resource.
The target resource exists in the data source station, which means that the target resource exists in at least one data source station in all the data source stations corresponding to the target resource.
And if the target resource exists in the data source stations according to the resource state information of the target resource, determining at least one data source station in which the target resource exists according to the record information in the resource state information of the target resource so as to conveniently return the target data to the server.
Step 702, when the number of the data source stations with the target resource is multiple, determining the target source station satisfying the source station condition from the multiple data source stations with the target resource.
For the real-time probing method, in one embodiment, the source station condition may be set as a condition related to the probe result response time/response rate of the source station, such as setting the source station condition as: the feedback time of the detection result of the source station is the earliest, or the response rate of the detection result of the source station is the fastest, and the like. In another embodiment, the above-mentioned condition of the source station may be set as a condition related to the performance of the source station, such as specifically setting the condition to be the most excellent performance evaluation of the source station in any one or more of response rate, congestion situation, load situation, stability, and the like. Based on the above conditions, the source station with the earliest feedback time/the fastest response rate of the detection result, or the source station with the best performance, among the plurality of data source stations with the target resource, may be determined as the target source station for pulling the target data in the back-source processing.
For the pre-probing approach, the source station condition may be set to, but not limited to, the above-described condition related to the source station performance. The purpose of setting the source station conditions is to determine a single source station from a plurality of data source stations with target data to return the data to the source, and in a specific application scenario, the setting conditions are not limited to the setting conditions provided above, and the source station conditions can be flexibly configured according to actual requirements.
When only one data source station has the target resource, the data source station is directly determined as the target source station for pulling the target data in the back source processing.
Step 703, sending a source return request to the target source station to obtain the target resource indicated by the resource request from the target source station, and feeding back response information including at least part of the target resource to the client.
After a target source station is screened out according to the source station conditions, the server further sends a source returning request carrying the resource identifier of the target resource to the target source station so as to request to pull the required target data from the target source station. The back-to-source request initiated to the target source station may be, but is not limited to, a streaming media request.
The server pulls the target data from the target source station to realize the back-to-source processing of the target data, and feeds back response information including at least part of target resources to the client. For example, a picture pulled from the target source station is fed back to the client, or a video stream corresponding to the current playing progress in a certain on-demand video pulled from the target source station is fed back to the client. Meanwhile, for a non-live scene, the server can also cache target data pulled from the source station.
In the embodiment, the target source station for returning the source is directly positioned based on the resource state information obtained by detection and in combination with the source station condition, rather than trying and positioning the source stations with the target resources one by one for returning the source based on a polling mode, so that the data required by the user can be quickly pulled from the source station and quickly responded to the user under the condition that the target resources exist in the source station, and the waiting time for the client user to call the required resources from the network is reduced.
In an embodiment, referring to a flowchart of a processing method of a resource request shown in fig. 8, for a manner of detecting resource status information of a target resource in real time, the method of the present application may further include:
step 801, in the process of obtaining the target resource from the target source station to implement the back-to-source processing, if the resource request for requesting the target resource is obtained again, it is determined whether the back-to-source processing is overtime, if so, step 802 is executed, and if not, step 803 is executed.
In the process that the server responds to the requested target resource to the client by returning to the source (pulling the target resource from the source station), the data pulling process may be interrupted due to network congestion or source station abnormality, and the like, which is usually shown as a phenomenon that a live/on-demand streaming media is paused/stuck, a downloading progress is suspended, and the like, in this case, the server obtains again a resource request for requesting the target resource, where the resource request may be a retry request initiated by a client user by performing video refresh, re-downloading the resource, and the like, or a request automatically triggered by the server based on an interrupt event of the data pulling, and is not limited herein.
In this embodiment, first, based on a set timeout duration, it is determined whether a latest return-to-source process of the target resource is timeout, and based on different return-to-source conditions that are, whether the latest return-to-source process is timeout or not, different processes are executed, in order to control the number of probe requests issued to the source station and prevent a concurrency request amount of the data source station from being exceeded.
The fact that the latest source returning processing of the target resource is yes or not is overtime refers to the time length from the data pulling interruption time to the current time, and the fact that the latest source returning processing of the target resource is yes or not is greater than the set overtime time length.
And step 802, if the time is out, detecting the resource state information of the target resource in real time.
If the latest return processing of the target resource is overtime, then the resource state information of the target resource is detected in real time for the resource request obtained this time, for example, a detection request is initiated to each data source station corresponding to the target resource in a parallel manner in a lua detection manner to detect whether the target resource exists in each data source station, and the like, and then the return processing of the target resource can be further performed based on the resource state information detected in real time.
And step 803, if not, continuing to acquire the target resource from the target source station.
Otherwise, if the latest re-source processing of the target resource is not overtime, the resource state information of the target resource is not detected in real time, for example, the server does not execute lua detection on each source station in real time according to the resource request obtained this time, but directly continues to pull the target data based on the re-source condition during the latest re-source processing, that is, directly realizes to pull the target resource from the target source station by retrying the target source station adopted during the latest re-source processing.
If the pulling process is interrupted when the target source station fails to return the resource to the source, the data pulling from the target resource is continued to face the situation of the pulling failure (if the data pulling is interrupted due to network congestion and the like, the data pulling can be successfully performed through retry of the target source station generally).
When the source return processing of the target resource is continuously executed for the interruption event of the data pulling process, optionally, the complete resource data of the target resource may be pulled again (for example, a certain complete video file is pulled again from the source station), or, optionally, only the part of the target resource which is not pulled completely during the pulling interruption may be continuously pulled from the pulling progress corresponding to the interruption time based on the interruption and continuous function. For live scenes, the latter implementation mode may be preferably adopted in consideration of the real-time characteristics of live broadcasting, and for non-live scenes, any implementation mode may be adopted.
In this embodiment, for a pull interrupt event of a target resource, when a resource request for requesting the target resource is obtained again, whether the latest source returning processing of the target resource is overtime is determined based on a set overtime duration, and if not, the detection processing of a source station is not executed, and the source returning processing of target data is directly continuously executed according to the latest source returning situation of the target resource, so that the request number of a detection process can be effectively controlled, and the concurrence request amount of a data source station is prevented from being over-limited.
Corresponding to the above method, an embodiment of the present application further discloses a device for processing a resource request, as shown in fig. 9, the device includes:
a first obtaining module 901, configured to obtain a resource request of a client;
a second obtaining module 902, configured to obtain resource state information of a target resource detected in advance or in real time under the condition that the target resource indicated by the resource request is not cached locally; in the case that there are a plurality of corresponding data source stations, the real-time detection includes: detecting whether target resources exist in each data source station in a parallel mode in real time to obtain resource state information of the target resources;
a determining module 903, configured to determine whether a target resource exists in the data source station according to the resource status information;
a feedback module 904, configured to feed back, to the client, response information used for representing a resource request error in the case that the determination result of the determination module 903 is non-existent;
when there are a plurality of corresponding data source stations, the target resource does not exist in the data source station: target resources do not exist in the plurality of data source stations.
In an embodiment, the apparatus further includes a detection module, configured to detect resource status information of the target resource in advance or in real time.
Wherein, when detecting the resource state information of the target resource in real time, the detection module is configured to:
acquiring a source station address of a data source station corresponding to a target resource in real time;
under the condition that the target resource corresponds to a plurality of data source stations, sending a detection request carrying a resource identifier of the target resource to each data source station in a parallel mode according to the source station address of each data source station;
acquiring detection results fed back by each data source station, wherein the detection results fed back by the data source stations are used for indicating whether target resources exist in the data source stations or not;
determining resource state information of the target resource according to the detection result fed back by each data source station;
and if all the detection results corresponding to the target resources indicate that the target resources do not exist, the resource state information of the target resources represents that the target resources do not exist in the data source station.
In an embodiment, when the detecting module detects the resource status information of the target resource in advance, the detecting module is configured to:
when the detection condition is met, sending a detection request carrying a resource identifier of the data resource to each data source station corresponding to the data resource; the data resource is at least one locally cached data resource;
acquiring detection results fed back by each data source station corresponding to the data resources, wherein the detection results fed back by the data source stations are used for indicating whether the data resources exist in the data source stations or not;
determining resource state information of the data resource according to the acquired detection results; if all the detection results corresponding to the data resource indicate that the data resource does not exist, the resource state information of the data resource represents that the data resource does not exist in the data source station;
constructing and recording a corresponding relation between metadata of the data resource and resource state information; the metadata of the data asset includes at least an asset identification of the data asset.
In an embodiment, when the detecting module detects the resource status information of the target resource in advance, the detecting module is configured to:
acquiring a state notification of the data resource, which is sent by each data source station corresponding to the data resource, wherein the state notification is used for indicating that the corresponding data resource is on line or off line of the data source station;
determining resource state information of the data resources according to the state notifications sent by the data source stations corresponding to the data resources; if all data source stations corresponding to the data resources send status notifications indicating that the data resources are offline, the resource status information of the data resources indicates that no data resources exist in the data source stations;
constructing and recording a corresponding relation between metadata of the data resources and resource state information; the metadata of the data asset includes at least an asset identification of the data asset.
In an embodiment, the second obtaining module 902, when obtaining the resource status information of the pre-detected target resource, is configured to:
and inquiring the resource state information matched with the resource identifier of the target resource from the corresponding relation set between the metadata of the data resource and the resource state information to obtain the resource state information of the target resource.
In an embodiment, the probe request is an HTTP request or an HTTPs request generated based on a predetermined scripting language.
In one embodiment, the target resource is a live streaming media resource or a non-live data resource;
under the condition that the target resource is a live streaming media resource, detecting resource state information of the target resource in real time;
and under the condition that the target resource is a non-live data resource, detecting the resource state information of the target resource in advance or in real time.
In an embodiment, the apparatus further includes a source returning module, configured to: if the target resource exists in the data source station, determining at least one data source station with the target resource according to the resource state information of the target resource; under the condition that the number of the data source stations with the target resources is multiple, determining target source stations meeting source station conditions from the multiple data source stations with the target resources; and sending a source returning request to the target source station to acquire the target resource indicated by the resource request from the target source station, and feeding back response information including at least part of the target resource to the client.
In one embodiment, the apparatus further comprises: a retry module to: in the process of obtaining target resources from a target source station to realize the back-to-source processing, if a resource request for requesting the target resources is obtained again, whether the back-to-source processing is overtime is determined; if the time is out, detecting the resource state information of the target resource in real time; and if not, continuously acquiring the target resource from the target source station.
The processing device for the resource request disclosed in the embodiment of the present application is relatively simple in description because it corresponds to the processing method for the resource request disclosed in the above method embodiments, and for the relevant similarities, please refer to the description of the above corresponding method embodiments, and details are not described here.
The embodiment of the application also discloses an electronic device, which can be, but is not limited to, a server in the architecture shown in fig. 1.
Referring to fig. 10, a schematic structural diagram of an electronic device is provided, where the electronic device at least includes:
a memory 1001 for storing a set of computer instructions;
the set of computer instructions may be embodied in the form of a computer program.
The memory 1001 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 1002 is configured to implement the method for processing the resource request according to any one of the above method embodiments by executing the instruction set stored in the memory.
The processor 1002 may be a Central Processing Unit (CPU), an application-specific integrated circuit (ASIC), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices.
Besides, the electronic device may further include a communication interface, a communication bus, and the like. The memory, the processor and the communication interface communicate with each other via a communication bus.
The communication interface is used for communication between the electronic device and other devices (such as a central control device in the CDN). The communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like, and may be divided into an address bus, a data bus, a control bus, and the like.
In this embodiment, when executing a computer instruction set stored in a memory, a processor in an electronic device acquires resource state information of a target resource detected in advance or in real time, in relation to an acquired resource request, under the condition that a target resource indicated by the request is not locally cached, determines whether the target resource exists in a data source station according to the detected resource state information, and feeds back response information used for representing a resource request error when the target resource does not exist. When the source station is judged whether the needed resources exist, the resource state information serving as the judgment basis is obtained by pre-detecting or detecting each source station in a parallel mode in real time, compared with the traditional mode of initiating the streaming media request to each source station in a polling mode and judging by combining the set overtime, the time consumption required by judgment is reduced, under the condition that the needed resources do not exist in the source station, the information representing the resource request error can be quickly responded to the user, and the user waiting time is reduced.
In addition, an embodiment of the present application further discloses a computer-readable storage medium, in which a set of computer instructions is stored, and when the set of computer instructions is executed by a processor, the method for processing a resource request disclosed in any method embodiment above is implemented.
Specifically, when executed by the processor, the set of computer instructions in the computer-readable storage medium of this embodiment obtains, for an obtained resource request, resource status information of a target resource that is detected in advance or detected in real time in a case that the target resource indicated by the request is not cached locally, determines whether the target resource exists in the data source station according to the detected resource status information, and feeds back response information for representing a resource request error when the target resource does not exist. When the source station is judged whether the needed resources exist, the resource state information serving as the judgment basis is obtained by pre-detecting or detecting each source station in a parallel mode in real time, compared with the traditional mode of initiating the streaming media request to each source station in a polling mode and judging by combining the set overtime, the time consumption required by judgment is reduced, under the condition that the needed resources do not exist in the source station, the information representing the resource request error can be quickly responded to the user, and the user waiting time is reduced.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
For convenience of description, the above system or apparatus is described as being divided into various modules or units by function, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
Finally, it is further noted that, herein, relational terms such as first, second, third, fourth, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (12)

1. A method for processing resource requests is characterized by comprising the following steps:
acquiring a resource request of a client;
if the target resource indicated by the resource request is not cached locally, acquiring resource state information of the target resource detected in advance or in real time; in the case that there are a plurality of corresponding data source stations, the real-time detection includes: detecting whether the target resource exists in each data source station in a parallel mode in real time to obtain resource state information of the target resource;
determining whether the target resource exists in a data source station or not according to the resource state information;
if not, feeding back response information for representing resource request errors to the client;
wherein, when there are a plurality of corresponding data source stations, the target resource does not exist in the data source station: the target resource does not exist in a plurality of the data source stations.
2. The method of claim 1, wherein detecting resource status information of the target resource in real-time comprises:
acquiring a source station address of a data source station corresponding to the target resource in real time;
under the condition that the target resource corresponds to a plurality of data source stations, sending a detection request carrying a resource identifier of the target resource to each data source station in a parallel mode according to the source station address of each data source station;
acquiring detection results fed back by each data source station, wherein the detection results fed back by the data source stations are used for indicating whether the target resources exist in the data source stations or not;
determining resource state information of the target resource according to the detection result fed back by each data source station;
and if all detection results corresponding to the target resources indicate that the target resources do not exist, the resource state information represents that the target resources do not exist in the data source station.
3. The method of claim 1, wherein pre-probing the resource status information of the target resource comprises:
when the detection condition is met, sending a detection request carrying the resource identifier of the data resource to each data source station corresponding to the data resource; the data resource is at least one locally cached data resource;
acquiring detection results fed back by each data source station corresponding to the data resources, wherein the detection results fed back by the data source stations are used for indicating whether the data resources exist in the data source stations or not;
determining resource state information of the data resource according to the acquired detection results; if all the detection results corresponding to the data resources indicate that the data resources do not exist, the resource state information of the data resources represents that the data resources do not exist in the data source station;
constructing and recording a corresponding relation between metadata of the data resources and resource state information; the metadata of the data asset includes at least an asset identification of the data asset.
4. The method of claim 1, wherein pre-probing the resource status information of the target resource comprises:
acquiring a state notification of the data resource sent by each data source station corresponding to the data resource, wherein the state notification is used for indicating that the corresponding data resource is on line of the data source station or off line of the data source station;
determining resource state information of the data resources according to state notifications sent by each data source station corresponding to the data resources; if all data source stations corresponding to the data resources send a status notification indicating that the data resources are offline, the resource status information of the data resources indicates that the data resources do not exist in the data source stations;
constructing and recording a corresponding relation between metadata of the data resources and resource state information; the metadata of the data asset includes at least an asset identification of the data asset.
5. The method according to claim 3 or 4, wherein obtaining the resource status information of the target resource detected in advance comprises:
and inquiring the resource state information matched with the resource identifier of the target resource from the corresponding relation set between the metadata of the data resource and the resource state information to obtain the resource state information of the target resource.
6. The method according to claim 2 or 3, wherein the probe request is a hypertext transfer protocol (HTTP) request or a hypertext transfer security protocol (HTTPS) request generated based on a predetermined scripting language.
7. The method of claim 1, wherein the target resource is a live streaming media resource or a non-live data resource;
under the condition that the target resource is a live streaming media resource, detecting resource state information of the target resource in real time;
and under the condition that the target resource is a non-live data resource, detecting the resource state information of the target resource in advance or in real time.
8. The method of claim 1, further comprising:
if the target resource exists in the data source station, determining at least one data source station with the target resource according to the resource state information;
under the condition that the number of the data source stations with the target resources is multiple, determining target source stations meeting source station conditions from the multiple data source stations with the target resources;
and sending a source returning request to the target source station to acquire the target resource from the target source station, and feeding back response information including at least part of the target resource to the client.
9. The method of claim 8, wherein in case of detecting resource status information of the target resource in real time, the method further comprises:
in the process of obtaining the target resource from the target source station to realize the back-to-source processing, if a resource request for requesting the target resource is obtained again, whether the back-to-source processing is overtime is determined;
if the time is out, detecting the resource state information of the target resource in real time;
and if not, continuously acquiring the target resource from the target source station.
10. An apparatus for processing resource requests, comprising:
the first acquisition module is used for acquiring a resource request of a client;
the second acquisition module is used for acquiring the resource state information of the target resource detected in advance or in real time under the condition that the target resource indicated by the resource request is not cached locally; in the case that there are a plurality of corresponding data source stations, the real-time detection includes: detecting whether the target resource exists in each data source station in a parallel mode in real time to obtain resource state information of the target resource;
a determining module, configured to determine whether the target resource exists in a data source station according to the resource status information;
a feedback module, configured to feed back, to the client, response information used for representing a resource request error when the determination result of the determination module is non-existent;
wherein, when there are a plurality of corresponding data source stations, the target resource does not exist in the data source station: the target resource does not exist in a plurality of the data source stations.
11. An electronic device, comprising:
a memory for storing at least one set of instruction sets;
a processor for implementing a method of processing a resource request according to any one of claims 1 to 9 by executing a set of instructions stored on said memory.
12. A computer-readable storage medium having stored therein a set of instructions which, when executed by a processor, implement a method of processing a resource request as claimed in any one of claims 1 to 9.
CN202110752689.3A 2021-07-02 2021-07-02 Resource request processing method and device, electronic equipment and storage medium Pending CN113453047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110752689.3A CN113453047A (en) 2021-07-02 2021-07-02 Resource request processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110752689.3A CN113453047A (en) 2021-07-02 2021-07-02 Resource request processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113453047A true CN113453047A (en) 2021-09-28

Family

ID=77814948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110752689.3A Pending CN113453047A (en) 2021-07-02 2021-07-02 Resource request processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113453047A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992997A (en) * 2021-10-27 2022-01-28 北京金山云网络技术有限公司 Source station switching method, device, equipment and computer readable storage medium
CN114466032A (en) * 2021-12-27 2022-05-10 天翼云科技有限公司 CDN system merging and source returning method, device and storage medium
CN114501056A (en) * 2022-04-18 2022-05-13 深圳市华曦达科技股份有限公司 Method and device for automatically returning channels of multi-source station
CN117834956A (en) * 2023-12-18 2024-04-05 北京联广通网络科技有限公司 Live video acceleration system and method for resource distribution and source return

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080261605A1 (en) * 2005-11-28 2008-10-23 Iwics Inc. Intelligent Video, Data Streaming and Access to Distributed Resources in a Wireless Network
CN106161573A (en) * 2015-04-27 2016-11-23 中兴通讯股份有限公司 Server buffer processing method, Apparatus and system
CN111600772A (en) * 2020-04-30 2020-08-28 北京金山云网络技术有限公司 Network distribution content detection processing device, method, system and electronic equipment
CN112165517A (en) * 2020-09-22 2021-01-01 成都知道创宇信息技术有限公司 Return source detection method and device, storage medium and electronic equipment
CN112788126A (en) * 2020-12-31 2021-05-11 北京达佳互联信息技术有限公司 Resource downloading method, device, server and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080261605A1 (en) * 2005-11-28 2008-10-23 Iwics Inc. Intelligent Video, Data Streaming and Access to Distributed Resources in a Wireless Network
CN106161573A (en) * 2015-04-27 2016-11-23 中兴通讯股份有限公司 Server buffer processing method, Apparatus and system
CN111600772A (en) * 2020-04-30 2020-08-28 北京金山云网络技术有限公司 Network distribution content detection processing device, method, system and electronic equipment
CN112165517A (en) * 2020-09-22 2021-01-01 成都知道创宇信息技术有限公司 Return source detection method and device, storage medium and electronic equipment
CN112788126A (en) * 2020-12-31 2021-05-11 北京达佳互联信息技术有限公司 Resource downloading method, device, server and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992997A (en) * 2021-10-27 2022-01-28 北京金山云网络技术有限公司 Source station switching method, device, equipment and computer readable storage medium
CN114466032A (en) * 2021-12-27 2022-05-10 天翼云科技有限公司 CDN system merging and source returning method, device and storage medium
CN114466032B (en) * 2021-12-27 2023-11-03 天翼云科技有限公司 CDN system merging and source returning method, device and storage medium
CN114501056A (en) * 2022-04-18 2022-05-13 深圳市华曦达科技股份有限公司 Method and device for automatically returning channels of multi-source station
CN117834956A (en) * 2023-12-18 2024-04-05 北京联广通网络科技有限公司 Live video acceleration system and method for resource distribution and source return

Similar Documents

Publication Publication Date Title
CN113453047A (en) Resource request processing method and device, electronic equipment and storage medium
US10986386B2 (en) Video monitoring method and device, storage medium, and electronic device
JP2018196123A (en) Streaming of segmented content
US10069894B2 (en) Electronic device, storage medium and file transferring method
CN112087644B (en) Pull stream request processing method, device and system, electronic equipment and storage medium
CN106533944B (en) Distributed API gateway, management method and management system
US9596313B2 (en) Method, terminal, cache server and system for updating webpage data
WO2014166265A1 (en) Method, terminal, cache server and system for updating webpage data
EP3497909B1 (en) Improved adaptive bit rate streaming of live content with manifest update push notification or long poll
WO2021083243A1 (en) Network slice instance configuration method and apparatus
US20120209977A1 (en) Program Update Management Server And Program Update Management Method
WO2021237433A1 (en) Message pushing method and apparatus, and electronic device and computer-readable medium
WO2015090132A1 (en) Video distribution and media resource system interaction method and system
KR101768365B1 (en) Notification Failure Management Method and System for Subscription-Notification in M2M/IoT System
CN112039718A (en) Upgrade state detection method, server, device and storage medium
US9154318B2 (en) Server arbitrated reliable multicast system and a process for accessing the same
US7177312B2 (en) Server arbitrated reliable multicast system and a process for accessing the same
US10154110B2 (en) System and methods thereof for delivery of popular content using a multimedia broadcast multicast service
CN112653736B (en) Parallel source returning method and device and electronic equipment
CN113285920B (en) Service access method, device, equipment and storage medium
WO2022028189A1 (en) Screen projection method and apparatus, electronic device, and computer readable storage medium
CN114745413A (en) Access control method and device for server, computer equipment and storage medium
CN113133027B (en) Communication method, server, terminal and communication system
CN110809064B (en) IP address switching method, device and system
CN112416257A (en) Resource storage 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