CN115174569A - Control method, device, server and storage medium for video streaming transmission - Google Patents
Control method, device, server and storage medium for video streaming transmission Download PDFInfo
- Publication number
- CN115174569A CN115174569A CN202210738295.7A CN202210738295A CN115174569A CN 115174569 A CN115174569 A CN 115174569A CN 202210738295 A CN202210738295 A CN 202210738295A CN 115174569 A CN115174569 A CN 115174569A
- Authority
- CN
- China
- Prior art keywords
- forwarding cluster
- cluster
- target
- client
- candidate
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 230000005540 biological transmission Effects 0.000 title abstract description 24
- 230000008569 process Effects 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 17
- 238000001514 detection method Methods 0.000 claims description 4
- 230000003993 interaction Effects 0.000 description 17
- 238000010586 diagram Methods 0.000 description 10
- 235000014510 cooky Nutrition 0.000 description 8
- 230000002159 abnormal effect Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000004069 differentiation Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1021—Server 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 of video streaming, a control device of video streaming, a server and a computer readable storage medium. The control method is applied to the server and comprises the following steps: after receiving a stream pushing request initiated by a client aiming at a target video stream device, detecting the stream pushing state of the target video stream device; determining target forwarding clusters according to the flow pushing state, wherein each forwarding cluster comprises at least two edge nodes; and sending feedback to the stream pushing 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. By the scheme, the scheduling flexibility of the edge nodes during video stream transmission can be improved, and flexible switching of video stream transmission routes is realized.
Description
Technical Field
The present application relates to the field of live broadcast and on-demand technologies, and in particular, to a method for controlling video streaming, a device for controlling video streaming, a server, and a computer-readable storage medium.
Background
When a user remotely requests to look up 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 broadcast or on-demand of the video stream is realized. Currently, an edge node (also called an edge host) is applied in the field, and a client and a camera are accessed to the edge node, so that the effects of reducing network delay and improving user experience are achieved. However, after the current edge node is distributed, the transmission line of the video stream is fixed immediately, and it is difficult to switch the transmission line afterwards. That is, when video streaming is currently performed, the scheduling flexibility of the edge node still needs to be improved.
Disclosure of Invention
The application provides a control method, a control device, a server and a computer readable storage medium for video stream transmission, which can improve the scheduling flexibility of edge nodes during video stream transmission and realize the flexible switching of video stream transmission routes.
In a first aspect, the present application provides a method for controlling video streaming, which is applied to a server and includes:
after receiving a stream pushing request initiated by a client aiming at a target video stream device, detecting the stream pushing state of the target video stream device;
determining target forwarding clusters according to the flow pushing state, wherein each forwarding cluster comprises at least two edge nodes;
and sending feedback of the stream pushing 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 apparatus for video streaming, which is applied to a server, and includes:
the detection module is used for detecting the stream pushing state of the target video stream equipment after receiving a stream pushing request initiated by a client aiming at the target video stream equipment;
the determining module is used for determining target forwarding clusters according to the flow pushing state, wherein each forwarding cluster comprises at least two edge nodes;
and the first feedback module is used for sending feedback of the stream pushing 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 equipment through an 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, wherein the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect as 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, performs the steps of the method of the first aspect as described above.
Compared with the prior art, the application has the beneficial effects that: after receiving a stream pushing request initiated by a client for a target video stream device, a server does not allow the client to request a stream pulling from an edge node in a fixed certain forwarding cluster, but first detects a stream pushing state of the target video stream device, determines the target forwarding cluster according to the stream pushing state, and then sends feedback of the stream pushing 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 stream device through the edge node in the determined target forwarding cluster. Through the process, the client does not keep pulling the video stream to the edge node in the fixed forwarding cluster any more, flexible scheduling of the edge node is realized, and a transmission line of the video stream each time can be flexibly determined according to the actual situation of the current application scene.
It is to be understood that, for the beneficial effects of the second aspect to the fifth aspect, reference may be made to the relevant description in the first aspect, and details are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating an implementation of a control method for video streaming according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a first possible interaction provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a second possible interaction provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a third possible interaction provided by an embodiment of the present application;
FIG. 5 is a diagram illustrating a fourth possible interaction provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of a fifth possible interaction provided by an embodiment of the present application;
FIG. 7 is a diagram illustrating a sixth possible interaction 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 structures, 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 explain the technical solution proposed in the present application, the following description will be given by way of specific examples.
The following is a description of a control method for video streaming proposed in the embodiments of the present application. The control method is applied to the server. The server, the video streaming equipment, the client and the forwarding clusters form a control system for video streaming 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, for different edge nodes in the same forwarding cluster, differentiation may be achieved through cookies.
For example only, the video streaming device may be a device that can transmit video streams, such as a network Camera (IP Camera, IPC), a smart phone, or a tablet computer; moreover, the video stream transmitted by the video streaming 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 types of the video streaming devices and the types of the video streams.
It can be understood that, the embodiments of the present application do not limit the number of the video streaming devices, the clients, and the 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 above proposed control system for video streaming, the following describes a control method for video streaming proposed in the embodiments of the present application. Referring to fig. 1, the control method includes:
The client may initiate a push streaming request for the video streaming device to which it is accessing, which may be denoted as a target video streaming device for convenience of subsequent description. It is understood that the stream pushing request carries the identification information of the target video streaming device. For example only, the identification information may be a Media Access Control (MAC) address, a serial number, or other information capable of uniquely identifying the target video streaming device, and is not limited herein. After receiving the stream pushing request, the server may detect a stream pushing state of the target video stream device, where the stream pushing state is used to indicate whether the target video stream device is currently performing stream pushing.
And 102, determining a target forwarding cluster according to the flow pushing state.
The server can determine the target forwarding cluster by adopting different cluster determination strategies according to the obtained stream pushing state of the target video stream device. Wherein the target forwarding cluster refers to: the server determines a forwarding cluster which can be used for pulling the stream by the client for the client at this time.
And 103, sending feedback to the plug flow request to the client according to the target forwarding cluster.
It is understood that the 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 allocated by the target forwarding cluster.
In an application scenario, a network address of a forwarding cluster is cached locally at a client, and for convenience of subsequent description, the forwarding cluster with the network address cached locally at the client may be denoted as a first candidate forwarding cluster. In this application scenario, the client forwards, to the server, a push flow request initiated by the target video streaming device through the first candidate forwarding cluster, where a sending process of the push flow request is described in detail as follows: the client sends the flow pushing request to the first candidate forwarding cluster; the first candidate forwarding cluster allocates an edge node (referred to as a first edge node) to the client, and forwards the push flow request carrying 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 flow pushing state.
When the stream pushing state indicates that the target video stream device is pushing the stream, the server may determine a second candidate forwarding cluster according to the current edge node, specifically: and determining the forwarding cluster (which can be referred to as the current push flow cluster) where the current edge node is positioned as a second candidate forwarding cluster. Wherein the current edge node is: the target video streaming device is pushing the edge node of the stream.
For example only, assuming the stream push status indicates that the target video streaming device is pushing a stream, and the current edge node is A1, which current edge node A1 is in forwarding cluster a, then forwarding cluster a may be determined to be a second candidate forwarding cluster.
Under the condition that the stream pushing state indicates that the target video stream device is not in stream 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) found 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 search the first database for a forwarding cluster corresponding to the target video streaming device, and determine the searched forwarding cluster as a second candidate forwarding cluster.
For example only, the first database may be as shown in table 1 below:
video streaming apparatus | Forwarding cluster |
Camera1 | A |
Camera2 | B |
…… | …… |
TABLE 1
The video streaming devices Camera1, camera2 and the like can be specifically represented by the identification information thereof; the forwarding clusters a and B, etc. may be specifically represented by their network addresses.
In consideration of the situation that the network to which the video streaming device is connected is changed due to the fact that the video streaming device is moved by a user, the first database can be updated and maintained according to a second database, and the second database is used for storing the corresponding relation between the geographic position and the forwarding cluster. The update process of the first database is briefly described as follows:
a1, aiming at each video streaming device, when the video streaming device is on line, acquiring a network address of the video streaming device.
After the video streaming device is online, the server can maintain long connection with the video streaming device; based on the method, the server can judge the online and offline of each video streaming device according to the long connection condition. When any video streaming device is judged to be online, the network address used by the current online of the video streaming device can be obtained.
In some embodiments, if the network to which the video streaming device is connected is not changed, the forwarding cluster corresponding to the video streaming device is not changed in general. Based on the method, 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 firstly judge whether the network address used by the current online of the video streaming equipment is the same as the network address used by the previous online; if the first database is the same as the second database, the first database does not need to be updated; if the network addresses are different, or if the network addresses used by the video streaming equipment for the previous online do not exist (that is, the video streaming equipment is online for the first time), the subsequent steps can be performed to update the first database.
And A2, determining the geographic position of the video streaming equipment according to the network address of the video streaming equipment.
By the home location query operation of the network address of the video streaming device, the server can determine the current geographical location 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 place or longitude and latitude, but refers to an approximate location of a geographic area, such as a city of a province.
In some embodiments, if the network to which the video streaming device is connected is changed, but the geographic location of the network is not changed, the forwarding cluster corresponding to the video streaming device is not changed in general. Based on the method, the server can record the geographical position of the video streaming equipment on line each time; on the basis, the server can also judge whether the current online geographic position of the video streaming equipment is the same as the previous online geographic position; if the first database is the same as the second database, the first database does not need to be updated; if the two databases are different from each other, or if the geographical location where the video streaming device was last online does not exist (that is, the video streaming device was online for the first time), the subsequent steps are required to be performed to update the first database.
And A3, searching a forwarding cluster corresponding to the geographic position of the video streaming equipment in a second database.
For example only, the second database may be as shown in table 2 below:
geographic location | Forwarding cluster |
C1 city of P1 province | A |
C2 city in P1 province | 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 clusters corresponding to the geographic positions of the video streaming devices.
After the server finds the forwarding cluster corresponding to the geographical position of the video streaming device in the second database, the server can update the first database according to the found forwarding cluster. Wherein, when the video streaming device is online for the first time, the updating operation specifically includes: and in the first database, newly adding the corresponding relation between the video streaming equipment and the searched forwarding cluster. In the case that the video streaming device is not online for the first time, the updating operation specifically includes: in the first database, the originally recorded corresponding relationship between the video streaming equipment and the forwarding cluster is replaced by the corresponding relationship between the video streaming equipment and the forwarding cluster searched this time.
By way of example only, the following is described in conjunction with tables 1 and 2: the forwarding cluster corresponding to Camera1 is originally a. Assuming that the user moves and the geographic location of Camera1 is changed from C1 city, P1 province, to C2 city, C1 province, the server may update the first database through the above steps after Camera1 comes online. The updated first database may be as shown in table 3 below:
video streaming apparatus | Forwarding cluster |
Camera1 | B |
Camera2 | B |
…… | …… |
TABLE 3
Step 1022, determine a target forwarding cluster from the second candidate forwarding cluster and the first candidate forwarding cluster.
It is to be understood that the first candidate forwarding cluster is a forwarding cluster that has been cached by the client, and that is previously allocated by the server for the client; the second candidate forwarding cluster is a forwarding cluster specified by the server according to the stream pushing state of the target video stream device. The server can determine a forwarding cluster more suitable for the current video stream transmission task 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 the same by comparing the network addresses of the two.
And B2, under the condition that the second candidate forwarding cluster is the same as the first candidate forwarding cluster, determining the first candidate forwarding cluster as a target forwarding cluster.
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 flow cluster, and the second candidate forwarding cluster is the same as the first candidate forwarding cluster, 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 also 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 can be understood that, in this case, the target video streaming device is already pushing to the current edge node, and the target video streaming device can be prevented from repeatedly pushing.
Specifically, if the second candidate forwarding cluster is a database cluster, and the second candidate forwarding cluster is the same as the first candidate forwarding cluster, the first forwarding cluster may use a free 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 needs to feed back 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 is understood that in this case, the target video streaming device will push the stream to the first edge node, and the client will pull the stream from the first edge node; that is, the target video stream device and the client are positioned to the same edge node, and the forwarding work of the video stream is realized in the node, so that the fluency of video stream transmission can be guaranteed.
And B3, under the condition that the second candidate forwarding cluster and the first candidate forwarding cluster are different, determining a target forwarding cluster in the second candidate forwarding cluster and the first candidate forwarding cluster according to a third database.
When a client pulls a flow to an edge node across network operators, the flow pulling may fail because the edge node cannot be accessed or is difficult to access due to instability of network services. In order to reduce the occurrence of such a situation, when the second candidate forwarding cluster is different from the first candidate forwarding cluster, the server may select, as the target forwarding cluster, a forwarding cluster that the client can more stably access from among the second candidate forwarding cluster and the first candidate forwarding cluster through the third database.
Generally, whether a client can access 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 made: when the network environment of a client changes, the forwarding clusters that the client cannot or is difficult to access may change accordingly; and forwarding clusters that are inaccessible or difficult to access by different clients in the same network environment are typically kept consistent. Based on the above conclusion, the database of the server may further include: a third database. The third database is used for storing information of forwarding clusters that the client cannot access in the past, and specifically includes: and the client side forwards the information of the cluster which cannot be accessed in the past under different network environments. Since different network environments can usually use network addresses as the differentiation, the third database can actually store: when a client cannot or is difficult to access a certain forwarding cluster, the network address of the client and the network address of the forwarding cluster are in corresponding relation.
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 relationship 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
Since the second candidate forwarding cluster is the forwarding cluster specified by the server according to the stream pushing status 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:
and B31, predicting whether the client can access the second candidate forwarding cluster according to the third database.
The push flow 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 forwarding clusters which cannot be or are difficult to access by the client in the current network environment can be obtained. The server can compare the second candidate forwarding cluster with the found forwarding cluster which cannot be accessed or is difficult to access by the client in the current network environment; if the second candidate forwarding cluster is found to be one of the forwarding clusters which the client cannot or is difficult to access in the past under the current network environment, the client is considered to be likely to still not access the second candidate forwarding cluster at this time; conversely, if the second candidate forwarding cluster is found not to be in the list of forwarding clusters that the client has previously failed or has difficulty accessing in the current network environment, it is considered that the client is likely to be able to access the second candidate forwarding cluster.
And B32, under the condition that the prediction result indicates that the client cannot access the second candidate forwarding cluster, determining the first candidate forwarding cluster as the target forwarding cluster.
It will be appreciated that, since the push flow request is forwarded to the server from the first candidate forwarding cluster, it is generally considered that the client must have access to the first candidate forwarding cluster. Based on this, when the second candidate forwarding cluster cannot be accessed by the prediction client, the server can directly determine the first candidate forwarding cluster as the target forwarding cluster in order to ensure smooth transmission of the video stream.
And B33, under the condition that the prediction result indicates that the client can access the second candidate forwarding cluster, determining the second candidate forwarding cluster as the target forwarding cluster.
Since the second candidate forwarding cluster is substantially higher in priority than the first candidate forwarding cluster, the server may directly determine the second candidate forwarding cluster as the target forwarding cluster when the second candidate forwarding cluster is accessible to the predicted client.
In some embodiments, the server may maintain a third database. For example, the third database may be periodically emptied; or, the entries stored in the third database for a long time may be deleted periodically, and the maintenance manner is not limited here.
It should be noted that, when the client has not attempted to access the second candidate forwarding cluster in the past, there may be a case where the client actually cannot access the second candidate forwarding cluster, but the third database has no record. For this situation, when the client initiates the stream pushing request for the first time and the first candidate forwarding cluster is different from the second candidate forwarding cluster, the server determines that the target forwarding cluster is the second candidate forwarding cluster. The client thus pulls the flow to the target forwarding cluster (i.e., the second candidate forwarding cluster), but fails to pull the flow because it is inaccessible. At this time, the client may report information of failure to access the target forwarding cluster (i.e., the second candidate forwarding cluster) to the server, and re-initiate the flow pushing request. When the server processes the stream pushing request initiated by the client for the second time and the first candidate forwarding cluster and the second candidate forwarding cluster are still not the same, a record that the client cannot access the second candidate forwarding cluster in the current network environment is recorded in the third database, and therefore the target forwarding cluster determined by the server for the client for the second time is the first candidate forwarding cluster. Through the process, smooth transmission of the video stream can still be guaranteed.
Specifically, if the second candidate forwarding cluster is the current push flow cluster, the second candidate forwarding cluster is different from the first candidate forwarding cluster, 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. Moreover, the server may also request the second candidate forwarding cluster to allocate an edge node (i.e., a second edge node) to 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 also 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 can be understood that, in this case, the target video streaming device is already pushing to the second edge node (i.e. the current edge node), and the target video streaming device can be prevented from repeatedly pushing; moreover, the target video streaming device pushes the stream to the second edge node (i.e. the current edge node), and the client pulls the stream from the second edge node (i.e. the current edge node); that is, the target video streaming device and the client are positioned to the same edge node, the forwarding work of the video streaming is realized in the node, and the fluency of video streaming transmission can be guaranteed.
Specifically, if the second candidate forwarding cluster is the current push flow cluster, the second candidate forwarding cluster is different from the first candidate forwarding cluster, 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, at this time, since the target video streaming device is already pushing the stream to the second candidate forwarding cluster, it is necessary to establish a video stream forwarding channel of the second candidate forwarding cluster and the first candidate forwarding cluster, specifically: and 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 received video stream pushed by the target video stream device 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 is understood that in this case, the video streaming route from 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 is different from the first candidate forwarding cluster, 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. Moreover, the server may also request the second candidate forwarding cluster to allocate an edge node (i.e., a second edge node) to 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 can be understood that, in this case, the target video streaming device will push the stream to the second edge node, and the client will pull the stream from the second edge node; that is, the target video stream device and the client are positioned to the same edge node, and the forwarding work of the video stream is realized in the node, so that the fluency of video stream transmission can be guaranteed.
Specifically, if the second candidate forwarding cluster is a database cluster, and the second candidate forwarding cluster is different from the first candidate forwarding cluster, 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 can be understood that in this case, the target video streaming device will push the stream to the first edge node, and the client will pull the stream from the first edge node; that is, the target video stream device and the client are positioned to the same edge node, and the forwarding work of the video stream is realized in the node, so that the fluency of video stream transmission can be guaranteed.
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 record the number of times of each entry; that is, the number of times that the client cannot access a certain forwarding cluster in a certain network environment is recorded. It should be noted that each time the server predicts that the client cannot access the second candidate forwarding cluster, the number of times the corresponding entry is updated. Once the number of times of an entry reaches a preset number 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 streaming device in the first database for which the stream pushing request initiated by the client corresponds, the forwarding cluster corresponding to the video streaming device in the first database may be updated to be the central cluster. Wherein the central cluster is: clustering using Border Gateway Protocol (BGP) networks. It will be appreciated that a client may 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 the cluster may be reduced.
For example only, assume that the forwarding cluster corresponding to the target video streaming device Camera1 in the first database is forwarding cluster a, and its network address 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, the Client1 often cannot access the forwarding cluster a in the conventional network environment. In this way, each time the user requests a video stream of the target video streaming device Camera1 through the Client1, the server updates the corresponding entry in the table 4, 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 entry reaches a preset number threshold N, it indicates that the Client1 has initiated a stream pushing request to the target video streaming device Camera1 at least N times under 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 a situation that cross-cluster transmission frequently occurs when the subsequent Client1 requests the video stream of the target video streaming device Camera1 (that is, the foregoing description describes a scenario that "the second candidate forwarding cluster is the current stream pushing cluster, and the second candidate forwarding cluster is different from the first candidate forwarding cluster, and the server predicts that the Client cannot access the second candidate forwarding cluster").
In some embodiments, in the case that the stream pushing status indicates that the target video streaming device is not in stream pushing, the second candidate forwarding cluster is different from the first candidate forwarding cluster, 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 further be used to instruct the client to update the network address of the cached forwarding cluster according to the target forwarding cluster. In this way, the update of the network address of the forwarding cluster cached by the client can be realized. This process can be understood as: update of 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 erroneously updates the network address of the forwarding cluster cached by the client when the client cannot access the target forwarding cluster, the client may consider updating the network address of the forwarding cluster cached by the client according to the target forwarding cluster after receiving the feedback and successfully pulling the stream from 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 is understood that, through the above description, the present embodiment provides a total of 6 possible cases, and these 6 possible cases can be summarized by the following table 6:
TABLE 6
To facilitate understanding of the above 6 cases, an example of a specific actual scene corresponding to each of the 6 cases is given below by table 7:
TABLE 7
The following further describes the above 6 cases with reference to an interaction 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. The interaction process is briefly described as follows:
1. and the client initiates a stream pushing request aiming at the target video stream equipment through the first candidate forwarding cluster.
2. The first candidate forwarding cluster allocates a first edge node and forwards the push flow request to the server.
3. And the server judges that the target video streaming equipment is not pushed and the first candidate forwarding cluster is the same as the second candidate forwarding cluster, and determines the target forwarding cluster as the first candidate forwarding cluster.
4. The server triggers the target video streaming device to push the stream 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 a flow from a first edge node of the first candidate forwarding cluster.
Therefore, the pull stream of the client and the push stream of the target video streaming device are both positioned to the same edge node (first edge node), the forwarding work of the video stream is realized in the same edge node, and a user can view the video stream pushed by the target video streaming 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 case two is provided. The difference compared to the case one shown in fig. 2 is that:
1. the server needs to apply for the second candidate forwarding cluster (i.e., the database cluster) to assign an edge node (i.e., the second edge node) to the client.
2. And when the server triggers the camera to push the stream, a second edge node is adopted.
3. And the client side realizes the acquisition of the video stream through a second edge node in the second candidate forwarding cluster (namely, the database cluster).
4. The client may update the network address of its cached forwarding cluster.
Therefore, the pull stream of the client and the push stream of the target video stream device are both positioned to the same edge node (second edge node), the forwarding work of the video stream is realized in the same edge node, and a user can view the video stream pushed by the target video stream 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 under the third condition. Since in case three, the speculative client cannot access the second candidate forwarding cluster and the target video streaming device is not in the process of streaming, it may be determined that the target forwarding cluster is the first candidate forwarding cluster, and the overall processing flow is highly similar to that in case one. 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 to be recorded reaches a preset number threshold, may switch the database cluster (i.e., the forwarding cluster corresponding to the target video streaming device recorded by the first database) to the central cluster using the BGP network, so as to avoid frequent cross-cluster transmission operations when the subsequent client requests streaming 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 under the fourth condition. The difference compared to the case one shown in fig. 2 is that: the operation of triggering the target video streaming device to push the stream is omitted (because the target video streaming device is already pushing the stream).
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 case five. The difference compared to the case one shown in fig. 2 is that:
1. the server needs to apply for allocating an edge node (i.e., a second edge node) to the client from the second candidate forwarding cluster (i.e., the current push stream cluster) for the client to pull the 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 a second candidate forwarding cluster (i.e., the current push cluster) to pull according to the received feedback.
It will be appreciated that since the video stream may be temporarily present (e.g., only 10 minutes, subject to traffic self-limitations), the network address of the forwarding cluster cached by the client is not updated this time.
Referring to fig. 7, fig. 7 shows an interaction diagram of the client, the forwarding cluster, the server and the target video streaming device in case six. As can be seen from fig. 7, in this case, the client still pulls from the first edge node of the first candidate forwarding cluster, which is different from the case one shown in fig. 2 in 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 since in this case the client cannot access the second candidate forwarding cluster, the network address of the forwarding cluster cached by the client is not updated this time. However, the fact that the client is unable to access the second candidate forwarding cluster in this case has an effect on the number of times the third database is inaccessible.
It should be noted that, in the interaction processes shown in fig. 2 to fig. 7, some steps (for example, a step that the target forwarding cluster feeds back the pulled stream of the client to the server after pulling the stream of the client, etc.) are omitted, and only some steps that are highly relevant to the embodiment of the present application are shown.
Based on the above-described determination process of the target forwarding cluster, the stream pulling operation of the client and the stream pushing operation of the target video stream device in an ideal state can be positioned to the same edge node as much as possible; and 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, which makes the transmission of the video stream smoother.
In another application scenario, the client does not locally cache the network address of any forwarding cluster, that is, there is no first candidate forwarding cluster. In this application scenario, the embodiment of the present application provides the following two possible interaction manners of the client and the server, and the client and the server may implement the determination of the target forwarding cluster by using any one of the interaction manners:
the first mode is as follows: and the client directly initiates a cluster allocation request to the server aiming at the target video streaming equipment. After receiving a cluster allocation request initiated by a client aiming at a target video streaming device, a server allocates a corresponding forwarding cluster for the client according to a database and the target video streaming device, and feeds back a network address of the forwarding cluster to the client. So far, the network address of the forwarding cluster is cached locally at the client, that is, for the client and the target video streaming device, the transition from no first candidate forwarding cluster to the first candidate forwarding cluster is completed. Thereafter, the target forwarding cluster may be determined with reference to the previous application scenario described above, and will not be described herein again.
The implementation process of allocating the corresponding forwarding cluster to the client according to the database and the target video streaming device is briefly described as follows: and searching whether a forwarding cluster corresponding to the target video streaming device is recorded in the first database. And if the record exists, distributing the forwarding cluster corresponding to the target video streaming device recorded by the first database to the client. If the record is not recorded, determining the geographical position of the target video streaming equipment according to the network address of the target video streaming equipment (the network address used by the target video streaming equipment for the current online when the target video streaming equipment is online; and the network address used by the target video streaming equipment for the previous online when the target video streaming equipment is not online), searching the corresponding forwarding cluster in the second database according to the geographical position and allocating the forwarding cluster to the client, and updating the first database according to the searched result.
The second mode is as follows: the client directly initiates a stream pushing request to the server aiming at the target video stream equipment. And after receiving a stream pushing request initiated by the client aiming at the target video stream equipment, the server acquires the stream pushing state of the target video stream equipment. Under the condition that the stream pushing state of the target video stream equipment indicates that the target video stream equipment is pushing streams, directly determining a forwarding cluster (namely the current stream pushing cluster) where the current edge node is located as a target forwarding cluster; otherwise, when the stream pushing state of the target video stream device indicates that the target video stream device is not in stream pushing, the target forwarding cluster is determined according to the database and the target video stream device, and the implementation process of the method is similar to the implementation process of "allocating a corresponding forwarding cluster to the client according to the database and the target video stream device" described in the first mode, and is not described again here. It can be understood that, in this manner, the first candidate forwarding cluster does not actually exist, and the server may directly determine the determined second candidate forwarding cluster as the target forwarding cluster, which is not described herein again.
In some embodiments, if the client does not have access to the target forwarding cluster determined in this way, the target forwarding cluster may be updated to a central cluster using a BGP network, as embodied by: under the condition that the stream pushing state of the target video stream device indicates that the target video stream device is pushing the stream, the server can control a forwarding cluster (namely, the current stream pushing 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 (namely, a central cluster), so that the client can pull the stream through the updated target forwarding cluster (namely, the central cluster); under the condition that the stream pushing state of the target video stream device indicates that the target video stream device is not in stream pushing, the server can control the target video stream device to push the stream to the updated target forwarding cluster (namely, the central cluster), so that the client can pull the stream through the updated target forwarding cluster (namely, the central cluster).
In some embodiments, when a client accesses a server or a forwarding cluster, an anomaly due to a network cause or an anomaly due to a server failure may occur. Especially, when the forwarding cluster uses network services provided by three network operators, namely telecom, mobile or internet, and the client uses network services provided by other small network operators (such as great wall), the phenomenon of network connection failure is more likely to occur. In this regard, the embodiments of the present application summarize several possible abnormal scenarios as follows:
an abnormal scene I: a user fails or has an error in accessing the first candidate forwarding cluster;
and (2) abnormal scene two: the first candidate forwarding cluster failed or is in error with respect to accessing the server;
an abnormal scene three: a user failure or error in accessing the server;
and (4) an abnormal scene four: the target video streaming device fails to access the target forwarding cluster.
For the exception scenario one, the exception handling process that can be adopted 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 to the client;
4. the user caches the network address of the new first candidate forwarding cluster, and initiates a flow pushing request through the new first candidate forwarding cluster again, which may refer to the foregoing description, and is not described herein again.
For the exception scenario two, the exception handling operations that may be employed are as follows:
although the first candidate forwarding cluster is out of contact with the server, the target video streaming device push stream still needs to be triggered. At this time, it cannot be determined whether the network connection between the first candidate forwarding cluster and the server is faulty or the server itself is faulty, so that the client can be controlled to directly access the standby server to trigger stream pushing of the target video stream device. In order to stabilize the flow in each forwarding cluster and avoid service avalanche caused by the fact that a large flow rushes into other forwarding clusters, the network address of the forwarding cluster cached by the client is not changed (i.e. the first candidate forwarding cluster is not changed) in the abnormal scene.
For exception scenario three, the exception handling operations that may be employed are as follows:
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 distribute the stream pushing request to each forwarding cluster so as to realize the stream pushing of the target video stream equipment. The standby server may maintain a node list, where the node list records state information of edge nodes of each forwarding cluster. The equipartition algorithm used by the standby server may be: polling or weighted polling.
For exception scenario four, the exception handling operations that may be employed are as follows:
considering that the geographic position of the video streaming equipment generally does not change, the server can determine other forwarding clusters as new target forwarding clusters and trigger the target video streaming equipment to carry out stream pushing to the new target forwarding clusters when the server determines that the target video streaming equipment cannot push streams to the target forwarding clusters; accordingly, the server also informs the client to adopt the new target forwarding cluster for pulling.
As can be seen from the above, in the embodiment of the present application, after receiving a stream pushing request initiated by a client for a target video stream device, a server does not allow the client to request a stream pulling request to an edge node in a fixed certain forwarding cluster, but detects a stream pushing state of the target video stream device, determines a target forwarding cluster according to the stream pushing state, and then sends a feedback of the stream pushing request to the client according to the target forwarding cluster to instruct the client to pull a video stream pushed by the target video stream device through the edge node in the target forwarding cluster determined this time. Through the process, the client does not keep pulling the video stream to the edge node in the fixed forwarding cluster any more, flexible scheduling of the edge node is realized, and a transmission line of the video stream each time can be flexibly determined according to the actual situation of the current application scene.
Corresponding to the video streaming control method provided above, the embodiment of the present application further provides a video streaming control device. As shown in fig. 8, the control device 800 includes:
the detection module 801 is configured to detect a stream pushing state of a target video stream device after receiving a stream pushing request initiated by a client for the target video stream device;
a determining module 802, configured to determine target forwarding clusters according to a push flow state, where each forwarding cluster includes at least two edge nodes;
the first feedback module 803 is configured to send a feedback of the stream pushing request to the client according to the target forwarding cluster, where the feedback is 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.
In some embodiments, the flow-pushing request is forwarded to the server by a first candidate forwarding cluster, wherein the first candidate forwarding cluster is: the client caches the forwarding clusters with the network addresses; a determination module 802, comprising:
a first determining unit, configured to determine a second candidate forwarding cluster according to the flow pushing state;
and a second determining unit, configured to determine the target forwarding cluster from 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 a current edge node, a second candidate forwarding cluster when the stream pushing status indicates that the target video streaming device is pushing a stream, where the current edge node is: the target video streaming device is pushing the edge node of the stream; and under the condition that the stream pushing state indicates that the target video stream equipment is not in stream pushing, 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:
aiming at each video streaming device, when the video streaming device is on line, acquiring a network address of the video streaming 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 a second database;
the first database is updated according to the forwarding clusters corresponding to the geographical location of the video streaming device.
In some embodiments, the pre-provisioned database of the server includes: the third database is used for storing the information of the forwarding clusters which cannot be accessed by the clients in the past; a second determination unit comprising:
a detecting 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 a second determining subunit, configured to determine, according to the third database, a target forwarding cluster from among 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 includes:
a predicting subunit, configured to predict, according to the third database, whether the client can access the second candidate forwarding cluster;
the target forwarding cluster determining subunit is configured to determine, as the target forwarding cluster, the first candidate 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 under the condition that the prediction result indicates that the client can access the second candidate forwarding cluster.
In some embodiments, the flow pushing request further carries information of a first edge node, where the first edge node is in a 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 information of the first edge node to the second candidate forwarding cluster under the condition that the stream pushing state indicates that the target video stream equipment is in stream pushing, the second candidate forwarding cluster is different from the first candidate forwarding cluster, and the prediction result indicates that the client cannot access the second candidate forwarding cluster, so as to indicate the second candidate forwarding cluster to forward the received video stream pushed by the target video stream equipment to the first edge node;
the third feedback module is used for indicating that the target video streaming device is not in the stream pushing state, the second candidate forwarding cluster is different from the first candidate forwarding cluster, and the prediction result indicates that the client cannot access the second candidate forwarding cluster; or, under the condition that the stream pushing state indicates that the target video stream device is not in stream pushing and the second candidate forwarding cluster and the first candidate forwarding cluster are the same, feeding back information of the first edge node to the target video stream device to indicate that the target video stream device pushes the stream to the first edge node;
and the fourth feedback module is configured to, when the stream pushing state indicates that the target video stream device is not in stream pushing, the second candidate forwarding cluster is different from the first candidate forwarding cluster, and the prediction result indicates that the client can access the second candidate forwarding cluster, feed back information of a second edge node to the target video stream device to indicate that the target video stream device pushes a stream to the second edge node, where the second edge node is in the second candidate forwarding cluster and the second edge node is allocated by the second candidate forwarding cluster.
In some embodiments, in the case that the stream pushing status indicates that the target video streaming device is not in stream pushing, the second candidate forwarding cluster is different from the first candidate forwarding cluster, 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 instruct the client to update the network address of the cached forwarding cluster according to the target forwarding cluster.
As can be seen from the above, in the embodiment of the present application, after receiving a stream pushing request initiated by a client for a target video stream device, a server does not allow the client to request a stream pulling request to an edge node in a fixed certain forwarding cluster, but first detects a stream pushing state of the target video stream device, determines the target forwarding cluster according to the stream pushing state, and then sends a feedback of the stream pushing 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 stream device through the edge node in the target forwarding cluster determined this time. Through the process, the client does not keep pulling the video stream to the edge node in the fixed forwarding cluster any more, flexible scheduling of the edge node is realized, and a transmission line of the video stream each time can be flexibly determined according to the actual situation of the current application scene.
Corresponding to the control method for video streaming provided above, an embodiment of the present application further provides a server. Referring to fig. 9, the server 9 in the embodiment of the present application includes: a memory 901, one or more processors 902 (only one shown in fig. 9) and computer programs stored on the memory 901 and operable on the processors 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, so as to acquire resources corresponding to the preset events. Specifically, the processor 902, when executing the computer program, implements the steps in any of the respective control method embodiments applied to the server described above.
It should be understood that in the embodiments of the present Application, the Processor 902 may be a Central Processing Unit (CPU), and the Processor may be other general-purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
As can be seen from the above, in the embodiment of the present application, after receiving a stream pushing request initiated by a client for a target video stream device, a server does not enable the client to request a stream pulling request to an edge node in a fixed certain forwarding cluster, but detects a stream pushing state of the target video stream device, determines the target forwarding cluster according to the stream pushing state, and then sends a feedback of the stream pushing 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 stream device through the edge node in the target forwarding cluster determined this time. Through the process, the client does not keep pulling the video stream to the fixed edge node (namely, the forwarding cluster), the flexible scheduling of the edge node is realized, and the transmission line of the video stream at each time 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-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of 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 processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any embodiment.
Those of ordinary skill in the art would 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 implementation. 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 ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the above-described modules or units is only one logical functional division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by the present application, and the computer program can also be executed by associated hardware, and the computer program can be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above can be realized. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the above-described computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer readable Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable storage medium may contain other contents which can be appropriately increased or decreased according to the requirements of the legislation and the patent practice in the jurisdiction, for example, in some jurisdictions, the computer readable storage medium does not include an electrical carrier signal and a telecommunication signal according to the legislation and the patent practice.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.
Claims (11)
1. A control method for video streaming is applied to a server, and comprises the following steps:
after receiving a stream pushing request initiated by a client aiming at a target video stream device, detecting the stream pushing state of the target video stream device;
determining target forwarding clusters according to the flow pushing state, wherein each forwarding cluster comprises at least two edge nodes;
and sending feedback of the stream pushing 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.
2. The control method of claim 1, wherein the push flow request is forwarded to the server by a first candidate forwarding cluster, wherein the first candidate forwarding cluster is: the client caches a forwarding cluster of a network address; the determining a target forwarding cluster according to the flow pushing state includes:
determining a second candidate forwarding cluster according to the flow pushing state;
determining the target forwarding cluster among the second candidate forwarding cluster and the first candidate forwarding cluster.
3. The control method of claim 2, wherein said determining a second candidate forwarding cluster based on the push flow state comprises:
determining the second candidate forwarding cluster according to a current edge node under the condition that the stream pushing state indicates that the target video stream device is pushing streams, wherein the current edge node is: the target video streaming device is pushing an edge node of a stream;
and determining the second candidate forwarding cluster according to a preset database under the condition that the stream pushing state indicates that the target video stream device is not in stream pushing.
4. The control method according to claim 3, wherein the database includes: 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 streaming device, acquiring a network address of the video streaming device when the video streaming device is online;
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 the forwarding cluster corresponding to the geographic location of the video streaming device.
5. The control method of claim 2, wherein the preset database of the server comprises: a third database, configured to store information of forwarding clusters that cannot be accessed by a client in the past; said determining the target forwarding cluster among the second candidate forwarding cluster and the first candidate forwarding cluster comprises:
detecting whether the second candidate forwarding cluster and the first candidate forwarding cluster are the same;
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 under the condition that the second candidate forwarding cluster and the first candidate forwarding cluster are different, determining the target forwarding cluster in the second candidate forwarding cluster and the first candidate forwarding cluster according to the third database.
6. The method of claim 5, wherein determining the target forwarding cluster among the second candidate forwarding cluster and the first candidate forwarding cluster according to the third database comprises:
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 if the prediction result indicates that the client cannot access the second candidate forwarding cluster;
determining the second candidate forwarding cluster as the target forwarding cluster if the prediction result indicates that the client has access to the second candidate forwarding cluster.
7. The control method according to claim 6, wherein the flow pushing 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 stream pushing state indicates that the target video stream device is pushing stream, the second candidate forwarding cluster is different from the first candidate forwarding cluster, 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 to indicate the second candidate forwarding cluster to forward the received video stream pushed by the target video stream device to the first edge node;
when the stream pushing state indicates that the target video stream device is not in stream pushing, the second candidate forwarding cluster is different from the first candidate forwarding cluster, and the prediction result indicates that the client cannot access the second candidate forwarding cluster; or, when the stream pushing state indicates that the target video stream device is not in stream pushing and the second candidate forwarding cluster and the first candidate forwarding cluster are the same, feeding back information of the first edge node to the target video stream device to indicate that the target video stream device pushes the stream to the first edge node;
and when the stream pushing state indicates that the target video stream device is not in stream pushing, the second candidate forwarding cluster is different from the first candidate forwarding cluster, and the prediction result indicates that the client can access the second candidate forwarding cluster, feeding back information of a second edge node to the target video stream device to indicate that the target video stream device pushes streams to the second edge node, wherein the second edge node is in the second candidate forwarding cluster, and the second edge node is allocated by the second candidate forwarding cluster.
8. The method of claim 6, wherein in the case that the stream pushing status indicates that the target video streaming device is not pushing, and the second candidate forwarding cluster is different from the first candidate forwarding cluster, 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.
9. A control device for video streaming, which is applied to a server, comprises:
the system comprises a detection module, a streaming module and a streaming module, wherein the detection module is used for detecting the streaming state of a target video streaming device after receiving a streaming pushing request initiated by a client aiming at the target video streaming device;
a determining module, configured to determine target forwarding clusters according to the flow pushing state, where each forwarding cluster includes at least two edge nodes;
and the first feedback module is used for sending feedback of the stream pushing 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.
10. 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 8 when executing the computer program.
11. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 8.
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 true CN115174569A (en) | 2022-10-11 |
CN115174569B 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 (19)
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 |
US20210368239A1 (en) * | 2018-05-14 | 2021-11-25 | Wangsu Science & Technology Co., Ltd. | Distributing method, system, edge node, and central scheduling system for streaming media resource |
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 |
-
2022
- 2022-06-27 CN CN202210738295.7A patent/CN115174569B/en active Active
Patent Citations (19)
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 |
US20210368239A1 (en) * | 2018-05-14 | 2021-11-25 | Wangsu Science & Technology Co., Ltd. | Distributing method, system, edge node, and central scheduling system for streaming media resource |
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)
Title |
---|
R. DAUTOV等: ""Pushing Intelligence to the Edge with a Stream Processing Architecture"", 《2017 IEEE INTERNATIONAL CONFERENCE ON INTERNET OF THINGS (ITHINGS) AND IEEE GREEN COMPUTING AND COMMUNICATIONS (GREENCOM) AND IEEE CYBER》 * |
刘云毅;张蕾;张建敏;彭宁;杨峰义;: "基于MEC的边缘CDN业务调度方案及测试分析", 电子技术应用, no. 06 * |
Also Published As
Publication number | Publication date |
---|---|
CN115174569B (en) | 2024-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11870871B2 (en) | Methods and apparatus for serving content to customer devices based on dynamic content popularity | |
US11134134B2 (en) | Routing for origin-facing points of presence | |
US7890463B2 (en) | Apparatus and method for a distributed storage global database | |
US9692849B2 (en) | Method and node entity for enhancing content delivery network | |
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 | |
CN111464611A (en) | Method for efficiently accessing service between fixed cloud and edge node in dynamic complex scene | |
US10326854B2 (en) | Method and apparatus for data caching in a communications network | |
CN110324406B (en) | Method for acquiring business data and cloud service system | |
CN105512279A (en) | Metadata access method, related equipment and system | |
CN112214377B (en) | Equipment management method and system | |
CN111045813A (en) | Task distribution system and method | |
CN108616896B (en) | Operator identification method and device and internet access system | |
US10705978B2 (en) | Asynchronous tracking for high-frequency and high-volume storage | |
US8423593B2 (en) | Content distribution system | |
JPWO2011024930A1 (en) | Content distribution system, content distribution method, and content distribution program | |
CN115174569B (en) | Control method, device, server and storage medium for video stream transmission | |
CN113791733B (en) | Information storage method, device, equipment and storage medium | |
WO2018090315A1 (en) | Data request processing method and cache system | |
JP2002259197A (en) | Active contents cache control system, active contents cache controller, its controlling method, program for control and processing active contents cache and recording medium for its program | |
CN105208435B (en) | Data processing method and network element equipment in IPTV system | |
CN111897677A (en) | Database switching method and device, and communication method and device | |
CN110099208B (en) | Method and device for cross-level and cross-domain upgrading of camera in video monitoring system | |
CN114827283B (en) | Resource access method, device, medium and robot | |
CN115412530B (en) | Domain name resolution method and system for service under multi-cluster scene |
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 |