CN110830755B - Code stream scheduling method and device in hybrid network mode - Google Patents

Code stream scheduling method and device in hybrid network mode Download PDF

Info

Publication number
CN110830755B
CN110830755B CN201810889632.6A CN201810889632A CN110830755B CN 110830755 B CN110830755 B CN 110830755B CN 201810889632 A CN201810889632 A CN 201810889632A CN 110830755 B CN110830755 B CN 110830755B
Authority
CN
China
Prior art keywords
client
server
scheduling
code stream
connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810889632.6A
Other languages
Chinese (zh)
Other versions
CN110830755A (en
Inventor
黄诚
陈庆议
鲍荣
余国生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201810889632.6A priority Critical patent/CN110830755B/en
Publication of CN110830755A publication Critical patent/CN110830755A/en
Application granted granted Critical
Publication of CN110830755B publication Critical patent/CN110830755B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/632Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing using a connection between clients on a wide area network, e.g. setting up a peer-to-peer communication via Internet for retrieving video segments from the hard-disk of other client devices

Abstract

The invention discloses a code stream scheduling method and a code stream scheduling device in a hybrid network mode. And when the network environment of the first client or the second client changes, calculating a second scheduling factor and switching the connection of the second client. The invention can be compatible with more network modes, balances the load of the whole network, prevents each server from being overloaded due to excessive access and ensures the stability of network service.

Description

Code stream scheduling method and device in hybrid network mode
Technical Field
The invention belongs to the technical field of network distribution, and particularly relates to a code stream scheduling method and device in a hybrid network mode.
Background
In the field of internet of things, more and more internet of things devices need to rely on the internet to perform network communication service, and convenient and fast access and control to the devices at any time and any place are realized. In order to meet the requirements of different layers, multiple networking technologies are often required to be combined for realization, and the larger the project is, the more complicated the networking is. For example, in a kindergarten, a monitoring device is deployed, a kindergarten property management can control a camera through a local area network, and in order to enable parents to view live pictures of the kindergarten camera through a mobile client anytime and anywhere, P2P technology, relay forwarding or CDN delivery services may be used.
Among these network technologies, the P2P technology is relatively cheap to implement, but performance cannot be guaranteed, packet loss may occur due to signaling conversion between different operator networks, and the real-time monitoring service is prone to be jammed, stopped, or even unable to be played, which affects actual effects. CDN service is realized by the deployment of a large number of network node servers, and the video quality can be guaranteed by the distribution processing of the edge nodes closest to the CDN. The device sends one path of video stream to the CDN server, and the CDN server can send the same path of code stream to different clients, so that the uplink bandwidth of the device is saved. However, the hardware cost and bandwidth cost of the CDN overall deployment are high, and the signaling transmission between multiple layers of CDN servers causes a large delay. The forwarding is that a connection resource is distributed by an independent server, a one-to-one connection is established between a client and equipment, the connection between the client and the equipment is realized through the forwarding, and the online bandwidth and the network bandwidth of the equipment can be occupied while the service is ensured.
Although the technical scheme combines various networking technologies and utilizes respective advantages to form a better network scheduling system, the problems of bandwidth resource consumption and server load pressure are still not well solved when a large number of user groups are accessed in a centralized manner.
Disclosure of Invention
The invention aims to provide a code stream scheduling method and device in a hybrid network mode, and aims to solve the problems of serious bandwidth resource consumption and overlarge server load pressure when a large number of user groups are intensively accessed in the prior art.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a code stream scheduling method in a hybrid network mode is applied to a hybrid network at least comprising a central server, a first server and a second server, a first client establishes connection with Internet of things equipment through the second server when the load of the first server exceeds a set standard load, and the code stream scheduling method in the hybrid network mode is applied to the central server and comprises the following steps:
receiving a keep-alive message sent by a first client after connection with the Internet of things equipment is established through a second server, and calculating a first scheduling factor according to parameters carried in the keep-alive message of the first client and the load of the first server;
and receiving a data request of a second client, and when the first scheduling factor is smaller than a preset first threshold value, taking the first client as a second server to inform the second client of establishing connection to the first client so that the first client forwards data to the second client through the connection established with the second client.
Further, the code stream scheduling method in the hybrid network mode further includes:
and calculating a first scheduling factor according to a preset time interval, and switching the second client to establish connection with the Internet of things equipment through the second server or the first server when the first scheduling factor is greater than or equal to a preset first threshold value.
Further, the code stream scheduling method in the hybrid network mode further includes:
and receiving the keep-alive message sent by the second client, calculating a second scheduling factor according to the parameters carried by the keep-alive message of the second client and the load of the first server, and switching the second client to establish connection with the Internet of things equipment through the second server or the first server when the second scheduling factor is greater than or equal to a preset second threshold value.
Further, the notifying the second client to establish a connection to the first client further includes:
and informing the first client to send the code stream to the second client according to the code stream parameters of the first client.
Further, the notifying the second client to establish a connection to the first client further includes:
and informing the first client to encode according to the code stream parameters of the second client and then sending the code stream to the second client.
The invention also provides a code stream scheduling device in a hybrid network mode, which is applied to a hybrid network at least comprising a central server, a first server and a second server, wherein a first client establishes connection with the internet of things equipment through the second server when the load of the first server exceeds a set standard load, and the code stream scheduling device in the hybrid network mode is applied to the central server and comprises the following components:
the factor calculation module is used for receiving the keep-alive message sent by the first client after the first client establishes connection with the Internet of things equipment through the second server, and calculating a first scheduling factor according to the parameters carried in the keep-alive message of the first client and the load of the first server;
and the scheduling module is used for receiving a data request of the second client, and when the first scheduling factor is smaller than a preset first threshold value, the first client is used as a second server to inform the second client to establish connection to the first client, so that the first client forwards data to the second client through the connection established with the second client.
Further, the factor calculating module is further configured to calculate a first scheduling factor according to a preset time interval; and when the first scheduling factor is greater than or equal to a preset first threshold value, the scheduling module switches the second client to establish connection with the Internet of things equipment through the second server or the first server.
Further, the factor calculation module is further configured to receive a keep-alive message sent by the second client, and calculate a second scheduling factor according to a parameter carried by the keep-alive message of the second client and a load of the first server; and when the second scheduling factor is greater than or equal to a preset second threshold value, the scheduling module switches the second client to establish connection with the Internet of things equipment through the second server or the first server.
Further, the scheduling module notifies the second client to establish a connection to the first client, and further performs the following operations:
and informing the first client to send the code stream to the second client according to the code stream parameters of the first client.
Further, the scheduling module notifies the second client to establish a connection to the first client, and further performs the following operations:
and informing the first client to encode according to the code stream parameters of the second client and then sending the code stream to the second client.
The method comprises the steps that under the condition that a first client side is connected with Internet of things equipment through a second server, if a central server receives a request of the second client side, a first scheduling factor is calculated according to parameters carried by a keep-alive message of the first client side and the load condition of the first server, and when the first scheduling factor is smaller than a preset first threshold value, the first client side is used as the second server to inform the second client side of establishing connection with the first client side, so that the first client side can forward data to the second client side through the connection established with the second client side. And when the network environment of the first client or the second client changes, calculating a second scheduling factor and switching the connection of the second client. The invention can be compatible with more network modes and optimizes the delay problem when the client shares the connection. When a large number of users access in a centralized manner, the bandwidth resource and flow cost of the CDN are effectively reduced, the load of the whole network is balanced, and the phenomenon that each server is overloaded due to excessive access is prevented. Meanwhile, the method of the invention effectively reduces single point failures in the whole network and ensures the stability of network services.
Drawings
Fig. 1 is a schematic diagram of networking of the internet of things according to an embodiment of the invention;
FIG. 2 is a flow chart of a code stream scheduling method in a hybrid network mode according to the present invention;
FIG. 3 is a schematic diagram of a hybrid networking connection according to an embodiment of the present invention;
FIG. 4 is a timing diagram illustrating the establishment of a connection between clients according to an embodiment of the present invention;
fig. 5 is a schematic diagram of connection switching according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention are further described in detail below with reference to the drawings and examples, which should not be construed as limiting the present invention.
In order to meet the requirements of different users on equipment access through clients anytime and anywhere, deployment is usually performed by depending on a cloud platform. In the invention, by taking the internet of things as shown in fig. 1 as an example, a plurality of internet of things devices are deployed in a local area network and are accessed to an internet of things cloud platform through a router. The Internet of things cloud platform comprises a plurality of functional components such as a central server and a CDN server. The client accesses the Internet of things equipment by accessing the Internet of things cloud platform.
The central server is responsible for processing signaling interaction between the client and the equipment and switching an interactive connection mode besides registering, managing and maintaining the state of the equipment, and plays roles of integral coordination and scheduling management.
The CDN server is a core device of a Content Delivery Network (Content Delivery Network), and mainly provides a Content Delivery service to a client and a device, and after the device establishes one-way connection to the CDN server, the CDN server can distribute multiple paths of Content to different clients, thereby establishing one-to-many connection.
STUN (simple Traversal of UDP over NATs), UDP simple Traversal of NAT, STUN server mainly provides peer-to-peer NAT Traversal service, and can establish C/S mode end-to-end network connection under public network.
It should be noted that, in the technical solution, the cloud platform is not limited to the servers included in the internet of things cloud platform, and may also include a relay server, for example, the hybrid network in the technical solution needs the cloud platform to include at least two servers, and can establish connections in two different modes.
And the administrator registers an account on the cloud platform, and adds the unique factory-leaving registration code of each Internet of things device to the cloud platform account to complete device addition. For example, after monitoring cameras are deployed in classrooms or corridors of various classes of kindergartens and cloud account addition is completed, an administrator shares the cameras of the class where a certain student is located with an account number registered by a parent of the student, and the parent of the student can view a live picture through a client to observe daily activities of the student at the class.
In an actual operating environment, taking the scenario of the kindergarten in fig. 1 as an example, when a student has a meal or learns, parents of the student are likely to access the device in a centralized manner, which may cause hot-spot focused access on some devices, and further cause excessive server performance pressure and excessive consumption of network bandwidth.
As shown in fig. 2, a code stream scheduling method in a hybrid network mode is applied to a hybrid network at least including a central server, a first server, and a second server, and a first client establishes a connection with an internet of things device through the second server when a load of the first server exceeds a set standard load. The code stream scheduling method in the hybrid network mode is applied to a central server and comprises the following steps:
and step S1, receiving a keep-alive message sent by the first client after the first client establishes connection with the Internet of things equipment through the second server, and calculating a first scheduling factor according to the parameters carried in the keep-alive message and the load of the first server.
For example, after a user registers his or her account on the same cloud platform, an administrator shares part of rights (e.g., real-state rights) of the internet-of-things device with the user, so that different users can be controlled to have different rights. After a user logs in a cloud platform account through a client application, the user accesses the Internet of things equipment shared by an administrator, and then performs related services within the specified authority.
The technical scheme aims to forward data of the internet of things equipment to other clients through the clients, so that a channel authority needs to be established for the clients, and the channel authority can be divided into three types: no sharing, simple sharing, and advanced sharing. The simple sharing means that the client directly forwards the code stream; advanced sharing refers to that a client providing shared service decodes first and then encodes according to the requirements of the client requesting service, which consumes the device performance of the client providing shared service. When the code stream is forwarded between the clients, the clients are required to support simple sharing or advanced sharing, and the clients perform different code stream switching operations through different channel permissions.
In an actual operating environment, some internet of things devices have hotspot focused access, which causes the conditions that the performance pressure of a server is too high and the network bandwidth is excessively consumed. Taking the scenario of the kindergarten of fig. 1 as an example, it is highly likely that parents of a student will have centralized access during the time that the student has a meal or school. In past network deployments, CDN servers were typically required to establish multi-path delivery traffic.
In this embodiment, a hybrid network mode as shown in fig. 3 is adopted, a client 1, a client 2, and a client 3 all have live access rights to an internet of things device 1, when the internet of things device 1 is accessed at the same time, a connection L101 is established between the internet of things device 1 and a CDN server, a connection L102 is established between the internet of things device 1 and a STUN server, the CDN server simultaneously establishes two CDN service connections L103 to the two clients (client 1 and client 2), and the STUN server establishes an end-to-end connection L104 with the client 3.
In a hybrid networking mode, the CDN content delivery service is adopted to redirect the user's request to the service node closest to the user in real time according to the network traffic and the comprehensive information such as the connection of each node, the load condition, the distance to the user, the response time and the like. The method aims to enable the user to obtain the required content nearby, solve the problem of congestion of the Internet network and improve the response speed of the user for accessing the website. However, since the cost of the CDN server is relatively high, in this embodiment, when the CDN server reaches a set standard load, the STUN server is used to establish an end-to-end tunnel connection to implement data communication for a new client request. The set standard load may be the number of connections, or may be the CPU occupancy rate of the CDN server, or the traffic occupancy rate, which is not described herein again.
For example, when the client 3 requests to access the internet of things device 1, and the load of the CDN server exceeds a set standard load, the client 3 establishes an end-to-end connection with the internet of things device 1 through the STUN server to implement communication. By adopting the hybrid networking mode of the embodiment, the performance pressure of each server can be balanced, particularly, the problems of network bandwidth resource peak value and overlarge server performance pressure caused by centralized access of a large number of users are solved, the security of video access is improved, and the traffic cost of CDN service is reduced.
It should be noted that, in the embodiment, the CDN server and the STUN server are used as an example for description, and since the internet of things cloud platform may further include other servers such as a relay server, the connection between the client and the internet of things device is not limited to the CDN server and the STUN server, and may also be established by using the relay server, which is not limited to the connection method used in the present invention. In the following description, a CDN server is taken as a first server, and a STUN server is taken as a second server.
In this embodiment, the client 3 in fig. 3 is taken as a first client, and the client 4 is taken as a second client.
When the client 4 requests the live service of the same internet of things device (internet of things device 1) from the central server, the central server analyzes whether the code stream sharing can be performed from the client 3 according to the permission condition of the video channel under the account logged in by the client 3. If no sharing authority exists, a path of service is newly established, and according to the load of the CDN server and the load of the STUN server, an end-to-end tunnel connection can be established through the STUN server, and a connection can also be established through the CDN server. The present embodiment assumes that the load of the CDN server is full and the client 4 establishes data communication through the client 3. And if the sharing authority exists, analyzing the data and further scheduling. The channel authority introduced in the embodiment enables the code stream data to be safer during sharing.
After the end-to-end tunnel connection is established between the client 3 and the device through the STUN service, a live service is established, the client 3 pushes the keep-alive message to the central server at regular time (for example, 20 seconds), and the message contains the network delay and the packet loss rate of the client 3, the CPU utilization rate and the operating memory occupancy rate, and is used for the central server to sense the network connection condition, the live picture quality and the client operating environment parameters.
The central server establishes a first scheduling factor by taking the network delay of the client 3, the network packet loss rate, the CPU utilization rate, the operating memory utilization condition and the CDN server connection number as reference factors. Wherein, the first scheduling factor ═ a (15%) + b (15%) + c (25%) + d (25%) + e (20%) of CDN server connections for the ue 3, where a, b, c, d, e are all weight parameters, and a + b + c + d + e is 1.
It is easy to understand that, in the above embodiment, the first scheduling factor is calculated according to the parameters carried in the keep-alive message and the load (connection number) of the CDN server, and may further receive the keep-alive message periodically sent by the internet of things device to the central server, and calculate the first scheduling factor according to information such as the remaining uplink bandwidth of the internet of things device carried in the keep-alive message of the internet of things device. For example, the internet of things device pushes a keep-alive message to the central server at a fixed time (for example, 20s), and the message includes information such as the remaining uplink bandwidth of the internet of things device. The first scheduling factor is client 3 network delay a + client 3 network packet loss rate b + device CPU utilization rate c + remaining operating memory d + CDN server connection number e + internet of things device uplink bandwidth f, where a, b, c, d, e, and f are weight parameters, and a + b + c + d + e + f is 1.
Step S2, receiving a data request of the second client, and when the first scheduling factor is smaller than a preset first threshold, using the first client as the second server to notify the second client to establish a connection to the first client, so that the first client forwards data to the second client through the connection established with the second client.
In this embodiment, if the new client 4 requests the internet of things device 1 for a live event, and the first scheduling factor is smaller than the preset first threshold, the first client is used as the STUN server to notify the second client to establish an end-to-end tunnel connection to the first client, so that the first client forwards data to the second client through the tunnel connection established with the second client.
For example, when receiving the request of the client 4, the central server calculates that the first scheduling factor is 1.5, which is smaller than the preset first threshold 2, indicating that the network condition of the client 3 is good, takes the client 3 as a STUN server, and notifies the client 4 to establish an end-to-end tunnel connection to the client 3 through an NAT traversal technology.
Fig. 4 provides a timing diagram of the establishment of an end-to-end tunnel connection by client 4:
s1: the client 3 requests live traffic of some internet of things device from the central server.
S2: the central server probes the network type of the client 3 through the STUN service.
S3: through scheduling analysis, the central server applies for connection resources from the CDN server and then sends the connection resources to the client 3 and the Internet of things equipment after the resource load of the CDN server is heavier, end-to-end connection between the client 3 and the Internet of things equipment is established, and the client 3 can check live pictures of the Internet of things equipment.
S4: the client 4 requests the same internet of things device for live service from the central server.
S5: the central server probes the network type of the client 4 through the STUN service.
S6: the central server, after analyzing and scheduling (calculating a first scheduling factor and comparing the first scheduling factor with a preset first threshold), needs to forward the code stream from the client 3, and then notifies the client 3 to start STUN service.
S7: after the client 3 starts the STUN server, the network information is reported to the central server.
S8: after receiving the network information reported by the client 3, the central server sends the information to the client 4. In this example, it is assumed that the accounts on which client 3 and client 4 log in have mutual live traffic sharing rights for the device. And if the sharing authority does not exist, newly establishing a path of service.
S9: after receiving the network information of the client 3 sent by the central server, the client 4 establishes an end-to-end tunnel connection with the client 3 through an NAT traversal technology.
S10: after the connection is successfully established, the client 3 directly forwards or re-encodes and sends the code stream to the client 4 after decoding, and live service is established.
Through the time sequence diagram shown in fig. 4, in this embodiment, the end-to-end tunnel connection between the client 3 and the client 4 is successfully established, the client 3 sends the code stream to the client 4, and the client 4 successfully realizes the live view.
It should be noted that, in the foregoing embodiment, the steps S2 and S5 also detect the network type of the client, so as to analyze whether the network scheduling is suitable according to the network type, for example, when the network type of the client is a broadband network such as WIFI or 4G, it is determined that the network scheduling is suitable. According to the technical scheme of the invention, the clients sending the requests can be the clients meeting the network scheduling by default, namely, the steps S2 and S5 can be omitted, and the details are not repeated.
In another embodiment of the present invention, the code stream scheduling method in the hybrid network mode further includes:
and calculating a first scheduling factor according to a preset time interval, and switching the second client to establish connection with the Internet of things equipment through the second server or the first server when the first scheduling factor is greater than or equal to a preset first threshold value.
Specifically, when the user starts another application program on the terminal device (such as a mobile phone or a tablet computer) where the client 3 is located, which results in insufficient CPU utilization or running memory, or when the network environment where the client 3 is located changes (for example, the WIFI is switched to the 4G network, or the network connection is disconnected) and cannot continue to provide the sharing service, the central server performs scheduling.
At this time, the first scheduling factor is changed, the first scheduling factor is calculated according to a preset time interval (for example, 20 seconds), and when the first scheduling factor is greater than or equal to a preset first threshold, for example, the first scheduling factor is 2.1, and the preset first threshold is 2, scheduling is performed.
During scheduling, the client 3 and the client 4 are notified to disconnect the end-to-end tunnel connection and are switched to be directly connected with a CDN server or a STUN server or a relay forwarding server. According to the technical scheme, after the network environment of the client 3 changes, the client 4 is scheduled to establish direct connection with the Internet of things equipment through the CDN server or the STUN server or the relay forwarding server, and the problem that the service cannot be continuously developed due to the fault of a root node is avoided.
In another embodiment of the present invention, the code stream scheduling method in the hybrid network mode further includes:
and receiving the keep-alive message sent by the second client, calculating a second scheduling factor according to the parameters carried by the keep-alive message of the second client and the load of the first server, and switching the second client to establish connection with the Internet of things equipment through the second server or the first server when the second scheduling factor is greater than or equal to a preset second threshold value.
Specifically, after the connection between the client 4 and the client 3 is successfully established, a keep-alive message is sent to the central server at a fixed time (for example, 20 seconds), and the keep-alive message carries information such as network delay and network packet loss rate of the client 4. The central server establishes a second scheduling factor according to the network delay of the client 4, the network packet loss rate and the connection number of the CDN servers as reference factors, dynamically switches the end-to-end tunnel connection between the client 4 and the client 3 to be directly connected with the CDN server or the STUN server.
The second scheduling factor ═ α (e.g., 40%) of the network delay of the client 4, + β (e.g., 40%) of the network packet loss rate of the client 4 + γ (e.g., 20%) of the number of CDN server connections, where α, β, γ are weight parameters, and α + β + γ is 1. For example, assuming that the network delay of the client 4 is large, the calculated second factor is 2, and is greater than the preset second threshold value 1.8, and the end-to-end tunnel connection between the client 4 and the client 3 needs to be switched to be directly connected to the CDN server. And when the second scheduling factor is smaller than a preset second threshold, not performing scheduling switching.
As shown in fig. 5, a timing diagram is provided describing the process of the client 4 switching the live traffic connection from the end-to-end tunnel connection with the client 3 to the CDN server connection:
d1: the central server applies for link resources to the CDN server;
d2: the CDN server responds to the resource request to the central server;
d3: after the central server succeeds, informing the client 4 of CDN resource information;
d4: after obtaining the CDN resource information, the client 4 establishes CDN connection with a CDN server;
d5: the client 4 reestablishes the live service through the CDN server;
d6: after the client 4 successfully establishes the live service, the end-to-end tunnel connection with the client 3 is disconnected, and the state is reported to the central server;
d7: after receiving the state information reported by the client 4, the central server notifies the client 3 to stop forwarding the code stream information to the client 4, and clears the connection resource with the client 4. At this point, the process of switching the connection to the CDN service connection by the client 4 is completed.
In addition, when the client 3 actively stops the service and needs to switch the connection mode of the client 4, the client 3 firstly notifies the central server, and then sequentially executes the steps D1-D6 to complete the switching mode of the client 4.
The above switching modes are not limited to switching the end-to-end tunnel connection between the clients to the CDN connection, and also include switching to the relay forwarding connection, and switching to the end-to-end tunnel connection between the other clients, and are all within the scheduling switching method.
In addition, in practical applications, the client 4 may be a mobile client, and when the routing information of the client 4 changes during the moving process, the new routing information is forwarded to the central server. The scheduling client 3 sends code stream data to the new address, and the scheduling process is as follows:
(1) the client 4 sends the new routing information to the central server.
(2) The central server sends the new routing information of the client 4 to the client 3.
(3) The client 3 sends the code stream data to the new network address and port of the client 4.
In addition, when the client establishes a live connection, the video picture quality or the fluency priority is usually required according to the actual requirement or the network situation. For example, when the client 3 has established a live event, the central server stores the codestream parameter information of the live event established by the client 3, including resolution, encoding format, whether fluency is prioritized, and the like. When the client 4 requests the live condition of the same device or switches the code stream parameters after establishing the live condition, the client 3 is required to perform advanced sharing, the client 3 performs sharing authorization, and the central server performs scheduling according to the code stream parameter information issued by the client 4, including the following two conditions.
In the first case: and informing the first client to send the code stream to the second client according to the code stream parameters of the first client.
In this case, the client 4 requires fluency priority, the resolution is not higher than the resolution of the current live situation of the client 3, and the central server issues an instruction to the client 3 to share the code stream. And the client 3 directly transmits the code stream under the condition of simple authorization.
And in the second situation, the first client is informed to send the code stream to the second client after the first client codes the code stream according to the code stream parameters of the second client.
In the second case, the client 4 requires higher resolution, the central server issues an instruction to the client 3, the resolution is improved in the client 3, and the client 3 decodes and then scales the picture under the condition of high-level authorization, and then sends the original code stream data encoded by the code stream parameters of the second client to the client 4.
After that, the client 4 decodes and displays the received code stream data transmitted by the client 3.
It should be noted that, in the second case, the client 3 needs to perform high-level sharing, and if the client 3 does not perform high-level sharing, the client 3 can only send a code stream to the client 4 in the first case, or establish a separate CDN service or establish a STUN service with other clients meeting scheduling conditions, which is not described herein again.
Corresponding to the method, the embodiment of the code stream scheduling device in the hybrid network mode is also provided, and the device is applied to the central server.
The code stream scheduling device in the hybrid network mode of the embodiment includes:
the factor calculation module is used for receiving the keep-alive message sent by the first client after the first client establishes connection with the Internet of things equipment through the second server, and calculating a first scheduling factor according to the parameters carried in the keep-alive message of the first client and the load of the first server;
and the scheduling module is used for receiving a data request of the second client, and when the first scheduling factor is smaller than a preset first threshold value, the first client is used as a second server to inform the second client to establish connection to the first client, so that the first client forwards data to the second client through the connection established with the second client.
Operations executed by each module in this embodiment correspond to steps in the code stream scheduling method in the hybrid network mode, and a corresponding description is given below in a specific embodiment.
In an embodiment of the present apparatus, the factor calculating module is further configured to calculate a first scheduling factor according to a preset time interval; and when the first scheduling factor is greater than or equal to a preset first threshold value, the scheduling module switches the second client to establish connection with the Internet of things equipment through the second server or the first server.
In another embodiment of the present device, the factor calculating module is further configured to receive a keep-alive message sent by the second client, and calculate a second scheduling factor according to a parameter carried in the keep-alive message of the second client and a load of the first server; and when the second scheduling factor is greater than or equal to a preset second threshold value, the scheduling module switches the second client to establish connection with the Internet of things equipment through the second server or the first server.
In another embodiment of the present device, the scheduling module notifies the second client to establish a connection with the first client, and further performs the following operations:
and informing the first client to send the code stream to the second client according to the code stream parameters of the first client.
In another embodiment of the present device, the scheduling module notifies the second client to establish a connection with the first client, and further performs the following operations:
and informing the first client to encode according to the code stream parameters of the second client and then sending the code stream to the second client.
The above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and those skilled in the art can make various corresponding changes and modifications according to the present invention without departing from the spirit and the essence of the present invention, but these corresponding changes and modifications should fall within the protection scope of the appended claims.

Claims (8)

1. A code stream scheduling method in a hybrid network mode is applied to a hybrid network at least comprising a central server, a first server and a second server, and is characterized in that a first client establishes connection with Internet of things equipment through the second server when the load of the first server exceeds a set standard load, and the code stream scheduling method in the hybrid network mode is applied to the central server and comprises the following steps:
receiving a keep-alive message sent by a first client after connection with the Internet of things equipment is established through a second server, and calculating a first scheduling factor according to parameters carried in the keep-alive message of the first client and the load of the first server;
receiving a data request of a second client, and when a first scheduling factor is smaller than a preset first threshold, informing the second client to establish connection to the first client so that the first client forwards data to the second client through the connection established with the second client;
and receiving the keep-alive message sent by the second client, calculating a second scheduling factor according to the parameters carried by the keep-alive message of the second client and the load of the first server, and switching the second client to establish connection with the Internet of things equipment through the second server or the first server when the second scheduling factor is greater than or equal to a preset second threshold value.
2. The code stream scheduling method in the hybrid network mode according to claim 1, further comprising:
and calculating a first scheduling factor according to a preset time interval, and switching the second client to establish connection with the Internet of things equipment through the second server or the first server when the first scheduling factor is greater than or equal to a preset first threshold value.
3. The code stream scheduling method in the hybrid network mode according to claim 1, wherein the notifying the second client to establish a connection to the first client further comprises:
and informing the first client to send the code stream to the second client according to the code stream parameters of the first client.
4. The code stream scheduling method in the hybrid network mode according to claim 1, wherein the notifying the second client to establish a connection to the first client further comprises:
and informing the first client to encode according to the code stream parameters of the second client and then sending the code stream to the second client.
5. The utility model provides a code stream scheduling device under hybrid network mode, is applied to the hybrid network who includes at least central server, first server and second server, its characterized in that, first customer end passes through the second server and establishes the connection with thing networking device when the load of first server surpasses the standard load of setting for, code stream scheduling device under hybrid network mode is applied to central server, includes:
the factor calculation module is used for receiving the keep-alive message sent by the first client after the first client establishes connection with the Internet of things equipment through the second server, and calculating a first scheduling factor according to the parameters carried in the keep-alive message of the first client and the load of the first server;
the scheduling module is used for receiving a data request of the second client, and informing the second client to establish connection to the first client when the first scheduling factor is smaller than a preset first threshold value so that the first client can forward data to the second client through the connection established with the second client;
the factor calculation module is further configured to receive a keep-alive message sent by the second client, and calculate a second scheduling factor according to a parameter carried by the keep-alive message of the second client and a load of the first server; and when the second scheduling factor is greater than or equal to a preset second threshold value, the scheduling module switches the second client to establish connection with the Internet of things equipment through the second server or the first server.
6. The code stream scheduling device under the hybrid network mode according to claim 5, wherein the factor calculating module is further configured to calculate a first scheduling factor according to a preset time interval; and when the first scheduling factor is greater than or equal to a preset first threshold value, the scheduling module switches the second client to establish connection with the Internet of things equipment through the second server or the first server.
7. The code stream scheduling device in the hybrid network mode according to claim 5, wherein the scheduling module notifies the second client to establish a connection to the first client, and further performs the following operations:
and informing the first client to send the code stream to the second client according to the code stream parameters of the first client.
8. The code stream scheduling device in the hybrid network mode according to claim 5, wherein the scheduling module notifies the second client to establish a connection to the first client, and further performs the following operations:
and informing the first client to encode according to the code stream parameters of the second client and then sending the code stream to the second client.
CN201810889632.6A 2018-08-07 2018-08-07 Code stream scheduling method and device in hybrid network mode Active CN110830755B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810889632.6A CN110830755B (en) 2018-08-07 2018-08-07 Code stream scheduling method and device in hybrid network mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810889632.6A CN110830755B (en) 2018-08-07 2018-08-07 Code stream scheduling method and device in hybrid network mode

Publications (2)

Publication Number Publication Date
CN110830755A CN110830755A (en) 2020-02-21
CN110830755B true CN110830755B (en) 2021-07-20

Family

ID=69534073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810889632.6A Active CN110830755B (en) 2018-08-07 2018-08-07 Code stream scheduling method and device in hybrid network mode

Country Status (1)

Country Link
CN (1) CN110830755B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115102957A (en) * 2022-06-08 2022-09-23 中移(杭州)信息技术有限公司 Service distribution method based on hybrid management system and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539982A (en) * 2014-12-18 2015-04-22 新浪网技术(中国)有限公司 Method and system for dispatching of video resource point-to-point sharing and node terminal
CN105635755A (en) * 2015-12-30 2016-06-01 合一网络技术(北京)有限公司 Direct-broadcast flow transmission method and apparatus
EP3078173A1 (en) * 2013-12-02 2016-10-12 Akamai Technologies, Inc. Virtual private network (vpn)-as-a-service with delivery optimizations while maintaining end-to-end data security
CN107211297A (en) * 2014-11-07 2017-09-26 交互数字专利控股公司 Trunking traffic optimizes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3078173A1 (en) * 2013-12-02 2016-10-12 Akamai Technologies, Inc. Virtual private network (vpn)-as-a-service with delivery optimizations while maintaining end-to-end data security
CN107211297A (en) * 2014-11-07 2017-09-26 交互数字专利控股公司 Trunking traffic optimizes
CN104539982A (en) * 2014-12-18 2015-04-22 新浪网技术(中国)有限公司 Method and system for dispatching of video resource point-to-point sharing and node terminal
CN105635755A (en) * 2015-12-30 2016-06-01 合一网络技术(北京)有限公司 Direct-broadcast flow transmission method and apparatus

Also Published As

Publication number Publication date
CN110830755A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
Alsmirat et al. Internet of surveillance: a cloud supported large-scale wireless surveillance system
US10277865B2 (en) Data transmission method and system, and related devices
US8984113B2 (en) Internet of things service architecture and method for realizing internet of things service
US20230308951A1 (en) Data processing method, network element device, and readable storage medium
CN110121059B (en) Monitoring video processing method, device and storage medium
CN109068186B (en) Method and device for processing packet loss rate
CN109413138B (en) File uploading method and device
CN110572433A (en) Video scheduling method, system and device
Zhu et al. Distributed media-aware rate allocation for video multicast over wireless networks
Medagliani et al. Overlay routing for fast video transfers in CDN
CN102857439A (en) Media data access and scheduling system architecture design method based on multi-node cooperation
Qing et al. Cactse: Cloudlet aided cooperative terminals service environment for mobile proximity content delivery
CN108965428A (en) The transmission method of live data, device, electronic equipment, system
CN116708598A (en) System and method for real-time network transmission
CN111224889A (en) Data transmission method and device
CN110049280B (en) Method and device for processing monitoring data
CN110830755B (en) Code stream scheduling method and device in hybrid network mode
CN104753779B (en) A kind of implementation method of cloud group virtual flow-line system
CN112866390A (en) Data transmission method, device, terminal equipment and storage medium
CN115277467B (en) Communication method and device based on home gateway, gateway and storage medium
CN109040199A (en) A kind of method, system and storage medium for distributing resource data
Khalid et al. An SDN-based device-aware live video service for inter-domain adaptive bitrate streaming
CN110049227B (en) Camera operation method and device
KR101530647B1 (en) Method and apparatus for processing traffic for service of high quality
Togawa et al. Cooperative and priority based on dynamic resource adaptation method in wireless network

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