CN115174569B - Control method, device, server and storage medium for video stream transmission - Google Patents

Control method, device, server and storage medium for video stream transmission Download PDF

Info

Publication number
CN115174569B
CN115174569B CN202210738295.7A CN202210738295A CN115174569B CN 115174569 B CN115174569 B CN 115174569B CN 202210738295 A CN202210738295 A CN 202210738295A CN 115174569 B CN115174569 B CN 115174569B
Authority
CN
China
Prior art keywords
forwarding cluster
cluster
candidate
client
target
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
CN202210738295.7A
Other languages
Chinese (zh)
Other versions
CN115174569A (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.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies 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 TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN202210738295.7A priority Critical patent/CN115174569B/en
Publication of CN115174569A publication Critical patent/CN115174569A/en
Application granted granted Critical
Publication of CN115174569B publication Critical patent/CN115174569B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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
    • H04L67/1004Server selection for load balancing
    • 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
    • H04L67/1004Server selection for load balancing
    • H04L67/1021Server selection for load balancing based on client or server locations

Landscapes

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

Abstract

The application discloses a control method for video streaming, a control device for video streaming, a server and a computer readable storage medium. The control method is applied to the server, and comprises the following steps: detecting a push state of target video streaming equipment after receiving a push request initiated by a client for the target video streaming equipment; determining target forwarding clusters according to the push flow state, wherein each forwarding cluster comprises at least two edge nodes; and sending feedback of the push request to the client according to the target forwarding cluster, wherein the feedback is used for indicating the client to pull the video stream pushed by the target video stream device through an edge node in the target forwarding cluster. By the scheme, the scheduling flexibility of the edge node during video stream transmission can be improved, and flexible switching of the video stream transmission route is realized.

Description

Control method, device, server and storage medium for video stream transmission
Technical Field
The application belongs to the technical field of live broadcast and on-demand, and particularly relates to a control method for video streaming, a control device for video streaming, a server and a computer readable storage medium.
Background
When a user remotely requests to review the video stream shot by the camera through the client, the camera can upload the real-time/historical video stream to the server, and the client can download the corresponding real-time/historical video stream from the server, so that live broadcasting or on-demand broadcasting of the video stream is realized. Currently, edge nodes (i.e., edge hosts) are applied in the art, and the client and the camera realize the effects of reducing network delay and improving user experience by accessing the edge nodes. However, after the current edge node completes the allocation, the transmission line of the video stream is fixed, and it is difficult to switch the transmission line later. That is, the scheduling flexibility of the edge node is still to be improved when video streaming is currently performed.
Disclosure of Invention
The application provides a control method for video stream transmission, a control device for video stream transmission, a server and a computer readable storage medium, which can improve the scheduling flexibility of edge nodes during video stream transmission and realize flexible switching of video stream transmission routes.
In a first aspect, the present application provides a control method for video streaming, applied to a server, including:
detecting a push state of target video streaming equipment after receiving a push request initiated by a client for the target video streaming equipment;
Determining target forwarding clusters according to the push flow state, wherein each forwarding cluster comprises at least two edge nodes;
and sending feedback of the push request to the client according to the target forwarding cluster, wherein the feedback is used for indicating the client to pull the video stream pushed by the target video stream equipment through the edge node in the target forwarding cluster.
In a second aspect, the present application provides a control device for video streaming, which is applied to a server, and includes:
the detection module is used for detecting the push state of the target video streaming equipment after receiving a push request initiated by the client for the target video streaming equipment;
the determining module is used for determining target forwarding clusters according to the plug flow state, wherein each forwarding cluster comprises at least two edge nodes;
the first feedback module is used for sending feedback of the push request to the client according to the target forwarding cluster, and the feedback is used for indicating the client to pull the video stream pushed by the target video stream device through the edge node in the target forwarding cluster.
In a third aspect, the present application provides a server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method of the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, performs the steps of the method of the first aspect described above.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by one or more processors, implements the steps of the method of the first aspect described above.
Compared with the prior art, the beneficial effects that this application exists are: after receiving a push request initiated by a client for a target video streaming device, a server does not cause the client to request a pull stream to an edge node in a fixed forwarding cluster, but detects a push stream state of the target video streaming device, determines a target forwarding cluster according to the push stream state, and then sends feedback to the push stream request to the client according to the target forwarding cluster so as to instruct the client to pull a video stream pushed by the target video streaming device through the edge node in the determined target forwarding cluster. Through the process, the client side does not keep pulling the video stream to the edge node in the fixed forwarding cluster, flexible scheduling of the edge node is realized, and the transmission line of the video stream can be flexibly determined according to the actual situation of the current application scene.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic implementation flow chart of a control method for video streaming according to an embodiment of the present application;
FIG. 2 is a first possible interaction schematic provided by an embodiment of the present application;
FIG. 3 is a second possible interaction schematic provided by an embodiment of the present application;
FIG. 4 is a third possible interaction schematic provided by an embodiment of the present application;
FIG. 5 is a fourth possible interaction schematic provided by an embodiment of the present application;
FIG. 6 is a fifth possible interaction schematic provided by an embodiment of the present application;
FIG. 7 is a sixth possible interaction schematic provided by an embodiment of the present application;
Fig. 8 is a block diagram of a control device for video streaming according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to illustrate the technical solutions proposed in the present application, the following description is made by specific embodiments.
The following describes a control method for video streaming according to an embodiment of the present application. The control method is applied to the server. The server, the video stream equipment, the client and the forwarding clusters form a control system for video stream transmission, and each forwarding cluster comprises at least two edge nodes. It should be noted that the network (Internet Protocol, IP) addresses of different edge nodes in the same forwarding cluster are the same, but the cookies are different. That is, differentiation may be achieved by cookies for different edge nodes that are in the same forwarding cluster.
By way of example only, the video streaming device may be a device that can transmit a video stream, such as an Internet Protocol Camera (IPC), a smart phone, or a tablet computer; the video stream transmitted by the video stream device can be a real-time video stream (live broadcast) or a historical video stream (on-demand); the embodiment of the application does not limit the type of the video stream equipment and the type of the video stream.
It can be appreciated that the embodiments of the present application do not limit the number of video streaming devices, clients, and forwarding clusters in the control system. However, in order to improve the scheduling flexibility of the edge node during video streaming, the number of forwarding clusters in the control system is usually more than two.
Based on the control system for video streaming set forth above, a method for controlling video streaming set forth in the embodiment of the present application is described below. Referring to fig. 1, the control method includes:
step 101, detecting a push state of a target video streaming device after receiving a push request initiated by a client for the target video streaming device.
The client may initiate a push request for the video streaming device to which it is to access, which may be referred to as a target video streaming device for ease of description later. It can be understood that the push request carries the identification information of the target video streaming device. By way of example only, the identification information may be a media access control bit (Media Access Control, MAC) address, serial number, or other information capable of uniquely identifying the target video streaming device, as not limited herein. After receiving the push request, the server may detect a push state of the target video streaming device, where the push state is used to indicate whether the target video streaming device is currently pushing.
Step 102, determining a target forwarding cluster according to the push state.
The server can determine the target forwarding cluster by adopting different cluster determination strategies according to the obtained push state of the target video streaming equipment. The target forwarding cluster refers to: the server determines a forwarding cluster for the client to pull.
And step 103, according to the target forwarding cluster, sending feedback of the push flow request to the client.
It will be appreciated that feedback sent to the client may be used to instruct the client to pull the video stream pushed by the target video stream device through an edge node in the target forwarding cluster, where the edge node is specifically assigned by the target forwarding cluster.
In one application scenario, a network address of a forwarding cluster is locally cached at a client, and for convenience of description, the forwarding cluster locally cached at the client may be referred to as a first candidate forwarding cluster. In this application scenario, a push request initiated by the client for the target video streaming device is specifically forwarded to the server through the first candidate forwarding cluster, and a sending process of the push request is described in detail as follows: the client sends a push request to the first candidate forwarding cluster; the first candidate forwarding cluster allocates an edge node (denoted as a first edge node) to the client, and forwards the push request carrying the information of the first edge node to the server. In this application scenario, step 102 may specifically include:
Step 1021, determining a second candidate forwarding cluster according to the push state.
In the case that the push state indicates that the target video streaming device is pushing, the server may determine, according to the current edge node, a second candidate forwarding cluster, specifically: and determining the forwarding cluster (which can be called as the current push cluster) where the current edge node is located as a second candidate forwarding cluster. Wherein the current edge node is: the target video streaming device is pushing edge nodes of the stream.
For example only, assuming that the push state indicates that the target video streaming device is pushing and that the current edge node is A1, the current edge node A1 is in forwarding cluster a, forwarding cluster a may be determined to be a second candidate forwarding cluster.
When the push state indicates that the target video streaming device is not pushing, the server may determine a second candidate forwarding cluster according to a preset database, specifically: and determining the forwarding cluster (which can be recorded as a database cluster) searched according to the database as a second candidate forwarding cluster. Wherein the database comprises: and the first database is used for storing the corresponding relation between the video streaming equipment and the forwarding cluster. The server may thus find a forwarding cluster corresponding to the target video streaming device in the first database and determine the found forwarding cluster as a second candidate forwarding cluster.
For example only, the first database may be as shown in table 1 below:
video streaming device Forwarding clusters
Camera1 A
Camera2 B
…… ……
TABLE 1
The video streaming equipment Camera1, camera2 and the like can be specifically represented by the identification information; forwarding clusters a and B, etc. may be represented specifically by their network addresses.
Considering that the network to which the video streaming device is connected may be changed due to the fact that the video streaming device is moved by the user, the first database may be updated and maintained according to a second database, where the second database is used to store the corresponding relationship between the geographic location and the forwarding cluster. The update procedure of the first database is briefly described below:
a1, acquiring a network address of each video stream device when the video stream device is online.
After the video streaming device is on line, the server can maintain long connection with the video streaming device; based on the above, the server can judge the online and offline of each video streaming device according to the long connection condition. When any video stream equipment is judged to be online, the network address used by the video stream equipment in the current online can be obtained.
In some embodiments, if the network to which the video streaming device has access is not changed, the forwarding cluster to which the video streaming device corresponds is not generally changed. Based on the network address, the server can record the network address used by the video streaming equipment on line each time; on the basis, in order to save system resources, the server can judge whether the network address used by the video stream equipment on line at the current time is the same as the network address used by the video stream equipment on line at the previous time; if the first database is the same, the first database does not need to be updated; if not, or if there is no network address used by the video streaming device to be brought on line last time (i.e. this time the video streaming device is brought on line first), a subsequent step may be performed to update the first database.
A2, determining the geographic position of the video stream equipment according to the network address of the video stream equipment.
The server can determine the current geographic location of the video streaming device by querying the network address of the video streaming device. It should be noted that, the geographic location referred to in the embodiments of the present application does not refer to a specific detailed location or latitude and longitude, but refers to an approximate location of a geographic area, for example, a city of a province.
In some embodiments, if the network to which the video streaming device is connected changes, but the geographic location of the network is not changed, the forwarding cluster corresponding to the video streaming device is not changed. Based on the information, the server can record the geographic position of the video streaming equipment on line each time; on the basis, the server can further judge whether the geographic position of the video stream equipment on line is the same as the geographic position of the video stream equipment on line in the previous time; if the first database is the same, the first database does not need to be updated; if not, or if there is no geographical location where the video streaming device was last online (i.e., this time the video streaming device was first online), a subsequent step is required to update the first database.
A3, searching a forwarding cluster corresponding to the geographic position of the video stream equipment in the second database.
For example only, the second database may be as shown in table 2 below:
geographic location Forwarding clusters
C1 City of P1 A
C2 City of P1 B
…… ……
TABLE 2
The forwarding clusters a and B may be specifically represented by their network addresses.
And A4, updating the first database according to the forwarding cluster corresponding to the geographic position of the video streaming equipment.
After the server searches the forwarding cluster corresponding to the geographic position of the video stream equipment in the second database, the first database can be updated according to the searched forwarding cluster. Wherein, in the case that the video streaming device is first online, the updating operation specifically includes: and in the first database, the corresponding relation between the video stream equipment and the searched forwarding cluster is newly added. In the case that the video streaming device is not initially on-line, the updating operation specifically includes: and in the first database, replacing the corresponding relation between the originally recorded video stream equipment and the forwarding cluster with the corresponding relation between the video stream equipment and the forwarding cluster searched at the time.
By way of example only, the following description is provided in connection with tables 1 and 2: the forwarding cluster corresponding to the Camera1 is A. Assuming that the user moves home, the geographic position of the Camera1 is changed from the city of C1 in P1 province to the city of C2 in P1 province, and after the Camera1 is online, the server can update the first database through the steps. The updated first database may be as shown in table 3 below:
Video streaming device Forwarding clusters
Camera1 B
Camera2 B
…… ……
TABLE 3 Table 3
Step 1022, determining the target forwarding cluster from the second candidate forwarding cluster and the first candidate forwarding cluster.
It may be appreciated that the first candidate forwarding cluster is a cached forwarding cluster for the client, which forwarding cluster was previously allocated to the client by the server; the second candidate forwarding cluster is a forwarding cluster designated by the server according to the push state of the target video streaming device. The server can determine a forwarding cluster more suitable for the video stream transmission task at this time as a target forwarding cluster according to actual conditions in the first candidate forwarding cluster and the second candidate forwarding cluster.
In some embodiments, the server may determine the target forwarding cluster by:
b1, detecting whether the second candidate forwarding cluster and the first candidate forwarding cluster are the same.
Specifically, the server may determine whether the second candidate forwarding cluster and the first candidate forwarding cluster are identical by comparing the network addresses of the two.
B2, determining the first candidate forwarding cluster as a target forwarding cluster under the condition that the second candidate forwarding cluster and the first candidate forwarding cluster are the same.
In fact, in this case, the second candidate forwarding cluster and the first candidate forwarding cluster point to substantially the same forwarding cluster, and thus the operation of determining the first candidate forwarding cluster as the target forwarding cluster is also equivalent to the operation of determining the second candidate forwarding cluster as the target forwarding cluster.
Specifically, if the second candidate forwarding cluster is the current push cluster and the second candidate forwarding cluster and the first candidate forwarding cluster are the same, the first forwarding cluster may directly use the current edge node as the first edge node allocated to the client. When the subsequent server sends feedback to the client according to the target forwarding cluster, the feedback is actually forwarded to the client by the first candidate forwarding cluster, and the feedback further carries information of the first edge node (i.e. the current edge node), including: the network address of the first edge node (i.e., the network address of the target forwarding cluster) and the cookie. It will be appreciated that in this case, the target video streaming device is already streaming towards the current edge node, and repeated streaming of the target video streaming device may be avoided.
Specifically, if the second candidate forwarding cluster is a database cluster and the second candidate forwarding cluster and the first candidate forwarding cluster are the same, the first forwarding cluster may use the idle edge node as the first edge node allocated to the client in a polling manner. When the subsequent server sends feedback to the client according to the target forwarding cluster, the feedback is actually forwarded to the client by the first candidate forwarding cluster, and the feedback also carries information of the first edge node, including: the network address of the first edge node (i.e., the network address of the target forwarding cluster) and the cookie. In addition, since the target video streaming device has not started streaming in this case, the server also needs to feed back the information of the first edge node to the target video streaming device to instruct the target video streaming device to push streaming to the first edge node. It will be appreciated that in this case, the target video streaming device will push streams to the first edge node from which the client will pull streams; the target video stream equipment and the client are positioned to the same edge node, so that the forwarding work of the video stream is realized in the node, and the fluency of video stream transmission can be ensured.
And B3, determining a target forwarding cluster in the second candidate forwarding cluster and the first candidate forwarding cluster according to the third database under the condition that the second candidate forwarding cluster and the first candidate forwarding cluster are different.
When a client pulls a stream to an edge node across network operators, the edge node may not be accessible or difficult to access due to unstable network services, and thus the stream may fail. In order to reduce this, when the second candidate forwarding cluster and the first candidate forwarding cluster are different, the server may select, through the third database, a forwarding cluster that is relatively more accessible by the client and is relatively more stable from the second candidate forwarding cluster and the first candidate forwarding cluster as the target forwarding cluster.
In general, whether a client has access to an edge node in a forwarding cluster is generally related to the network environment in which the client is located. Based on this, the following conclusions are drawn: when the network environment of a client changes, forwarding clusters which cannot be accessed or are difficult to access by the client can change along with the forwarding clusters; and forwarding clusters that are inaccessible or difficult to access by different clients under the same network environment are typically kept consistent. Based on the above conclusion, the database of the server may further include: and a third database. The third database is used for storing information of forwarding clusters which cannot be accessed by the client in the past, and specifically comprises the following steps: and forwarding cluster information which cannot be accessed by the client in the past under different network environments. Also, since different network environments may generally use network addresses as the distinction, the third database may actually store: when a client cannot or is difficult to access a forwarding cluster, the corresponding relationship between the network address of the client and the network address of the forwarding cluster.
For example only, if a Client1 cannot access the forwarding cluster a, and the network address of the Client1 is IP1 and the network address of the forwarding cluster a is IP3, the third database may be updated based on the correspondence between the network address of the Client1 and the network address of the forwarding cluster a. The updated third database may be as shown in table 4 below:
network address of client Inaccessible network addresses
IP1 IP3
…… ……
TABLE 4 Table 4
Because the second candidate forwarding cluster is a forwarding cluster designated by the server according to the push state of the target video streaming device, the second candidate forwarding cluster has a higher priority than the first candidate forwarding cluster. Based on this, step B3 may specifically include:
b31, predicting whether the client can access the second candidate forwarding cluster according to the third database.
The push request carries the network address of the client, and the server can search in the third database according to the network address of the client, so that the forwarding cluster which cannot be accessed or is difficult to access by the client in the current network environment can be known. The server can compare the second candidate forwarding cluster with the forwarding cluster which cannot be accessed or is difficult to access by the searched client in the past under the current network environment; if the second candidate forwarding cluster is found to be one of forwarding clusters which cannot be accessed or are difficult to access by the client in the current network environment, the client is considered to be likely to still be unable to access the second candidate forwarding cluster; otherwise, if the second candidate forwarding cluster is found not to be in the forwarding cluster which cannot be accessed or is difficult to access by the client in the current network environment, the client is considered to be likely to be capable of accessing the second candidate forwarding cluster.
B32, determining the first candidate forwarding cluster as the target forwarding cluster under the condition that the prediction result indicates that the client cannot access the second candidate forwarding cluster.
It will be appreciated that since the push request is forwarded to the server by the first candidate forwarding cluster, it is believed that the client must have access to the first candidate forwarding cluster. Based on the above, when the client is predicted to be unable to access the second candidate forwarding cluster, the server may directly determine the first candidate forwarding cluster as the target forwarding cluster in order to ensure smooth transmission of the video stream.
And B33, determining the second candidate forwarding cluster as a target forwarding cluster when the prediction result indicates that the client can access the second candidate forwarding cluster.
Since the second candidate forwarding cluster is substantially higher priority than the first candidate forwarding cluster, the server may directly determine the second candidate forwarding cluster as the target forwarding cluster when the predicted client is able to access the second candidate forwarding cluster.
In some embodiments, the server may maintain a third database. For example, the third database may be periodically emptied; alternatively, the entries stored in the third database for too long may be periodically deleted, and the maintenance method is not limited here.
It should be noted that when the client has not previously attempted to access the second candidate forwarding cluster, it may happen that the client cannot actually access the second candidate forwarding cluster, but the third database does not have a record. For this case, when the client initiates the push request for the first time and the first candidate forwarding cluster is different from the second candidate forwarding cluster, the target forwarding cluster determined by the server for the client is the second candidate forwarding cluster. The client thus pulls a stream to the target forwarding cluster (i.e., the second candidate forwarding cluster), but may fail to pull the stream due to the inability to access. At this time, the client may report to the server information that the access to the target forwarding cluster (i.e., the second candidate forwarding cluster) failed, and reinitiate the push request. When the server processes a push request initiated by the client terminal for the second time and the first candidate forwarding cluster and the second candidate forwarding cluster are still not the same, the record of the second candidate forwarding cluster cannot be accessed by the existing client terminal in the current network environment in the third database, so that the target forwarding cluster determined by the server for the client terminal for the second time is the first candidate forwarding cluster. Through the above process, smooth transmission of video streams can be ensured.
Specifically, if the second candidate forwarding cluster is a current push cluster and the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the server predicts that the client can access the second candidate forwarding cluster, the server may determine the second candidate forwarding cluster as the target forwarding cluster. The server may also request that the second candidate forwarding cluster allocate an edge node (i.e., a second edge node) for the client; typically, the second candidate forwarding cluster will treat the current edge node as the second edge node assigned to the client. When the subsequent server sends feedback to the client according to the target forwarding cluster, the feedback is actually forwarded to the client by the first candidate forwarding cluster, and the feedback further carries information of the second edge node (i.e. the current edge node), including: the network address of the second edge node (i.e., the network address of the target forwarding cluster) and the cookie. It will be appreciated that in this case, the target video streaming device is already pushing to the second edge node (i.e. the current edge node), and repeated pushing of the target video streaming device can be avoided; and the target video streaming device pushes streams to the second edge node (i.e., the current edge node), and the client pulls streams from the second edge node (i.e., the current edge node); the target video stream equipment and the client are positioned to the same edge node, so that the forwarding work of the video stream is realized in the node, and the fluency of video stream transmission can be ensured.
Specifically, if the second candidate forwarding cluster is a current push cluster and the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the server predicts that the client cannot access the second candidate forwarding cluster, the server may determine the first candidate forwarding cluster as the target forwarding cluster. However, since the target video streaming device is pushing a stream to the second candidate forwarding cluster at this time, a video streaming forwarding channel between the second candidate forwarding cluster and the first candidate forwarding cluster needs to be built, specifically: and feeding back the information of the first edge node to the second candidate forwarding cluster so as to instruct the second candidate forwarding cluster to forward the video stream pushed by the received target video stream equipment to the first edge node. When the subsequent server sends feedback to the client according to the target forwarding cluster, the feedback is actually forwarded to the client by the first candidate forwarding cluster, and the feedback also carries information of the first edge node, including: the network address of the first edge node (i.e., the network address of the target forwarding cluster) and the cookie. It will be appreciated that in this case, the video streaming route of the target video streaming device to the client is: target video streaming device-second candidate forwarding cluster (current edge node) -first candidate forwarding cluster (first edge node) -client.
Specifically, if the second candidate forwarding cluster is a database cluster and the second candidate forwarding cluster and the first candidate forwarding cluster are different and the server predicts that the client is able to access the second candidate forwarding cluster, the server may determine the second candidate forwarding cluster as the target forwarding cluster. The server may also request that the second candidate forwarding cluster allocate an edge node (i.e., a second edge node) for the client; typically, the second candidate forwarding cluster will use the idle edge node as the second edge node allocated to the client by polling. When the subsequent server sends feedback to the client according to the target forwarding cluster, the feedback is actually forwarded to the client by the first candidate forwarding cluster, and the feedback also carries information of the second edge node, including: the network address of the second edge node (i.e., the network address of the target forwarding cluster) and the cookie. In addition, the server may feed back information of the second edge node to the target video streaming device to instruct the target video streaming device to push the stream to the second edge node. It will be appreciated that in this case, the target video streaming device will push streams to the second edge node from which the client will pull streams; the target video stream equipment and the client are positioned to the same edge node, so that the forwarding work of the video stream is realized in the node, and the fluency of video stream transmission can be ensured.
Specifically, if the second candidate forwarding cluster is a database cluster and the second candidate forwarding cluster and the first candidate forwarding cluster are different and the server predicts that the client cannot access the second candidate forwarding cluster, the server may determine the first candidate forwarding cluster as the target forwarding cluster. When the subsequent server sends feedback to the client according to the target forwarding cluster, the feedback is actually forwarded to the client by the first candidate forwarding cluster, and the feedback also carries information of the first edge node, including: the network address of the first edge node (i.e., the network address of the target forwarding cluster) and the cookie. In addition, the server may feed back information of the first edge node to the target video streaming device to instruct the target video streaming device to push the stream to the first edge node. It will be appreciated that in this case, the target video streaming device will push streams to the first edge node from which the client will pull streams; the target video stream equipment and the client are positioned to the same edge node, so that the forwarding work of the video stream is realized in the node, and the fluency of video stream transmission can be ensured.
In some embodiments, the third database may record not only information of forwarding clusters that the client cannot access in the past under different network environments, but also the number of times of each entry; i.e. the number of times a client cannot access a forwarding cluster in a certain network environment is recorded. It should be noted that the number of corresponding entries is updated each time the server predicts that the client cannot access the second candidate forwarding cluster. Once the number of times of an entry reaches a preset number of times threshold, the client indicated by the entry, and the forwarding cluster indicated by the entry, may be determined. If the forwarding cluster is the forwarding cluster corresponding to the video stream equipment in the first database, which is initiated by the client and indicated by the push stream request, the forwarding cluster corresponding to the video stream equipment in the first database can be updated to be a central cluster. Wherein, this central cluster is: clusters of border gateway protocol (Border Gateway Protocol, BGP) networks are used. It will be appreciated that the client can access the central cluster regardless of the network environment in which it is located, and thus in the manner described above, the occurrence of video streaming across clusters can be reduced.
By way of example only, assume that the forwarding cluster corresponding to the target video streaming device Camera1 in the first database is forwarding cluster a, and the network address thereof is IP3. The network address of the Client1 used by the user in the conventional network environment is IP1. As can be seen from table 4, client1 is often not able to access forwarding cluster a in this conventional network environment. In this way, the server updates the corresponding entry in table 4 each time the Client1 requests the video stream of the target video stream device Camera1, and the updated third database may be as shown in table 5 below:
network address of client Inaccessible network addresses Number of times
IP1 IP3 x
TABLE 5
When the number x of the entries reaches a preset number threshold N, it indicates that the Client1 has initiated a push request to the target video streaming device Camera1 at least N times in its usual network environment. At this time, the server may change the forwarding cluster corresponding to the target video streaming device Camera1 in the first database from the forwarding cluster a to the central cluster C, so as to avoid frequent cross-cluster transmission situations (i.e. "the second candidate forwarding cluster is the current push cluster and the second candidate forwarding cluster is different from the first candidate forwarding cluster" described above, and the server predicts that the Client cannot access the scene of the second candidate forwarding cluster ") when the Client1 requests the video streaming of the target video streaming device Camera 1.
In some embodiments, when the push state indicates that the target video streaming device is not pushing, and the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the prediction result indicates that the client can access the second candidate forwarding cluster, the feedback sent by the server to the client may be further used to indicate the client to update the network address of the cached forwarding cluster according to the target forwarding cluster. In this way, an update of the network address of the forwarding cluster cached by the client may be achieved. This process can be understood as: updating the first candidate forwarding cluster for the client and the target video streaming device. It should be noted that, in order to avoid that the client updates the network address of the forwarding cluster cached by the client by mistake when the client cannot access the target forwarding cluster, the client may consider that after receiving the feedback and successfully pulling the stream from the target forwarding cluster, the client updates the network address of the forwarding cluster cached by the client according to the target forwarding cluster. That is, by setting the update delay, the accessibility of the network address of the forwarding cluster cached by the client is ensured.
It will be appreciated from the above description that the embodiments of the present application propose a total of 6 possible cases, which 6 possible cases can be summarized by the following table 6:
TABLE 6
To facilitate understanding of the above 6 cases, examples of specific actual scenarios corresponding to the 6 cases respectively are given below through table 7:
TABLE 7
The following further describes the above 6 cases with reference to an interaction schematic diagram of the client, the forwarding cluster, the server and the target video streaming device:
referring to fig. 2, fig. 2 shows an interaction schematic of a client, a forwarding cluster, a server and a target video streaming device in the case. The interaction process is briefly described as follows:
1. the client initiates a push request for the target video streaming device through the first candidate forwarding cluster.
2. The first candidate forwarding cluster allocates a first edge node and forwards the push request to the server.
3. The server judges that the target video stream equipment is not pushing, the first candidate forwarding cluster is the same as the second candidate forwarding cluster, and the target forwarding cluster is determined to be the first candidate forwarding cluster.
4. The server triggers the target video streaming device to push streams to the first edge node of the first candidate forwarding cluster.
5. The server sends feedback to the client to trigger the client to pull streams from the first edge node of the first candidate forwarding cluster.
Therefore, both the pulling flow of the client and the pushing flow of the target video flow device are positioned to the same edge node (first edge node), the forwarding work of the video flow is realized in the same edge node, and the user can watch the video flow pushed by the target video flow device through the client.
Referring to fig. 3, fig. 3 shows an interaction schematic of the client, the forwarding cluster, the server and the target video streaming device in the second case. The difference from the case one shown in fig. 2 is that:
1. the server needs to apply for the allocation of edge nodes (i.e. second edge nodes) for the clients to the second candidate forwarding cluster (i.e. database cluster).
2. And when the server triggers the camera plug flow, a second edge node is adopted.
3. The client achieves the acquisition of the video stream through the second edge node in the second candidate forwarding cluster (i.e., the database cluster).
4. The client may update its cached network address of the forwarding cluster.
Therefore, both the pulling flow of the client and the pushing flow of the target video flow device are positioned to the same edge node (second edge node), the forwarding work of the video flow is realized in the same edge node, and the user can watch the video flow pushed by the target video flow device through the client.
Referring to fig. 4, fig. 4 shows an interaction schematic of the client, the forwarding cluster, the server and the target video streaming device in the third case. In the third case, the client cannot access the second candidate forwarding cluster, and the target video streaming device is not pushing, so that the target forwarding cluster can be determined to be the first candidate forwarding cluster, and the overall processing flow is highly similar to the first case. It can be understood that in this case, the server may record that the client cannot access the second candidate forwarding cluster (i.e., the database cluster), and when the number of times of recording reaches the preset number of times threshold, the database cluster (i.e., the forwarding cluster corresponding to the target video streaming device recorded by the first database) may be switched to the central cluster using the BGP network, so as to avoid frequent cross-cluster transmission operations when the subsequent client requests for the push stream for the target video streaming device.
Referring to fig. 5, fig. 5 shows an interaction schematic of the client, the forwarding cluster, the server and the target video streaming device in the fourth case. The difference from the case one shown in fig. 2 is that: the operation of triggering the push of the target video streaming device is omitted (because the target video streaming device is already pushing).
Referring to fig. 6, fig. 6 shows an interaction schematic of the client, the forwarding cluster, the server and the target video streaming device in the fifth case. The difference from the case one shown in fig. 2 is that:
1. the server needs to apply for the second candidate forwarding cluster (i.e., the current push cluster) to allocate an edge node (i.e., the second edge node) to the client for the client to pull the current stream. Generally, the assigned second edge node is the current edge node.
2. The client accesses a second edge node (i.e., the current edge node) of the second candidate forwarding cluster (i.e., the current push cluster) to perform pull according to the received feedback.
It will be appreciated that the network address of the forwarding cluster cached by the client is not updated this time, since the video stream may be temporarily present (e.g., limited by the traffic itself limitation, which is only 10 minutes).
Referring to fig. 7, fig. 7 shows an interaction schematic of the client, the forwarding cluster, the server and the target video streaming device in the sixth case. As can be seen from fig. 7, in this case the client still pulls a flow from the first edge node of the first candidate forwarding cluster, the difference compared to the case one shown in fig. 2 is that: the server controls the second candidate forwarding cluster to forward the video stream to the first candidate forwarding cluster.
It will be appreciated that this time the network address of the forwarding cluster cached by the client is not updated, since in this case the client cannot access the second candidate forwarding cluster. However, the "client cannot access the second candidate forwarding cluster" in this case may have an influence on the number of times that the third database is not accessed.
It should be noted that, in the interaction process shown in fig. 2-7 above, part of the steps (for example, the step that the target forwarding cluster feeds back to the server that the client has been streamed after the client has been streamed, etc.) are omitted, and only part of the steps that are highly relevant to the embodiments of the present application are shown.
Based on the above described determining process of the target forwarding cluster, the streaming operation of the client and the streaming operation of the target video streaming device in an ideal state can be positioned to the same edge node as much as possible; in addition, as can be seen from the first database and the second database, the geographic location of the same edge node is closer to the target video streaming device in an ideal state, so that the video streaming can be transmitted more smoothly.
In another application scenario, the client does not have any network address of the forwarding cluster cached locally, i.e. there is no first candidate forwarding cluster. Under such an application scenario, the embodiment of the application provides two possible interaction modes of the client and the server, wherein the client and the server can adopt any interaction mode to realize the determination of the target forwarding cluster:
the first way is: the client initiates a cluster allocation request to the server directly for the target video streaming device. After receiving a cluster allocation request initiated by a client for target video streaming equipment, a server allocates a corresponding forwarding cluster for the client according to a database and the target video streaming equipment, and feeds back the network address of the forwarding cluster to the client. The local of the client has thus far cached the network address of the forwarding cluster, i.e. the transition from no first candidate forwarding cluster to a first candidate forwarding cluster is completed for the client and the target video streaming device. Thereafter, the target forwarding cluster may be determined with reference to the previous application scenario described above, which is not described herein.
The implementation process of distributing the corresponding forwarding cluster for the client according to the database and the target video streaming equipment is briefly described as follows: and searching whether a forwarding cluster corresponding to the target video stream equipment is recorded in the first database. If the record exists, the forwarding cluster corresponding to the target video stream equipment recorded by the first database is distributed to the client. If no record exists, determining the geographic position of the target video stream equipment according to the network address of the target video stream equipment (the network address used by the target video stream equipment when the target video stream equipment is online, and the network address used by the target video stream equipment when the target video stream equipment is not online, and searching the corresponding forwarding cluster in the second database according to the geographic position to be distributed to the client, and updating the first database according to the searching result.
The second mode is as follows: the client directly initiates a push request to the server aiming at the target video streaming equipment. And after receiving a push request initiated by the client for the target video streaming equipment, the server acquires the push state of the target video streaming equipment. Under the condition that the push state of the target video stream equipment indicates that the target video stream equipment is pushing, directly determining a forwarding cluster where a current edge node is located (namely, a current push cluster) as a target forwarding cluster; otherwise, when the push state of the target video streaming device indicates that the target video streaming device is not pushing, the target forwarding cluster is determined according to the database and the target video streaming device, and the implementation process is similar to the implementation process of "allocating a corresponding forwarding cluster for a client according to the database and the target video streaming device" described in the first mode, which is not repeated herein. It may be understood that in this manner, the first candidate forwarding cluster does not already exist in practice, and the server may directly determine the determined second candidate forwarding cluster as the target forwarding cluster, which is not described herein.
In some embodiments, if a client cannot access a target forwarding cluster determined in this way, the target forwarding cluster may be updated to a central cluster using a BGP network, embodied as: when the push state of the target video stream device indicates that the target video stream device is pushing, the server can control a forwarding cluster (i.e. a current push cluster) where the current edge node is located to forward the received video stream of the target video stream device to an updated target forwarding cluster (i.e. a central cluster), so that the client can pull streams through the updated target forwarding cluster (i.e. the central cluster); and under the condition that the pushing state of the target video streaming equipment indicates that the target video streaming equipment is not pushing, the server can control the target video streaming equipment to push the stream to the updated target forwarding cluster (i.e. the central cluster), so that the client can pull the stream through the updated target forwarding cluster (i.e. the central cluster).
In some embodiments, a client may experience anomalies due to network reasons or anomalies due to server failures when accessing a server or forwarding cluster. Especially when the forwarding cluster uses network services provided by three network operators, namely telecommunications, mobile or Unicom, and the client uses network services provided by other small network operators (such as great wall, etc.), the phenomenon that network connection is not enabled is more likely to occur. In this regard, the present embodiments summarize the following several possible abnormal scenarios:
abnormal scene one: the user fails or is wrong to visit the first candidate forwarding cluster;
abnormal scene two: the first candidate forwarding cluster fails or is wrong to access the server;
abnormal scene three: user access to the server fails or is incorrect;
abnormal scene four: the target video streaming device fails to access the target forwarding cluster.
For the first exception scenario, the exception handling flow that may be employed is as follows:
1. the client requests the server to redistribute the first candidate forwarding cluster;
2. the server marks that the client cannot access the original first candidate forwarding cluster, and updates the third database;
3. the server distributes a new first candidate forwarding cluster for the client;
4. The user caches the network address of the new first candidate forwarding cluster, and initiates the push request again through the new first candidate forwarding cluster, and the process thereof may be described in the foregoing, which is not repeated herein.
For the second exception scenario, the exception handling operations that may be employed are as follows:
although the first candidate forwarding cluster is not associated with the server, it is still necessary to trigger the targeted video streaming device push. Because it cannot be judged whether the network connection between the first candidate forwarding cluster and the server is faulty or the server itself is faulty, the client can be controlled to directly access the standby server to realize the triggering push of the target video streaming device. In order to stabilize traffic in each forwarding cluster, service avalanches caused by large traffic rushing into other forwarding clusters are avoided, and in such an abnormal scenario, the network address of the cached forwarding cluster of the client is not changed (i.e. the first candidate forwarding cluster is not changed).
For the abnormal scene three, the following exception handling operations can be adopted:
the client may access the backup server when the client cannot access the first candidate forwarding cluster and the server. The standby server can equally divide the push request to each forwarding cluster, so that the push of the target video streaming equipment is realized. The standby server may maintain a node list, where state information of edge nodes of each forwarding cluster is recorded. The equipartition algorithm adopted by the standby server can be as follows: polling or weighted polling.
For the exception scene four, the exception handling operations that may be employed are as follows:
considering that the geographic position of the video stream equipment is generally unchanged, the server can determine other forwarding clusters as new target forwarding clusters when confirming that the target video stream equipment cannot push streams to the target forwarding clusters, and trigger the target video stream equipment to push streams to the new target forwarding clusters; correspondingly, the server also informs the client to use the new target forwarding cluster for streaming.
As can be seen, in the embodiment of the present application, after receiving a push request initiated by a client for a target video streaming device, the server does not make the client request to pull a stream from an edge node in a fixed forwarding cluster, but first detects a push state of the target video streaming device, determines a target forwarding cluster according to the push state, and then sends feedback to the push request to the client according to the target forwarding cluster, so as to instruct the client to pull a video stream pushed by the target video streaming device through the edge node in the determined target forwarding cluster. Through the process, the client side does not keep pulling the video stream to the edge node in the fixed forwarding cluster, flexible scheduling of the edge node is realized, and the transmission line of the video stream can be flexibly determined according to the actual situation of the current application scene.
Corresponding to the control method for video streaming provided above, the embodiment of the application also provides a control device for video streaming. As shown in fig. 8, the control device 800 includes:
a detection module 801, configured to detect a push state of a target video streaming device after receiving a push request initiated by a client for the target video streaming device;
a determining module 802, configured to determine target forwarding clusters according to the push state, where each forwarding cluster includes at least two edge nodes;
the first feedback module 803 is configured to send feedback to the client for the push request according to the target forwarding cluster, where the feedback is used to instruct the client to pull, through an edge node in the target forwarding cluster, a video stream pushed by the target video stream device.
In some embodiments, the push request is forwarded to the server by a first candidate forwarding cluster, wherein the first candidate forwarding cluster is: the client caches the forwarding cluster with the network address; the determining module 802 includes:
the first determining unit is used for determining a second candidate forwarding cluster according to the push state;
and the second determining unit is used for determining the target forwarding cluster in the second candidate forwarding cluster and the first candidate forwarding cluster.
In some embodiments, the first determining unit is specifically configured to determine, according to the current edge node, a second candidate forwarding cluster when the push state indicates that the target video streaming device is pushing, where the current edge node is: edge nodes of the pushing stream of the target video stream equipment; and under the condition that the push state indicates that the target video streaming equipment is not in push, determining a second candidate forwarding cluster according to a preset database.
In some embodiments, the database comprises: the system comprises a first database and a second database, wherein the first database is used for storing the corresponding relation between video streaming equipment and a forwarding cluster, and the second database is used for storing the corresponding relation between a geographic position and the forwarding cluster; the updating process of the first database comprises the following steps:
for each video stream device, when the video stream device is online, acquiring a network address of the video stream device;
determining the geographic position of the video streaming equipment according to the network address of the video streaming equipment;
searching a forwarding cluster corresponding to the geographic position of the video stream equipment in a second database;
the first database is updated according to a forwarding cluster corresponding to the geographical location of the video streaming device.
In some embodiments, the preset database of the server comprises: the third database is used for storing the information of forwarding clusters which cannot be accessed by each client in the past; a second determination unit including:
a detection subunit, configured to detect whether the second candidate forwarding cluster and the first candidate forwarding cluster are the same;
a first determining subunit, configured to determine, when the second candidate forwarding cluster and the first candidate forwarding cluster are the same, the first candidate forwarding cluster as a target forwarding cluster;
and the second determining subunit is configured to determine, according to the third database, the target forwarding cluster from the second candidate forwarding cluster and the first candidate forwarding cluster when the second candidate forwarding cluster and the first candidate forwarding cluster are different.
In some embodiments, the second determining subunit comprises:
a prediction subunit, configured to predict, according to the third database, whether the client can access the second candidate forwarding cluster;
a target forwarding cluster determining subunit, configured to determine, when the prediction result indicates that the client cannot access the second candidate forwarding cluster, the first candidate forwarding cluster as the target forwarding cluster; and determining the second candidate forwarding cluster as the target forwarding cluster in the case that the prediction result indicates that the client can access the second candidate forwarding cluster.
In some embodiments, the push request further carries information of a first edge node, wherein the first edge node is in the first candidate forwarding cluster, and the first edge node is allocated by the first candidate forwarding cluster; the control device 800 further includes:
the second feedback module is used for feeding back the information of the first edge node to the second candidate forwarding cluster to instruct the second candidate forwarding cluster to forward the video stream pushed by the received target video stream device to the first edge node under the condition that the pushing state indicates that the target video stream device is pushing, the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the prediction result indicates that the client cannot access the second candidate forwarding cluster;
the third feedback module is used for indicating that the target video streaming equipment is not in pushing flow when the pushing flow state indicates that the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the prediction result indicates that the client cannot access the second candidate forwarding cluster; or if the push state indicates that the target video streaming equipment is not pushing, and the second candidate forwarding cluster and the first candidate forwarding cluster are the same, feeding back the information of the first edge node to the target video streaming equipment so as to indicate the target video streaming equipment to push the target video streaming equipment to the first edge node;
And the fourth feedback module is used for feeding back information of the second edge node to the target video streaming equipment to instruct the target video streaming equipment to push the second edge node under the condition that the push state indicates that the target video streaming equipment is not in push, the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the prediction result indicates that the client can access the second candidate forwarding cluster, wherein the second edge node is in the second candidate forwarding cluster, and the second edge node is distributed by the second candidate forwarding cluster.
In some embodiments, when the push state indicates that the target video streaming device is not pushing, and the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the prediction result indicates that the client can access the second candidate forwarding cluster, the feedback sent by the server to the client is further used to indicate the client to update the network address of the cached forwarding cluster according to the target forwarding cluster.
As can be seen, in the embodiment of the present application, after receiving a push request initiated by a client for a target video streaming device, the server does not make the client request to pull a stream from an edge node in a fixed forwarding cluster, but first detects a push state of the target video streaming device, determines a target forwarding cluster according to the push state, and then sends feedback to the push request to the client according to the target forwarding cluster, so as to instruct the client to pull a video stream pushed by the target video streaming device through the edge node in the determined target forwarding cluster. Through the process, the client side does not keep pulling the video stream to the edge node in the fixed forwarding cluster, flexible scheduling of the edge node is realized, and the transmission line of the video stream can be flexibly determined according to the actual situation of the current application scene.
Corresponding to the control method for video streaming provided above, the embodiment of the application also provides a server. Referring to fig. 9, the server 9 in the embodiment of the present application includes: memory 901, one or more processors 902 (only one shown in fig. 9), and computer programs stored on memory 901 and executable on processor 902. Wherein: the memory 901 is used for storing software programs and units, and the processor 902 executes various functional applications and diagnoses by running the software programs and units stored in the memory 901 to obtain resources corresponding to the preset events. Specifically, the processor 902, when executing the computer programs described above, implements the steps described above in any of the various control method embodiments applied to the server.
It should be appreciated that in embodiments of the present application, the processor 902 may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Memory 901 may include read only memory and random access memory and provide instructions and data to processor 902. Some or all of memory 901 may also include nonvolatile random access memory. For example, the memory 901 may also store information of a device class.
As can be seen, in the embodiment of the present application, after receiving a push request initiated by a client for a target video streaming device, the server does not make the client request to pull a stream from an edge node in a fixed forwarding cluster, but first detects a push state of the target video streaming device, determines a target forwarding cluster according to the push state, and then sends feedback to the push request to the client according to the target forwarding cluster, so as to instruct the client to pull a video stream pushed by the target video streaming device through the edge node in the determined target forwarding cluster. Through the process, the client side does not keep pulling the video stream to the fixed edge node (namely the forwarding cluster), flexible scheduling of the edge node is realized, and the transmission line of each video stream can be flexibly determined according to the actual situation of the current application scene.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of external device software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the system embodiments described above are merely illustrative, e.g., the division of modules or units described above is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above-described embodiments, or may be implemented by a computer program to instruct associated hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. The computer program comprises computer program code, and the computer program code can be in a source code form, an object code form, an executable file or some intermediate form and the like. The above computer readable storage medium may include: any entity or device capable of carrying the computer program code described above, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer readable Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier wave signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the content of the computer readable storage medium described above may be appropriately increased or decreased according to the requirements of the jurisdiction's legislation and the patent practice, for example, in some jurisdictions, the computer readable storage medium does not include electrical carrier signals and telecommunication signals according to the legislation and the patent practice.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A control method for video streaming, which is applied to a server, comprising:
after receiving a push request initiated by a client for a target video streaming device, detecting a push state of the target video streaming device, wherein the push request is forwarded to the server by a first candidate forwarding cluster, and the first candidate forwarding cluster is: the client caches forwarding clusters with network addresses, wherein each forwarding cluster comprises at least two edge nodes, and the push state is used for indicating whether the target video streaming equipment is pushing;
determining a second candidate forwarding cluster according to the push state;
Detecting whether the second candidate forwarding cluster and the first candidate forwarding cluster are the same or not by comparing network addresses of the second candidate forwarding cluster and the first candidate forwarding cluster;
determining a target forwarding cluster according to the detection result;
and sending feedback of the push request to the client according to the target forwarding cluster, wherein the feedback is used for indicating the client to pull the video stream pushed by the target video stream device through an edge node in the target forwarding cluster.
2. The control method of claim 1, wherein the determining a second candidate forwarding cluster according to the push state comprises:
and under the condition that the push state indicates that the target video streaming equipment is pushing, determining the second candidate forwarding cluster according to a current edge node, wherein the current edge node is: the edge node of the pushing stream of the target video stream equipment;
and under the condition that the push state indicates that the target video streaming equipment is not in push, determining the forwarding cluster searched according to a preset database as the second candidate forwarding cluster, wherein the database comprises: the system comprises a first database and a second database, wherein the first database is used for storing the corresponding relation between video streaming equipment and a forwarding cluster, and the second database is used for storing the corresponding relation between a geographic position and the forwarding cluster.
3. The control method according to claim 2, wherein the updating process of the first database includes:
for each video stream device, when the video stream device is online, acquiring a network address of the video stream device;
determining the geographic position of the video streaming equipment according to the network address of the video streaming equipment;
searching a forwarding cluster corresponding to the geographic position of the video streaming equipment in the second database;
updating the first database according to a forwarding cluster corresponding to the geographic location of the video streaming device.
4. The control method according to claim 1, wherein the preset database of the server includes: the third database is used for storing information of forwarding clusters which cannot be accessed by the client in the past; the determining the target forwarding cluster according to the detection result includes:
determining the first candidate forwarding cluster as the target forwarding cluster under the condition that the second candidate forwarding cluster and the first candidate forwarding cluster are the same;
and determining the target forwarding cluster in the second candidate forwarding cluster and the first candidate forwarding cluster according to the third database under the condition that the second candidate forwarding cluster and the first candidate forwarding cluster are different.
5. The control method of claim 4, wherein the determining the target forwarding cluster from the third database among the second candidate forwarding cluster and the first candidate forwarding cluster includes:
predicting whether the client can access the second candidate forwarding cluster according to the third database;
determining the first candidate forwarding cluster as the target forwarding cluster under the condition that the prediction result indicates that the client cannot access the second candidate forwarding cluster;
and determining the second candidate forwarding cluster as the target forwarding cluster in the condition that the prediction result indicates that the client can access the second candidate forwarding cluster.
6. The control method of claim 5, wherein the push request further carries information of a first edge node, wherein the first edge node is in the first candidate forwarding cluster, and the first edge node is allocated by the first candidate forwarding cluster; after the determining the target forwarding cluster, the control method further includes:
when the push state indicates that the target video streaming equipment is pushing, the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the prediction result indicates that the client cannot access the second candidate forwarding cluster, feeding back information of the first edge node to the second candidate forwarding cluster so as to indicate the second candidate forwarding cluster to forward the received video streaming pushed by the target video streaming equipment to the first edge node;
When the push state indicates that the target video streaming equipment is not pushing, the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the prediction result indicates that the client cannot access the second candidate forwarding cluster; or if the push state indicates that the target video streaming equipment is not pushing, and the second candidate forwarding cluster and the first candidate forwarding cluster are the same, feeding back the information of the first edge node to the target video streaming equipment so as to indicate that the target video streaming equipment pushes the target video streaming equipment to the first edge node;
and feeding back information of a second edge node to the target video streaming equipment to indicate that the target video streaming equipment pushes the stream to the second edge node under the condition that the pushing state indicates that the target video streaming equipment is not pushing, the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the prediction result indicates that the client can access the second candidate forwarding cluster, wherein the second edge node is distributed by the second candidate forwarding cluster in the second candidate forwarding cluster.
7. The control method according to claim 5, wherein in a case where the push status indicates that the target video streaming device is not pushing, and the second candidate forwarding cluster and the first candidate forwarding cluster are different, and the prediction result indicates that the client can access the second candidate forwarding cluster, the feedback is further used to instruct the client to update the network address of the cached forwarding cluster according to the target forwarding cluster.
8. A control device for video streaming, which is applied to a server, comprising:
the detection module is used for detecting the push state of the target video streaming equipment after receiving a push request initiated by a client for the target video streaming equipment, wherein the push request is forwarded to the server by a first candidate forwarding cluster, and the first candidate forwarding cluster is: the client caches forwarding clusters with network addresses, wherein each forwarding cluster comprises at least two edge nodes, and the push state is used for indicating whether the target video streaming equipment is pushing;
the determining module is configured to determine, according to the push state, a target forwarding cluster, where each forwarding cluster includes at least two edge nodes, specifically: determining a second candidate forwarding cluster according to the push state; detecting whether the second candidate forwarding cluster and the first candidate forwarding cluster are the same or not by comparing network addresses of the second candidate forwarding cluster and the first candidate forwarding cluster; determining the target forwarding cluster according to the detection result;
And the first feedback module is used for sending feedback of the push request to the client according to the target forwarding cluster, wherein the feedback is used for indicating the client to pull the video stream pushed by the target video stream equipment through an edge node in the target forwarding cluster.
9. A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 7.
CN202210738295.7A 2022-06-27 2022-06-27 Control method, device, server and storage medium for video stream transmission Active CN115174569B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210738295.7A CN115174569B (en) 2022-06-27 2022-06-27 Control method, device, server and storage medium for video stream transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210738295.7A CN115174569B (en) 2022-06-27 2022-06-27 Control method, device, server and storage medium for video stream transmission

Publications (2)

Publication Number Publication Date
CN115174569A CN115174569A (en) 2022-10-11
CN115174569B true CN115174569B (en) 2024-03-19

Family

ID=83487864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210738295.7A Active CN115174569B (en) 2022-06-27 2022-06-27 Control method, device, server and storage medium for video stream transmission

Country Status (1)

Country Link
CN (1) CN115174569B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453328A (en) * 2016-10-18 2017-02-22 乐视控股(北京)有限公司 Publishing method for live broadcast video file, publishing client and edge streaming media server
CN108737405A (en) * 2018-05-10 2018-11-02 网宿科技股份有限公司 A kind of method, CCL servers and system carrying out water conservancy diversion to live video stream
CN110213522A (en) * 2019-05-27 2019-09-06 腾讯科技(深圳)有限公司 A kind of video data handling procedure, device and relevant device
CN110677610A (en) * 2019-10-08 2020-01-10 Oppo广东移动通信有限公司 Video stream control method, video stream control device and electronic equipment
CN111355731A (en) * 2020-02-28 2020-06-30 北京奇艺世纪科技有限公司 Resource access method, device, resource access system, equipment and storage medium
CN111818121A (en) * 2020-05-26 2020-10-23 杭州爱教乐学科技有限公司 Live broadcast communication method and device, computer equipment and storage medium
WO2020253266A1 (en) * 2019-06-15 2020-12-24 华为技术有限公司 Method for providing edge service, apparatus and device
CN112261418A (en) * 2020-09-18 2021-01-22 网宿科技股份有限公司 Method for transmitting live video data and live broadcast acceleration system
CN112737897A (en) * 2021-04-06 2021-04-30 北京百家视联科技有限公司 Link monitoring and scheduling method, device, equipment and storage medium
CN112769919A (en) * 2020-12-30 2021-05-07 北京大米科技有限公司 Push flow task distribution method and device, storage medium and electronic equipment
CN113141317A (en) * 2021-03-05 2021-07-20 西安电子科技大学 Streaming media server load balancing method, system, computer equipment and terminal
WO2021143479A1 (en) * 2020-01-17 2021-07-22 北京达佳互联信息技术有限公司 Media stream transmission method and system
CN113926185A (en) * 2021-10-14 2022-01-14 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium
CN114051146A (en) * 2021-11-09 2022-02-15 上海哔哩哔哩科技有限公司 Method and system for preventing repeated plug flow
CN114071168A (en) * 2021-11-16 2022-02-18 上海哔哩哔哩科技有限公司 Mixed-flow direct-broadcast stream scheduling method and device
CN114363651A (en) * 2022-01-04 2022-04-15 上海哔哩哔哩科技有限公司 Live stream processing method and device
WO2022087920A1 (en) * 2020-10-28 2022-05-05 百果园技术(新加坡)有限公司 Video playing method and apparatus, and terminal and storage medium
CN114615237A (en) * 2022-03-22 2022-06-10 阿里巴巴(中国)有限公司 Streaming media communication method, system, device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712343A (en) * 2018-05-14 2018-10-26 网宿科技股份有限公司 Distribution method, system, fringe node and the central dispatching system of streaming media resource

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453328A (en) * 2016-10-18 2017-02-22 乐视控股(北京)有限公司 Publishing method for live broadcast video file, publishing client and edge streaming media server
CN108737405A (en) * 2018-05-10 2018-11-02 网宿科技股份有限公司 A kind of method, CCL servers and system carrying out water conservancy diversion to live video stream
CN110213522A (en) * 2019-05-27 2019-09-06 腾讯科技(深圳)有限公司 A kind of video data handling procedure, device and relevant device
WO2020253266A1 (en) * 2019-06-15 2020-12-24 华为技术有限公司 Method for providing edge service, apparatus and device
CN110677610A (en) * 2019-10-08 2020-01-10 Oppo广东移动通信有限公司 Video stream control method, video stream control device and electronic equipment
WO2021143479A1 (en) * 2020-01-17 2021-07-22 北京达佳互联信息技术有限公司 Media stream transmission method and system
CN111355731A (en) * 2020-02-28 2020-06-30 北京奇艺世纪科技有限公司 Resource access method, device, resource access system, equipment and storage medium
CN111818121A (en) * 2020-05-26 2020-10-23 杭州爱教乐学科技有限公司 Live broadcast communication method and device, computer equipment and storage medium
CN112261418A (en) * 2020-09-18 2021-01-22 网宿科技股份有限公司 Method for transmitting live video data and live broadcast acceleration system
WO2022087920A1 (en) * 2020-10-28 2022-05-05 百果园技术(新加坡)有限公司 Video playing method and apparatus, and terminal and storage medium
CN112769919A (en) * 2020-12-30 2021-05-07 北京大米科技有限公司 Push flow task distribution method and device, storage medium and electronic equipment
CN113141317A (en) * 2021-03-05 2021-07-20 西安电子科技大学 Streaming media server load balancing method, system, computer equipment and terminal
CN112737897A (en) * 2021-04-06 2021-04-30 北京百家视联科技有限公司 Link monitoring and scheduling method, device, equipment and storage medium
CN113926185A (en) * 2021-10-14 2022-01-14 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium
CN114051146A (en) * 2021-11-09 2022-02-15 上海哔哩哔哩科技有限公司 Method and system for preventing repeated plug flow
CN114071168A (en) * 2021-11-16 2022-02-18 上海哔哩哔哩科技有限公司 Mixed-flow direct-broadcast stream scheduling method and device
CN114363651A (en) * 2022-01-04 2022-04-15 上海哔哩哔哩科技有限公司 Live stream processing method and device
CN114615237A (en) * 2022-03-22 2022-06-10 阿里巴巴(中国)有限公司 Streaming media communication method, system, device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Pushing Intelligence to the Edge with a Stream Processing Architecture";R. Dautov等;《2017 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber》;全文 *
基于MEC的边缘CDN业务调度方案及测试分析;刘云毅;张蕾;张建敏;彭宁;杨峰义;;电子技术应用(06);全文 *

Also Published As

Publication number Publication date
CN115174569A (en) 2022-10-11

Similar Documents

Publication Publication Date Title
US11870871B2 (en) Methods and apparatus for serving content to customer devices based on dynamic content popularity
KR100791628B1 (en) Method for active controlling cache in mobile network system, Recording medium and System thereof
EP2290912A1 (en) Content distributing method, service redirecting method and system, node device
US10691820B1 (en) Real-time distribution of messages via a network with multi-region replication in a hosted service environment
CN113542058B (en) Data source returning method, server and storage medium
CN110324406B (en) Method for acquiring business data and cloud service system
US11496597B2 (en) Methods and apparatuses for content delivery over mobile networks with multi-access edge computing (MEC) control and user plane separation (CUPS)
CN110417595B (en) Business service disaster tolerance method, device, system, management server and electronic equipment
JP2009182629A (en) Data providing system
CN111901240B (en) Route updating method, network acceleration system, server and switch
CN108616896B (en) Operator identification method and device and internet access system
CN102420868A (en) Service providing method, device and system
CN114788246A (en) Method and apparatus for edge computing services
US8423593B2 (en) Content distribution system
CN101924777B (en) Method, system and equipment for searching active nodes in P2P streaming media system
CN111432231A (en) Content scheduling method of edge network, home gateway, system and server
CN115174569B (en) Control method, device, server and storage medium for video stream transmission
CN107395406B (en) Online state data processing method, device and system of online system
CN108632680B (en) Live broadcast content scheduling method, scheduling server and terminal
CN113014672A (en) Message pushing method and device, electronic equipment and storage medium
CN112492030A (en) Data storage method and device, computer equipment and storage medium
US8949366B2 (en) System, a method, and a computer program product for computer communication
CN115103008B (en) Service request forwarding system
CN109644160B (en) Hybrid method for name resolution and producer selection in ICN by classification
CN113992633B (en) Request processing method, network node and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant