Live broadcast flow scheduling method and device, electronic device and storage medium

By determining the access path of clients and camera equipment in live broadcast technology, using the streaming media address of the combined streaming network and the public network, traffic flows within the private network, solving the security risks caused by public network access in the existing technology and The high traffic cost issue has achieved the improvement of security and economy.

CN119211590AActive Publication Date: 2024-12-27E SURFING VISION TECHNOLOGY CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411698842.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2024-12-27
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

Existing live broadcast technology has failed to effectively solve the problem of network security risks when reducing traffic costs, especially when the device is accessed through the public network, exposing the port increases security risks.

Method used

By determining the different access paths between the client and the camera device, using the streaming media addresses of the combined streaming network and the public network, traffic flows within the private network to avoid the exposure of the port during public network access, and using the private network proxy gateway to determine the access and assign the corresponding streaming media address.

Benefits of technology

It reduces network security risks, while also reducing traffic flowing through the private network reduces traffic costs and improves economic benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211590A_ABST
    Figure CN119211590A_ABST
Patent Text Reader

Abstract

The invention relates to a live broadcast traffic scheduling method and device, an electronic device and a storage medium, and is applied to the field of streaming media. The live broadcast traffic scheduling method comprises the following steps: in response to a connection request initiated by camera equipment, determining a first access path accessed by the camera equipment; in response to a live broadcast address acquisition request initiated by the client, determining a second access path accessed by the client; determining a target streaming media according to the first access path and the second access path; the target streaming media comprise streaming media registered to a service platform from a private network; and determining a target live broadcast address according to the target streaming media, and returning the target live broadcast address to the client, so that the client obtains a video stream of the camera device according to the target live broadcast address. Through application of the method and the device, the effect of reducing the network security risk while reducing the traffic cost is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of streaming media technology, and in particular to a live broadcast traffic scheduling method, device, electronic device and storage medium. Background Art

[0002] With the development of the video surveillance industry, the scale of equipment on the cloud is increasing. The number of clicks on public network live broadcasts is very high every day, and the equipment uploads videos to the resource pool 24 hours a day, which will result in huge traffic costs during live broadcasts. Secondly, the streaming media accessed by the equipment through the public network needs to open ports for exposure, increasing security risks.

[0003] In existing live broadcast technologies, most clients and device ends are in the same province or city. Generally, video streams are shared among viewers by optimizing video encoding and compression, leveraging edge computing, or using P2P technology. Although existing live broadcast technologies reduce server pressure and bandwidth requirements to save traffic costs, existing live broadcast technologies do not consider network security risks caused by traffic scheduling.

[0004] There is currently no effective solution to the problem in related technologies that network security risks are high when reducing traffic costs. Summary of the invention

[0005] In this embodiment, a live broadcast traffic scheduling method, device, electronic device and storage medium are provided to reduce network security risks while reducing traffic costs.

[0006] In a first aspect, a live broadcast traffic scheduling method is provided in this embodiment, which is applied to a service platform, wherein the service platform is connected to a client and a camera device respectively; the method comprises: In response to a connection request initiated by a camera device, determining a first access path for accessing the camera device; In response to a live broadcast address acquisition request initiated by a client, determining a second access path accessed by the client; Determine a target streaming media according to the first access path and the second access path; the target streaming media includes streaming media registered from a private network to a service platform; A target live broadcast address is determined according to the target streaming media, and the target live broadcast address is returned to the client, so that the client obtains the video stream of the camera device according to the target live broadcast address.

[0007] In some embodiments, in response to a connection request initiated by a camera device, determining a first access path for accessing the camera device includes: In response to a connection request initiated by a camera device, a connection request message of the connection request is obtained; the connection request is initiated by the camera device and forwarded through a private network proxy gateway; Determine whether the connection request message carries a private network identifier; the private network identifier is extended by the private network proxy gateway on the connection request message; If it carries a private network identifier, it indicates that the first access path is private network access; if it does not carry a private network identifier, it indicates that the first access path is public network access.

[0008] In some embodiments, determining the second access path for access by the client includes: In response to the live broadcast address acquisition request of the client, an address request message in the live broadcast address acquisition request is obtained; the live broadcast address acquisition request is initiated by the client and forwarded through the private network proxy gateway; Determine whether the address request message carries a private network identifier; the private network identifier is extended by the private network proxy gateway on the address request message; If the private network identifier is carried, the second access path is identified as private network access; if the private network identifier is not carried, the second access path is identified as public network access.

[0009] In some embodiments, determining the target streaming media according to the first access path and the second access path includes: When the first access path is a private network access and the second access path is a public network access, sending a first streaming media address to the camera device; the first streaming media address includes a streaming media address supported by the private network; receiving a first successful login signal sent by the camera device; the first successful login signal indicates that the camera device logs in to the first private network streaming media through the first streaming media address; Determining a first public network streaming media according to the public network accessed by the client; the load of the first public network streaming media reaches a preset condition; The target streaming media is determined according to the first private network streaming media and the first public network streaming media.

[0010] In some embodiments, the target streaming media includes a second public network streaming media, and determining the target streaming media according to the first access path and the second access path includes: When both the first access path and the second access path are public network access, sending a second streaming media address to the camera device; the second streaming media address includes a streaming media address supported by both the public network and the private network; A second login success signal sent by the camera device is received; the second login success signal indicates that the camera device logs in to the second public network streaming media through the second streaming media address.

[0011] In some embodiments, the target streaming media includes a second private network streaming media, and determining the target streaming media according to the first access path and the second access path includes: When both the first access path and the second access path are private network access, sending a third streaming media address to the camera device; the third streaming media address includes a streaming media address supported by the private network; Receive a third login success signal sent by the camera device; the third login success signal indicates that the camera device logs in to the second private network streaming media through the third streaming media address.

[0012] In some embodiments, after determining a target live broadcast address according to the target streaming media and returning the target live broadcast address to the client, the method further includes: According to the first access path and the second access path, a stream pulling strategy of the client and a stream pushing strategy of the camera device are determined.

[0013] In a second aspect, a live broadcast traffic scheduling device is provided in this embodiment, the device comprising: a request response module, a streaming media determination module and an address sending module; The request response module is used to determine a first access path for accessing the camera device in response to a connection request initiated by the camera device; and to determine a second access path for accessing the client in response to a live broadcast address acquisition request initiated by the client; The streaming media determination module is used to determine the target streaming media according to the first access path and the second access path; the target streaming media includes the streaming media registered from the private network to the service platform; The address sending module is used to determine a target live broadcast address according to the target streaming media, and return the target live broadcast address to the client, so that the client can obtain the video stream of the camera device according to the target live broadcast address.

[0014] In a third aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the live broadcast traffic scheduling method described in the first aspect when executing the computer program.

[0015] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the live broadcast traffic scheduling method described in the first aspect is implemented.

[0016] Compared with the related art, a live broadcast traffic scheduling method, device, electronic device and storage medium provided in this embodiment determine different access paths for the client and the camera device, and obtain different live broadcast addresses according to different combinations of access paths, and then send the video stream of the camera device to the client according to the live broadcast address, so as to avoid the situation where the streaming media needs to open a port exposure surface when the device is accessed through the public network, thereby reducing network security risks. At the same time, different access methods correspond to different streaming media addresses registered in the private network, so that the traffic flows in the private network, which is conducive to reducing traffic costs.

[0017] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 It is a hardware structure block diagram of a terminal of the live broadcast traffic scheduling method provided in an embodiment of the present application; Figure 2 is a flow chart of the live broadcast traffic scheduling method provided by an embodiment of the present application; Figure 3 is a timing diagram of streaming media access and camera access provided in this specific embodiment; Figure 4 This is a timing diagram for a live broadcast scenario on a client private network provided by this specific embodiment; Figure 5 This is a timing diagram of the public network access of the camera device in the public network live broadcast scenario provided by the client in this specific embodiment; Figure 6 This is a timing diagram of the camera device accessing a private network in a live broadcast scenario of a client on a public network provided by this specific embodiment; Figure 7 This is a schematic diagram of a scenario of live broadcast traffic scheduling provided by this specific embodiment; Figure 8 It is a structural block diagram of the live broadcast traffic scheduling device of this embodiment. DETAILED DESCRIPTION

[0019] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0020] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0021] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 is a hardware structure block diagram of a terminal of the live broadcast traffic scheduling method provided in an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0022] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the live traffic scheduling method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0023] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0024] In the existing live video industry, live streaming is essentially a real-time video streaming transmission, involving a large amount of data flowing in the network; with the development of the live streaming industry, the number of clicks on public network live streaming has reached billions. At the same time, in order to provide users with a better visual experience, many live broadcasts will choose high-definition or even ultra-clear picture quality, which will greatly increase the amount of video stream data. Secondly, the streaming media that the device accesses through the public network needs to open the port exposure surface, which increases security risks. Most clients and device ends are in the same province, city, and in order to save costs and reduce security risks, many customers hope to build a private network in their own area, hoping that the traffic will flow within the private network to save costs, while at the same time minimizing the port exposure surface and providing public network live streaming capabilities.

[0025] In this embodiment, a live broadcast traffic scheduling method is provided, which mainly targets the live broadcast problems in three scenarios: camera device private network access and client private network access, camera device private network access and client public network access, and camera device public network access and client public network access. This method allows traffic to flow within the private network as much as possible, reduces traffic costs, increases economic benefits, and at the same time converges port exposure to reduce network security risks. Figure 2 is a flow chart of a live broadcast traffic scheduling method provided in an embodiment of the present application. The live broadcast traffic scheduling method is applied to an application platform, and the application platform is connected to a camera device and a client respectively; Figure 2As shown, the process includes the following steps: Step S210: In response to a connection request initiated by the camera device, a first access path for accessing the camera device is determined.

[0026] In this step, when the live broadcast personnel want to broadcast live, they need to first access the business platform, that is, they need to initiate a connection request to the business platform to obtain the connection IP and port of the business platform to realize the connection between the camera device and the business platform. Here, the business platform receives the connection request initiated by the camera device, and then determines whether the first access path of the camera device is private network access or public network access. Exemplarily, the connection between the camera device and the business platform can be a long connection or a short connection, and a long connection is preferably used.

[0027] Step S220, in response to the live broadcast address acquisition request initiated by the client, determine a second access path for the client to access.

[0028] In this step, when the client needs to watch live broadcast, the client initiates a live broadcast address acquisition request to the service platform. After receiving the live broadcast address acquisition request sent by the client, the service platform determines whether the second access path accessed by the client is private network access or public network access.

[0029] Step S230, determining target streaming media according to the first access path and the second access path; the target streaming media includes streaming media registered from the private network to the service platform.

[0030] In this step, after the client and the first access path and the second access path of the camera device are determined respectively, the service platform obtains the target streaming media to be accessed from the first access path and the second access path respectively, and the target streaming media is obtained from the streaming media registered to the service platform on the private network and the public private network. Exemplarily, the combination of different access paths mainly includes: the first access path is private network access and the second access path is public network access, the first access path is public network access and the second access path is public network access, and the first access path is private network access and the second access path is private network access. For these three access scenarios, different access scenarios correspond to different target streaming media registered on the private network.

[0031] Among them, a private network refers to a network composed of a group of network devices and machines. Devices and machines can communicate directly with each other. Devices and machines outside the private network cannot access devices in the private network. Devices in the private network can only access the external network through a proxy. A public private network refers to a combination of a private network and a public network. When a service is deployed to a public private network, the client can access the service through the public network, and can also access other services in the private network through the service proxy.

[0032] Step S240, determining a target live broadcast address according to the target streaming media, and returning the target live broadcast address to the client, so that the client obtains the video stream of the camera device according to the target live broadcast address.

[0033] Through the above steps, after the service platform determines the target streaming media, it sends the address of the target streaming media to the camera device so that the camera device can log in to the target streaming media. When the camera device logs in successfully, the service platform determines the target streaming media according to the access path of the client and the camera device, and groups the corresponding live broadcast address, i.e., the target live broadcast address. After the target live broadcast address is determined, it is sent to the client so that the client pulls the stream to the streaming media and the camera device pushes the stream.

[0034] Through the above steps, different access paths for the client and the camera device are determined, and different live broadcast addresses are obtained according to different combinations of access paths. Then, the video stream of the camera device is sent to the client according to the live broadcast address to avoid the situation where the streaming media needs to open a port exposure surface when the device is accessed through the public network, thereby reducing network security risks. At the same time, different access methods correspond to different streaming media addresses registered in the private network, so that the traffic flows in the private network, which is conducive to reducing traffic costs.

[0035] In one specific embodiment, before accessing the camera equipment and the client, the service platform needs to access the streaming media of the private network and the public private network, that is, the private network streaming media and the public private network streaming media of the corresponding provinces of the private network and the public private network are registered to the service platform respectively, and the private network identification and the public network identification are respectively corresponding. Among them, the public network cannot access the private network streaming media, and the public private network streaming media is also in the private network, but allows the public network to access.

[0036] In some of the embodiments, in step S210, in response to a connection request initiated by a camera device, a first access path for accessing the camera device is determined, including: in response to a connection request initiated by the camera device, a connection request message of the connection request is obtained; the connection request is initiated by the camera device, and is forwarded through a private network proxy gateway to determine whether the connection request message carries a private network identifier; the private network identifier is extended on the connection request message by the private network proxy gateway; if the private network identifier is carried, the first access path is identified as private network access; if the private network identifier is not carried, the first access path is identified as public network access.

[0037] This step mainly involves the access of the camera device. In the entire system for implementing live broadcast traffic scheduling, in the private network scenario, it includes a business platform, an accessed camera device, a client, and a private network proxy gateway, and the private network proxy gateway is connected to the business platform. When the camera device wants to access the business platform, it needs to send a connection request to the business platform, that is, obtain a connection IP port from the business platform. The connection request passes through the private network proxy gateway. At this time, the private network proxy gateway will add an extension header to the connection request message to identify the private network access. Thereafter, the private network proxy gateway forwards the connection request sent by the camera device to the business platform, and the business platform receives the connection request and marks the private network access identifier for the camera device. Thereafter, the business platform returns the connection IP port to the camera device through the private network proxy gateway, so that the camera device logs in to the business platform through the connection IP port.

[0038] When in a public network scenario, the connection request initiated by the camera device does not need to go through the private network proxy gateway, nor does it need the private network proxy gateway to extend the connection request message; at this time, the camera device directly initiates a connection request to the business platform, that is, the camera device wants to obtain the connection IP port from the business platform. The business platform responds to the connection request and directly returns the connection IP port to the camera device. The camera device then connects to the business platform to log in to the business platform.

[0039] When the business platform receives a connection request initiated by a camera device, in order to determine whether the camera device is accessed in a private network scenario or a public network scenario, it only needs to determine whether the connection request message corresponding to the connection request initiated by the camera device carries the private network identifier extended by the private network proxy gateway, and then determine the first access method of the camera device. Through the above steps, the efficiency of identifying the access path of the camera device is improved.

[0040] In some of the embodiments, determining the second access path for client access in step S220 includes: responding to a live broadcast address acquisition request from the client, obtaining an address request message in the live broadcast address acquisition request; the live broadcast address acquisition request is initiated by the client and forwarded through a private network proxy gateway; determining whether the address request message carries a private network identifier; the private network identifier is extended on the address request message by the private network proxy gateway; if the private network identifier is carried, identifying the second access path as private network access; if the private network identifier is not carried, identifying the second access path as public network access.

[0041] Among them, this step mainly involves the access of the client. In the entire system for implementing live broadcast traffic scheduling, in the private network scenario, it includes a business platform, an accessed camera device, a client, and a private network proxy gateway, and the private network proxy gateway is connected to the business platform. When the client wants to watch the live broadcast, it needs to send a live broadcast address acquisition request to the business platform. The live broadcast address acquisition request passes through the private network proxy gateway. At this time, the private network proxy gateway will add an extension header to the live broadcast address acquisition request message to identify the private network access. Afterwards, the private network proxy gateway forwards the live broadcast address acquisition request sent by the client to the business platform. The business platform receives the live broadcast address acquisition request, determines whether the live broadcast address acquisition request carries a private network access identifier, and then determines whether the client is a private network access.

[0042] When in a public network scenario, the live broadcast address acquisition request initiated by the client does not need to pass through the private network proxy gateway, nor does the private network proxy gateway need to extend the live broadcast address acquisition request message; at this time, the client directly initiates a live broadcast address acquisition request to the business platform, and the business platform responds to the live broadcast address acquisition request to determine whether the client has public network access.

[0043] When the business platform receives the live broadcast address acquisition request initiated by the client, in order to determine whether the client is accessing the private network scenario or the public network scenario, it only needs to determine whether the message corresponding to the live broadcast address acquisition request initiated by the client carries the private network identifier extended by the private network proxy gateway, and then determine the client's second access method. Through the above steps, the efficiency of identifying the client's access path is improved.

[0044] In some of the embodiments, step S230 determines the target streaming media according to the first access path and the second access path, including: when the first access path is a private network access and the second access path is a public network access, sending a first streaming media address to the camera device; the first streaming media address includes a streaming media address supported by the private network; receiving a first login success signal sent by the camera device; the first login success signal indicates that the camera device logs in to the first private network streaming media through the first streaming media address; determining the first public network streaming media according to the public network accessed by the client; the load of the first public network streaming media reaches a preset condition; determining the target streaming media according to the first private network streaming media and the first public network streaming media.

[0045] In this embodiment, when both the camera device and the client are connected to the service platform, and it is determined that the camera device is connected through a private network and the client is connected through a public network, the service platform selects a streaming media instance registered in a private network and a streaming media instance registered in a public network respectively. Then, a first streaming media address is sent to the camera device, and the first streaming media address includes a streaming media address supported by the private network. The camera device logs in to the first private network streaming media according to the first streaming media address. The first private network streaming media here is the streaming media instance registered in the private network selected by the service platform. When the camera device logs in successfully, it sends a first login success signal to the service platform; after the service platform obtains the first login success signal sent by the camera device, the service platform points to the first private network streaming media service according to the back-source parameters of the first public network streaming media, and obtains the back-source live broadcast address. The service platform sends the back-source live broadcast address to the client through the private network proxy gateway. Furthermore, the first public network streaming media here includes the public and private network streaming media registered to the service platform.

[0046] Furthermore, after determining the target live broadcast address according to the target streaming media and returning the target live broadcast address to the client, the client's stream pulling strategy and the camera device's stream pushing strategy are determined according to the first access path and the second access path.

[0047] Among them, when the camera device is connected through the private network and the client is connected through the public network, after the client receives the back-source live broadcast address sent by the business platform, it pulls the stream to the public private network streaming media; the public private network streaming media parses the back-source live broadcast address and obtains the back-source parameters, and then the public private network streaming media pulls the stream back to the private network streaming media. The private network streaming media sends a push stream instruction to the camera device to enable the camera device to push the stream to the private network streaming media. Afterwards, the private network streaming media pushes the audio and video stream to the public private network streaming media, and the public private network streaming media transfers the audio and video stream to the client.

[0048] In some of the embodiments, the target streaming media includes a second public network streaming media, and step S230 determines the target streaming media based on the first access path and the second access path, including: when the first access path and the second access path are both public network access, sending the second streaming media address to the camera device; the second streaming media address includes a streaming media address supported by both the public network and the private network; receiving a second login success signal sent by the camera device; the second login success signal indicates that the camera device logs in to the second public network streaming media through the second streaming media address.

[0049] In this embodiment, when it is determined that both the client and the camera device are accessed through the public network, the service platform takes a streaming media instance from the streaming media instances accessed through the public and private networks, and then sends the second streaming media address of the public and private network streaming media instance to the camera device. After receiving the second streaming media address, the camera device logs in the streaming media to the public and private network streaming media. After the login is successful, the camera device sends a second login success signal to the service platform. After the service platform receives the second login success signal, the service platform sets the public network live broadcast address and sends the public network live broadcast address to the client.

[0050] Furthermore, after determining the target live broadcast address according to the target streaming media and returning the target live broadcast address to the client, the client's stream pulling strategy and the camera device's stream pushing strategy are determined according to the first access path and the second access path.

[0051] Among them, when the client and the camera device are both accessed through the public network, after the client receives the public network live broadcast address, the client pulls the stream to the public private network streaming media, and then the public private network streaming media sends a streaming instruction to the camera device, so that the camera device pushes the stream to the public private network streaming media, and forwards the audio and video stream of the camera device to the client through the private network streaming media.

[0052] In some of the embodiments, the target streaming media includes a second private network streaming media, and step S230 determines the target streaming media based on the first access path and the second access path, including: when the first access path and the second access path are both private network access, sending a third streaming media address to the camera device; the third streaming media address includes a streaming media address supported by the private network; receiving a third login success signal sent by the camera device; the third login success signal indicates that the camera device logs in to the second private network streaming media through the third streaming media address.

[0053] In this embodiment, when it is determined that both the first access path and the second access path are private network access, the service platform selects a third streaming media from the streaming media instance of the private network access, and then sends the third streaming media address, i.e., the private network streaming media address, to the camera device. After the camera device receives the private network streaming media address, it logs in to the private network streaming media. When the camera device logs in successfully, it returns a third login success signal to the service platform. The service platform receives the third login success signal sent by the camera device and groups a private network live broadcast address according to the private network streaming media. The service platform then sends the private network live broadcast address to the client through the private network proxy gateway.

[0054] Furthermore, after determining the target live broadcast address according to the target streaming media and returning the target live broadcast address to the client, the client's stream pulling strategy and the camera device's stream pushing strategy are determined according to the first access path and the second access path.

[0055] Among them, when the client and the camera device are both connected to the private network, after the client receives the private network live broadcast address sent by the business platform, it pulls the stream to the private network streaming media, and then the private network streaming media sends a push stream instruction to the camera device. After receiving the push stream instruction, the camera device pushes the audio and video stream to the private network streaming media, and finally the private network streaming media converts the audio and video stream to the client.

[0056] In one possible embodiment, when the client is accessed through a private network and the camera device is accessed through a public network, an error is reported because the client cannot directly access the public network streaming media pushed by the camera device.

[0057] Through the different network types accessed by the above-mentioned clients and cameras, different streaming media access methods are obtained, and different push and pull strategies are used to facilitate the flow of traffic within the private network. At the same time, it also has the ability to broadcast live on the public network. While reducing traffic costs, it reduces the port exposure of streaming media deployed in the private network, thereby reducing security risks.

[0058] The present embodiment is described and illustrated by means of specific examples below.

[0059] The video equipment includes devices such as cameras that can shoot audio and video and are connected to the business platform. Here, the video equipment is a camera as an example. Figure 3 This is a timing diagram of streaming media access and camera access provided by this specific embodiment. Figure 3 , the steps of streaming media access include: private network streaming media is registered to the business platform with a private network identifier; public private network streaming media is registered to the business platform with a public network identifier. Among them, the public network cannot access private network streaming media, but can access public private network streaming media. Public private network streaming media is in the private network. Camera access is divided into private network scenarios and public network scenarios. In the private network scenario, the camera obtains the TCP long connection IP port from the business platform, and the message passes through the private network proxy gateway in the private network, such as the nginx proxy gateway. The nginx proxy gateway adds the extension header XT:privNet to the request HTTP message header to identify the private network access. Thereafter, the nginx proxy gateway forwards the camera's request to obtain the long connection IP port to the business platform proxy; the business platform marks the private network access identifier for the camera, and returns the TCP long connection IP and port to the camera through the nginx proxy gateway. The camera uses a TCP long connection to the business platform and logs in to the business platform. In the public network scenario, first, the camera obtains the TCP long connection IP port from the business platform, and the business platform returns the TCP long connection IP and port to the camera. The camera uses a TCP long connection to the business platform and logs in to the business platform. Here, the camera obtains the TCP long connection IP port from the business platform, that is, the camera device mentioned in the above embodiment sends a connection request to the business platform.

[0060] Figure 4This is a timing diagram for the live broadcast scenario of the client private network provided by this specific embodiment. Figure 4 In the client private network live broadcast scenario, the client obtains the private network access camera live broadcast address from the business platform through a private network proxy gateway, such as an nginx proxy gateway, that is, in the aforementioned embodiment, the client initiates a live broadcast address acquisition request to the business platform through a private network proxy gateway. Thereafter, the private network proxy gateway extends the message corresponding to the live broadcast address acquisition request; exemplarily, the nginx proxy gateway adds an extension header XT:privNet to the request HTTP message header to identify the private network access. Then the nginx proxy gateway forwards the live broadcast address acquisition request to the business platform proxy. After receiving the live broadcast address acquisition request from the client, the business platform determines whether the client is private network accessed and whether the camera is private network accessed. If the camera is public network accessed, an error message is returned to the client, and no other steps are executed. If the camera is private network accessed, the business platform takes a streaming media instance with the smallest load from the streaming media instances accessed by the private network, and then sends the private network streaming media address to the camera. The camera logs in to the private network streaming media according to the private network streaming media address, and returns a login success message to the business platform after the login is successful. After receiving the successful login message, the business platform sets up a private network live broadcast address and returns the private network live broadcast address to the client through the nginx proxy gateway. After receiving the private network live broadcast address, the client pulls the stream to the private network streaming media. The private network streaming media sends a push stream instruction to the camera, so that the camera pushes the stream to the private network streaming media, and finally the private network streaming media transfers the audio and video stream to the client.

[0061] Figure 5 This is a timing diagram of the public network access of the camera device in the public network live broadcast scenario provided by the client in this specific embodiment. Figure 5 In the scenario of live broadcast on the client's public network, the client sends a request to the business platform to obtain the live broadcast address; after receiving the request, the business platform determines that the client is connected to the public network, and determines whether the camera is connected to the public network. When the camera is connected to the public network, the business platform takes a streaming media instance with the smallest load from the streaming media instances connected to the public network, and then sends a streaming media address that supports both public and private networks to the camera. The camera logs in to the provincial streaming media of the public and private networks according to the streaming media address, and returns a successful login response message to the business platform after successful login. Afterwards, the business platform assembles the public network live broadcast address and returns the live broadcast address to the client. The client pulls the stream from the provincial streaming media of the public and private networks according to the live broadcast address; the provincial streaming media of the public and private networks sends a push stream instruction to the camera, and the camera pushes the stream to the provincial streaming media of the public and private networks, and finally the private network streaming client converts the audio and video stream.

[0062] Figure 6 This is a timing diagram of the camera device accessing the private network in the live broadcast scenario of the client on the public network provided by this specific embodiment. Figure 6In the scenario of live broadcast on the client's public network, the client sends a request to the business platform to obtain the live broadcast address; after receiving the request, the business platform determines that the client is connected to the public network, and determines whether the camera is connected to the public network. When the camera is connected to the private network, the business platform takes a streaming media instance with the smallest load from the streaming media instances connected to the private network; at the same time, it takes a streaming media instance with the smallest load from the streaming media instances connected to the public network, and then the business platform sends the private network streaming media address to the camera; the camera logs in to the private network streaming media according to the private network streaming media address; and returns a successful login response message to the business platform.

[0063] Afterwards, the business platform returns the source live broadcast address based on the public network streaming media and private network streaming media group, for example: "rtsp: / / 215.148.12.4:8522 / app / stream orgin=aes256(rtsp: / / 192.168.143.12:8522 / app / stream After the player obtains the source live broadcast address, it first accesses the streaming media accessed by the public network (215.148.12.4), and then points to the private network streaming media service through the source parameter, i.e., the origin parameter, in the streaming media to obtain the source live broadcast address. The player is similar to a VLC player or a monitoring client with a player. The source parameter is the string after the Origin identifier encrypts the rtsp live broadcast address.

[0064] The business platform returns the source live broadcast address to the client through the nginx proxy gateway. The client pulls the stream from the public and private network provincial streaming media. The public and private network streaming media parses the live broadcast address to obtain the source parameters and pulls the stream from the private network streaming media. Afterwards, the private network streaming media sends a push stream instruction to the camera. The camera pushes the stream to the private network streaming media according to the push stream instruction. The private network streaming media pushes the audio and video stream to the public and private network provincial streaming media, and the public and private network provincial streaming media transfers the audio and video stream to the client.

[0065] Above Figures 3 to 6 The devices that appear in the figure can be understood as camera devices, and the figures all take cameras as examples.

[0066] In the prior art, clients and cameras access streaming media services through the public network and push and pull streams to the streaming media, thus generating a large traffic cost. In order to reduce traffic costs, this embodiment, based on a public and private network hybrid environment, schedules different types of streaming media according to the client and camera access methods to achieve traffic flow within the private network, while also having the ability to broadcast live on the public network, thereby reducing traffic costs. At the same time, according to different scheduling strategies, the streaming media deployed in the private network does not need to open a public network port for exposure, thereby reducing the risk of being attacked.

[0067] In this application, a streaming media service is deployed on the public network, and a public network identifier and a business platform registration address are set. A streaming media service is deployed in a private network, and a private network identifier and a business platform registration address are set. The streaming media service of the public network and the streaming media service of the private network belong to the same network and can communicate with each other. The streaming media service of the public network has a public network IP and can provide external access. The streaming media of the private network only has an intranet IP and cannot be accessed by the external network. A certain number of cameras are connected to both the private network and the public network, and the business platform is connected. The user opens the client and clicks the camera icon. At this time, the client initiates a live broadcast address request to the business platform through the nginx proxy. The business platform determines whether the private network is accessed through the HTTP extension header when the client and the camera are accessed. If the client is accessed to the private network and the camera is accessed to the public network, an error is reported because the client cannot directly access the public network streaming media pushed by the camera. If the client is accessed to the private network and the camera is accessed to the private network, the business platform allows the camera to log in to the streaming media of the private network, and at the same time points to the live broadcast address of the private network streaming media, and returns it to the client. After the client obtains the live broadcast address, it obtains the video stream from the camera through the private network streaming media. If the client is connected to the public network and the camera is connected to the private network, the service platform allows the camera to log in to the private network's streaming media, and at the same time takes the public network streaming media with the smallest load, and sets the live broadcast address pointing to the public network streaming media. The live broadcast address carries the back-source parameter, through which the camera video stream can be obtained by going back to the private network streaming media. After the service platform sets the back-source address, it returns it to the client. After the client obtains the live broadcast address, it initiates a live broadcast request to the public network streaming media. The public network streaming media interprets the live broadcast address, obtains the back-source parameter, and uses the parameter to go back to the private network streaming media to obtain the camera video stream. If the client is connected to the public network and the camera is connected to the public network, the service platform allows the camera to log in to the public network's streaming media, and at the same time sets the live broadcast address pointing to the public network streaming media, and returns it to the client. After the client obtains the live broadcast address, it obtains the video stream from the camera through the public network streaming media.

[0068] In a preferred embodiment, reference Figure 7 , Figure 7 Schematic diagram of the live broadcast traffic scheduling provided by this specific embodiment. Figure 7 The network type accessed by the device in the city is a private network. The private network stream of the camera device is sent to the streaming media in the city. At this time, the client accessed in the city is a private network type. At this time, the private network stream is sent directly to the client. At the same time, the streaming media in the city sends the private network stream to the media proxy service in the province. Through the media proxy service, the public network stream is forwarded to the client accessed as a public network type, thereby providing different streaming media access methods and outflow methods, reducing traffic costs and security risks.

[0069] In this embodiment, a live broadcast traffic scheduling device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware of predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0070] Figure 8 is a structural block diagram of the live broadcast traffic scheduling device of this embodiment. Figure 8 As shown, the device includes: a request response module 10, a streaming media determination module 20 and an address sending module 30.

[0071] The request response module 10 is used to determine a first access path for the camera device to access in response to a connection request initiated by the camera device; and to determine a second access path for the client to access in response to a live broadcast address acquisition request initiated by the client; The streaming media determination module 20 is used to determine the target streaming media according to the first access path and the second access path; the target streaming media includes the streaming media registered from the private network to the service platform; The address sending module 30 is used to determine the target live broadcast address according to the target streaming media, and return the target live broadcast address to the client, so that the client can obtain the video stream of the camera device according to the target live broadcast address.

[0072] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0073] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0074] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0075] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: S1, in response to a connection request initiated by a camera device, determining a first access path for the camera device to access.

[0076] S2, in response to the live broadcast address acquisition request initiated by the client, determining a second access path for the client to access.

[0077] S3, determining target streaming media according to the first access path and the second access path; the target streaming media includes streaming media registered from the private network to the service platform.

[0078] S4, determining a target live broadcast address according to the target streaming media, and returning the target live broadcast address to the client, so that the client obtains the video stream of the camera device according to the target live broadcast address.

[0079] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0080] In addition, in combination with the live streaming traffic scheduling method provided in the above embodiments, a storage medium may also be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any live streaming traffic scheduling method in the above embodiments is implemented.

[0081] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0082] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0083] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0084] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A live broadcast traffic scheduling method, characterized in that: Applied to a business platform, the business platform is connected to a client and a camera device respectively; the method comprises: In response to a connection request initiated by a camera device, determining a first access path for accessing the camera device; In response to a live broadcast address acquisition request initiated by a client, determining a second access path accessed by the client; Determine a target streaming media according to the first access path and the second access path; the target streaming media includes streaming media registered from a private network to a service platform; A target live broadcast address is determined according to the target streaming media, and the target live broadcast address is returned to the client, so that the client obtains the video stream of the camera device according to the target live broadcast address.

2. The live broadcast traffic scheduling method according to claim 1, characterized in that: The step of determining, in response to a connection request initiated by a camera device, a first access path for accessing the camera device comprises: In response to a connection request initiated by a camera device, a connection request message of the connection request is obtained; the connection request is initiated by the camera device and forwarded through a private network proxy gateway; Determine whether the connection request message carries a private network identifier; the private network identifier is extended by the private network proxy gateway on the connection request message; If it carries a private network identifier, it indicates that the first access path is private network access; if it does not carry a private network identifier, it indicates that the first access path is public network access.

3. The live broadcast traffic scheduling method according to claim 2, characterized in that: The determining of the second access path for the client to access comprises: In response to the live broadcast address acquisition request of the client, an address request message in the live broadcast address acquisition request is obtained; the live broadcast address acquisition request is initiated by the client and forwarded through the private network proxy gateway; Determine whether the address request message carries a private network identifier; the private network identifier is extended by the private network proxy gateway on the address request message; If the private network identifier is carried, the second access path is identified as private network access; if the private network identifier is not carried, the second access path is identified as public network access.

4. The live broadcast traffic scheduling method according to any one of claims 1 to 3, characterized in that: Determining target streaming media according to the first access path and the second access path includes: When the first access path is a private network access and the second access path is a public network access, sending a first streaming media address to the camera device; the first streaming media address includes a streaming media address supported by the private network; receiving a first successful login signal sent by the camera device; the first successful login signal indicates that the camera device logs in to the first private network streaming media through the first streaming media address; Determining a first public network streaming media according to the public network accessed by the client; the load of the first public network streaming media reaches a preset condition; The target streaming media is determined according to the first private network streaming media and the first public network streaming media.

5. The live broadcast traffic scheduling method according to claim 4 is characterized in that: The target streaming media includes a second public network streaming media, and determining the target streaming media according to the first access path and the second access path includes: When both the first access path and the second access path are public network access, sending a second streaming media address to the camera device; the second streaming media address includes a streaming media address supported by both the public network and the private network; A second login success signal sent by the camera device is received; the second login success signal indicates that the camera device logs in to the second public network streaming media through the second streaming media address.

6. The live broadcast traffic scheduling method according to claim 4, characterized in that: The target streaming media includes a second private network streaming media, and determining the target streaming media according to the first access path and the second access path includes: When both the first access path and the second access path are private network access, sending a third streaming media address to the camera device; the third streaming media address includes a streaming media address supported by the private network; Receive a third login success signal sent by the camera device; the third login success signal indicates that the camera device logs in to the second private network streaming media through the third streaming media address.

7. The live broadcast traffic scheduling method according to claim 1, characterized in that: After determining the target live broadcast address according to the target streaming media and returning the target live broadcast address to the client, the method further includes: According to the first access path and the second access path, a stream pulling strategy of the client and a stream pushing strategy of the camera device are determined.

8. A live broadcast traffic scheduling device, characterized in that: The device comprises: a request response module, a streaming media determination module and an address sending module; The request response module is used to determine a first access path for accessing the camera device in response to a connection request initiated by the camera device; and to determine a second access path for accessing the client in response to a live broadcast address acquisition request initiated by the client; The streaming media determination module is used to determine the target streaming media according to the first access path and the second access path; the target streaming media includes the streaming media registered from the private network to the service platform; The address sending module is used to determine a target live broadcast address according to the target streaming media, and return the target live broadcast address to the client, so that the client can obtain the video stream of the camera device according to the target live broadcast address.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the live broadcast traffic scheduling method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the live broadcast traffic scheduling method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and system for passing media through NAT by using video monitoring system

    CN101729862A

  • Method and system for acquiring network video

    CN104683736A

  • Data transmission method and device

    CN105978926A

  • Cross-network streaming media data transmission system and method

    CN109450911A

  • Method for determining media stream transmission mode and media stream transmission system

    CN112087596A