Streaming media pushing method, streaming media pushing system and storage medium

By matching and allocating streaming media forwarding servers through live migration load balancers, the problem of high network security risks caused by excessive network exposure in streaming media technology is solved, and a safer streaming media push process is achieved.

CN118694996AInactive Publication Date: 2024-09-24E SURFING VISION TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411179990.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Due to too many network exposures in existing streaming media technology, network security risks are too high and there is a lack of effective solutions.

Method used

The live migration load balancer is used to match client requests to the streaming media forwarding server with the smallest load, and issue push streaming instructions to the streaming device through the server, reducing network exposure and network security risks.

Benefits of technology

It effectively reduces network exposure, reduces network security risks, and improves system security and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694996A
    Figure CN118694996A
Patent Text Reader

Abstract

The invention relates to a streaming media pushing method, a streaming media pushing system and a storage medium, and the streaming media pushing method comprises the steps: obtaining a client request; obtaining streaming media forwarding server port information from the scheduling service according to a client request, and sending the streaming media forwarding server port information to the client; receiving a live broadcast request initiated by a client according to the port information of the streaming media forwarding server through the thermal migration load balancer; wherein the live broadcast request comprises a plug flow equipment identifier; searching a streaming media forwarding server corresponding to a stream pushing equipment identifier based on the stream pushing equipment identifier in the live broadcast request; and issuing a stream pushing instruction to a stream pushing device through the corresponding streaming media forwarding server, so that the stream pushing device pushes the media data stream in the streaming media forwarding server to an output layer of the client. According to the invention, the problem that the network security risk is too high due to too many network exposure surfaces is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of streaming media, and in particular to a streaming media push method, a streaming media push system and a storage medium. Background Art

[0002] At present, with the rapid development of computer networks and multimedia technologies and the continuous expansion of the capacity and bandwidth of the Internet, the transmission of digital multimedia information through the network has gradually become an important technology in the field of information processing, namely streaming media technology. Streaming media technology compresses and encodes audio and video files and stores them in the server, so that clients can upload, download and watch online. Streaming media technology is widely used in video live broadcast, video conferencing, online teaching, and remote monitoring systems. With the development of video monitoring, it has become a trend to migrate monitoring capabilities to the cloud, and streaming media services, as an important part of video monitoring systems, are also deployed on the cloud. Each cloud host can deploy one or more streaming media service instances. The number of host deployment instances is determined by the streaming media services implemented using different frameworks. For example, if the streaming media service is implemented in a single-threaded coroutine manner, more streaming media instances need to be deployed. Each streaming media instance needs to correspond to a CPU core. The use of multi-core performance will lead to the problem of too many network exposure surfaces, that is, in a public network environment, the streaming media host program exposes IP and ports, so that external programs can communicate with the streaming media host program through the IP and port. Excessive exposure of streaming media host IP and ports leads to excessive network security risks.

[0003] There is currently no effective solution to the problem in related technologies that network security risks are too high due to too many network exposure surfaces.

[0004] Beneficial effects: This application connects the camera to the streaming media forwarding server with the smallest load through a hot migration load balancer, thereby reducing the network exposure of the streaming media forwarding server, and then obtains the client's request through the hot migration load balancer, matches the specific streaming media forwarding server according to the client's request, and sends a push stream instruction to the camera through the matched streaming media forwarding server, so that the client obtains the media stream. This reduces the network exposure and reduces network security risks. Summary of the invention

[0005] In this embodiment, a streaming media push method, a streaming media push system and a storage medium are provided to solve the problem in the related art that the network security risk is too high due to too many network exposure surfaces.

[0006] In a first aspect, a streaming media push method is provided in this embodiment, including: Get client request; Obtain streaming media forwarding server port information from the scheduling server according to the client request, and send the streaming media forwarding server port information to the client; The live broadcast request initiated by the client according to the port information of the streaming media forwarding server is received through the hot migration load balancer; wherein the live broadcast request includes the streaming device identifier; Based on the streaming device identifier in the live broadcast request, the streaming media forwarding server corresponding to the streaming device identifier is searched; wherein the streaming device identifier is a streaming device registered in advance to keep alive in the hot migration load balancer, and is transmitted and stored in the streaming media forwarding server through the hot migration load balancer; The corresponding streaming media forwarding server sends a streaming instruction to the streaming device, so that the streaming device pushes the media data stream in the streaming media forwarding server to the output layer of the client.

[0007] In some of the embodiments, before searching for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request, the method further includes: Register each streaming media forwarding server to the hot migration load balancer to keep it alive.

[0008] In some embodiments, after registering each streaming media forwarding server to keep alive with the hot migration load balancer, the method further includes: Register the hot migration load balancer to the scheduling server to keep it alive.

[0009] In some of the embodiments, before searching for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request, the method further includes: Register the streaming device to the signaling server to keep it alive.

[0010] In some of the embodiments, before searching for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request, the method further includes: By using the load balancing strategy of the hot migration load balancer, the streaming device connection is migrated to the streaming media forwarding server with the smallest load.

[0011] In some of the embodiments, searching for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request includes: Use the streaming device ID in the live broadcast request to find the streaming media forwarding server with the smallest load.

[0012] In some of the embodiments, obtaining streaming media forwarding server port information from a scheduling service according to a client request includes: Based on the client request, obtain the port information of the hot migration load balancer from the scheduling server; Get the streaming media forwarding server port information based on the port information of the hot migration load balancer.

[0013] In some of the embodiments, the output layer includes an RTMP service and an HLS service, wherein in the RTMP service, the RTMP protocol is converged through a layered architecture and port multiplexing, and in the HLS service, the port is converged using a domain name method.

[0014] In a second aspect, a streaming media push system is provided in this embodiment, which is used for the streaming media push method in the first aspect. The streaming media push system includes: a client, an access layer, a push device, and an output layer, wherein: The client is used to initiate customer requests; The access layer includes a hot migration load balancer, a streaming media forwarding server, and a scheduling service; the access layer is used to receive a live broadcast request initiated by a client according to the port information of the streaming media forwarding server, search for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request, and send a streaming instruction to the streaming device through the corresponding streaming media forwarding server; The streaming device is used to receive the streaming instruction sent by the streaming media forwarding server and push the media data stream in the streaming media forwarding server to the output layer of the client; The output layer is used to receive the media data stream pushed by the streaming media forwarding server.

[0015] In a third 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 streaming media push method described in the first aspect is implemented.

[0016] Compared with the related art, the streaming media push method provided in this embodiment obtains the client request; obtains the streaming media forwarding server port information from the scheduling service according to the client request, and sends the streaming media forwarding server port information to the client; receives the live broadcast request initiated by the client according to the streaming media forwarding server port information through the hot migration load balancer; wherein the live broadcast request contains the streaming device identifier; searches for the streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request; wherein the streaming device identifier is pre-registered to the hot migration load balancer for the streaming device to keep it alive, and is transmitted and stored in the streaming media forwarding server through the hot migration load balancer; and sends a streaming instruction to the streaming device through the corresponding streaming media forwarding server, so that the streaming device pushes the media data stream in the streaming media forwarding server to the output layer of the client. The problem of excessive network security risks due to too many network exposures is solved.

[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 This is a hardware structure block diagram of a terminal of the streaming media push method of this embodiment.

[0019] Figure 2 This is a flow chart of the streaming media push method of this embodiment.

[0020] Figure 3 This is a flow chart of another streaming media push method of this embodiment.

[0021] Figure 4 This is a structural block diagram of the streaming media push system of this embodiment. DETAILED DESCRIPTION

[0022] 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.

[0023] 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.

[0024] 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 streaming media push method of this embodiment. 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.

[0025] 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 streaming media push 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.

[0026] 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.

[0027] In this embodiment, a streaming media push method is provided. Figure 2 is a flow chart of the streaming media push method of this embodiment. Figure 2 As shown, the process includes the following steps: Step S201, obtaining a client request; obtaining streaming media forwarding server port information from a scheduling server according to the client request, and sending the streaming media forwarding server port information to the client.

[0028] Specifically, streaming media push mainly refers to sending the video source to the server during streaming live broadcast or video transmission, which includes using cameras, capture cards and other devices to obtain video signals and converting them into digital data, and then compressing and encoding the collected video data. Commonly used encoding standards include H.264, H.265, etc., and finally transmitting the encoded video data to the target server through the network. The protocols used may include Real-Time Streaming Protocol (RTSP), Real-Time Messaging Protocol (RTMP), User Datagram Protocol (UDP), Real-time Transport Protocol (RTP), etc.

[0029] When a client initiates a streaming request, the streaming media streaming system obtains the client's request and obtains the streaming media server port information through the scheduling server in the streaming media streaming system. The scheduling server is a service that manages and controls the transmission and distribution of media data in streaming media. It is responsible for processing media stream requests, distribution, optimization and monitoring to ensure high-quality streaming media transmission and playback experience. The streaming media server port information includes the IP of the streaming media forwarding server, the corresponding streaming device identifier and the RTSP live broadcast address. The scheduling service forwards the obtained streaming media forwarding server port information to the client.

[0030] Step S202: receiving a live broadcast request initiated by the client according to the port information of the streaming media forwarding server through the hot migration load balancer; wherein the live broadcast request includes a streaming device identifier.

[0031] A hot migration load balancer refers to a technology that can migrate a running virtual machine from one physical server to another without interrupting the service, while maintaining the load balancing function. This not only achieves load balancing, but also ensures high availability and business continuity of services during hardware maintenance or upgrades. Through a hot migration load balancer, the overall processing power of the system can be improved, throughput can be increased, network data processing capabilities can be enhanced, and network flexibility and availability can be improved. The streaming device can be a camera, capture card, or other tool for acquiring video signals. In this embodiment, a camera is used as an example, but it cannot be understood as a limitation of the streaming device in this embodiment. This embodiment does not make specific limitations on this and can be selected according to actual conditions.

[0032] After the client receives the port information of the streaming media forwarding server, it initiates an RTSP live broadcast request according to the provided live broadcast address. The RTSP live broadcast request initiated by the client is received by the hot migration load balancer. The hot migration load balancer checks the socket buffer content related to the request, parses the detailed information of the client request, and parses the live broadcast address in the RTSP live broadcast request. This address contains the location information of the streaming media forwarding server, such as the server's IP address, port number, and the unique identifier of the streaming device.

[0033] Step S203, searching for a streaming media forwarding server corresponding to the streaming media forwarding device identifier based on the streaming media forwarding device identifier in the live broadcast request; wherein the streaming media forwarding device identifier is pre-registered to keep alive with the hot migration load balancer, and is transmitted and stored in the streaming media forwarding server through the hot migration load balancer.

[0034] Specifically, the streaming device is connected to the hot migration load balancer, the hot migration load balancer obtains the identification of the streaming device, and stores the identification of the streaming device in the streaming media forwarding server. When the hot migration load balancer receives the RTSP live broadcast request initiated by the client and parses it to obtain the streaming device identification, it searches for the streaming media forwarding server corresponding to the streaming device identification through a mapping relationship based on the parsed streaming device identification, and performs hot migration to migrate the client connection to the streaming media forwarding server.

[0035] Step S204: Send a streaming instruction to the streaming device through the corresponding streaming media forwarding server, so that the streaming device pushes the media data stream in the streaming media forwarding server to the output layer of the client.

[0036] Specifically, the streaming media forwarding server is connected to the client, and after receiving the RTSP live broadcast request from the client, it sends a streaming instruction to the streaming device. The streaming device converts the live broadcast or video source in the streaming media forwarding server into an RTSP stream and sends it to the output layer of the client.

[0037] Through the above steps S201 to S204, the client request is obtained; according to the client request, the streaming media forwarding server port information is obtained from the scheduling service, and the streaming media forwarding server port information is sent to the client; through the hot migration load balancer, the live broadcast request initiated by the client according to the streaming media forwarding server port information is received; wherein the live broadcast request includes a streaming device identifier; based on the streaming device identifier in the live broadcast request, the streaming media forwarding server corresponding to the streaming device identifier is searched; wherein the streaming device identifier is pre-registered to the hot migration load balancer for the streaming device to keep it alive, and is transmitted and stored in the streaming media forwarding server through the hot migration load balancer; a streaming instruction is issued to the streaming device through the corresponding streaming media forwarding server, so that the streaming device pushes the media data stream in the streaming media forwarding server to the output layer of the client. Compared with the prior art that exposes all streaming media forwarding server interfaces, this embodiment collects streaming device identifiers through a hot migration load balancer and stores them in a streaming media forwarding server, then receives a client request through the hot migration load balancer, obtains a streaming device identifier based on the live broadcast address in the client request, and then matches the corresponding streaming media forwarding server based on the streaming device identifier, and sends a streaming instruction to the streaming device through the matched streaming media forwarding server, so that the client obtains the media stream. Among them, the client and the streaming media forwarding server are connected through a hot migration load balancer, which reduces the network exposure and reduces the network security risk.

[0038] In some of the embodiments, before searching for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request, the method further includes: Register each streaming media forwarding server to the hot migration load balancer to keep it alive.

[0039] Specifically, the streaming media forwarding server stores streaming media instances, which usually refer to specific application cases or scenarios in the application of streaming media technology. Streaming media technology allows multimedia data such as audio and video to be transmitted and played in real time over the Internet without the need for users to download the entire file. For example, (1) Online video platforms: such as Netflix, HBOMax, Hulu, Amazon Prime Video, Apple TV, Tencent Video, and Disney Plus, etc. These services provide on-demand services for movies and TV shows, allowing users to watch their favorite content at any time. (2) Live streaming: including sports events, award ceremonies, global conferences, product launches, video game experiences, and real-time news reports, etc., which allow viewers to experience ongoing events in real time. (3) Video game live streaming: platforms such as Twitch and YouTube allow video game enthusiasts to broadcast their game play to live viewers, and comment and interact with the audience in real time. (4) Music and podcast streaming: providing audio content such as music, podcasts, etc., users can enjoy music or listen to podcast programs online. (5) Distance education and corporate training: using streaming media technology for online education and internal corporate training to improve resource utilization efficiency. (6) Real-time video conferencing: Remote video conferencing enabled by streaming media technology enables participants in different locations to communicate in real time.

[0040] The streaming media forwarding server registers with the hot migration load balancer to keep alive. This is mainly in the cloud computing environment. During the operation of the streaming media instance (such as video on demand or live broadcast service), in order to achieve high availability, load balancing or resource optimization, it needs to be dynamically migrated to different physical or virtual servers. This process is managed by the hot migration balancer (or hot migration service), which is responsible for monitoring the running status of the streaming media instance and triggering the migration operation when necessary. The streaming media forwarding server registers with the hot migration load balancer mainly because after the streaming media instance is started or restarted, it needs to report its status and information to the hot migration load balancer to ensure that it is included in the hot migration consideration. The streaming media forwarding server keeps alive to the hot migration balancer means that the streaming media instance needs to send heartbeats or other keep alive signals regularly to indicate its continuous operation status, so that the hot migration load balancer can make resource scheduling and load balancing decisions based on this information to ensure the stability and reliability of the service. Specifically, the hot migration load balancer will decide whether to migrate the streaming media instance to other servers based on factors such as the current system load, resource usage, and fault detection. During the migration process, hot migration technology can ensure service continuity, that is, users will not experience service interruption or quality degradation during the migration process.

[0041] After each streaming media forwarding server registers to keep alive with the hot migration load balancer, it reports the load and brings the Unix domain socket path. Each process in the streaming media forwarding server uses the Unix domain socket (uds) for listening. When the hot migration load balancer sends the client's socket to the streaming media forwarding server, the streaming media forwarding server receives the accept request and can receive the socket through the read method. This socket can also be used to communicate with the client later.

[0042] In another embodiment, after registering each streaming media forwarding server to keep alive with the hot migration load balancer, the method further includes: Register the hot migration load balancer to the scheduling server to keep it alive.

[0043] Specifically, the hot migration load balancer registers keepalive with the scheduling service means that in a virtualized environment, the hot migration service needs to register its status with the cluster scheduler (scheduling service) to ensure that the scheduler understands its availability and performance indicators. In this way, when making resource scheduling decisions, the scheduling service can take into account the status of the hot migration service to make reasonable resource allocation and load balancing. After registering keepalive, the load is reported, and the registration information includes the host IP and port information of the hot migration load balancer.

[0044] In one embodiment, before searching for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request, the method further includes: Register the streaming device to the signaling server to keep it alive.

[0045] Specifically, the camera is used as the streaming device for explanation in this embodiment. Registration phase: After the camera is started or restarted, it needs to send a registration request to the signaling server to join the video surveillance platform. During the registration process, the camera needs to provide necessary authentication information, such as user name and password, so that the server can confirm its identity. After successful registration, the camera will receive a registration validity period, during which the camera is considered active; Keep-alive phase: In order to ensure that the camera is continuously online and can respond to instructions from the signaling server in a timely manner, the camera needs to send keep-alive messages regularly during the registration validity period. Keep-alive messages can be implemented by sending a special signaling message, such as a MESSAGE request. These messages will contain device status information and are sent at a certain time interval, which is called a heartbeat cycle. By registering for keep-alive with the signaling server, the availability of the streaming device is ensured.

[0046] In another embodiment, before searching for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request, the method further includes: By using the load balancing strategy of the hot migration load balancer, the streaming device connection is migrated to the streaming media forwarding server with the smallest load.

[0047] Specifically, after the streaming device is connected to the hot migration load balancer, the hot migration load balancer adopts a load balancing strategy to determine the streaming media forwarding server with the smallest current load based on the load conditions of all streaming media forwarding servers monitored in real time, and connects the streaming device to the streaming media forwarding server with the smallest current load. By connecting the streaming device to the streaming media forwarding server with the smallest current load, the high availability and smoothness of the streaming media service can be ensured, while maximizing resource utilization, avoiding service interruptions or quality degradation caused by server overload, and thus providing more stable and reliable services.

[0048] In one of the embodiments, searching for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request includes: Use the streaming device ID in the live broadcast request to find the streaming media forwarding server with the smallest load.

[0049] Because the streaming device has been connected to the streaming media forwarding server with the least load through the hot migration load balancer before matching according to the streaming device identifier, the streaming media forwarding server with the least load can be directly found according to the mapping according to the streaming device identifier in the live broadcast request, and the client can be connected to the streaming media forwarding server with the least load.

[0050] In another embodiment, obtaining streaming media forwarding server port information from a scheduling server according to a client request includes: Based on the client request, the port information of the hot migration load balancer is obtained from the scheduling server; and the port information of the streaming media forwarding server is obtained according to the port information of the hot migration load balancer.

[0051] Specifically, after the signaling server receives the request initiated by the client, the hot migration load balancer registers and keeps alive with the calling server in advance, and the signaling server obtains the port information of the hot migration load balancer from the calling server, wherein the port information of the hot migration load balancer includes the IP address of the hot migration load balancer, the access port of the streaming device, the RTSP port, etc. Since each streaming media forwarding server registers and keeps alive with the hot migration load balancer in advance, the hot migration load balancer contains the port information of each streaming media forwarding server, and the streaming device access port and RTSP port in the port information of the hot migration load balancer are combined to obtain the streaming media forwarding server port information, and sent to the client, and the client initiates a TRSP live broadcast request.

[0052] In one embodiment, the output layer includes an RTMP service and an HLS service, wherein in the RTMP service, the RTMP protocol is converged through a layered architecture and port multiplexing, and in the HLS service, the port is converged using a domain name method.

[0053] Specifically, the client obtains the data stream sent by the streaming media forwarding server through the output layer, wherein the output layer includes the Real-Time Messaging Protocol (TRMP service for short) and the Hypertext Live Streaming (HLS service for short). In the RTMP service, since the message snooping method cannot snoop the RTMP address information through the first message, the port is converged through a layered architecture and port multiplexing. Among them, the layered architecture can divide the network into different layers, each layer is responsible for different functions, such as the core layer is responsible for high-speed data transmission and traffic exchange, the aggregation layer is responsible for connecting different access layer subnets and performing traffic aggregation and screening, and the access layer is responsible for the access of user devices and local traffic processing. Through this layering, network traffic can be better managed and optimized, and the performance and scalability of the network can be improved. Port multiplexing technology allows multiple applications or services to share the same port, and different logical channels or session identifiers are used to distinguish data packets. In this embodiment, multiple RTMP service ports are merged into one port for transmission, which can reduce the number of ports required, simplify network management and configuration, and improve resource utilization.

[0054] In the HLS service, the domain name is used to converge the port. The HLS protocol transmits the media stream through the HTTP protocol, and the client obtains the media stream information by requesting a specific m3u8 playlist file. Since the HTTP protocol usually uses port 80, the domain name can be resolved to the IP address of the server through DNS, and then the client uses the standard HTTP port to request the streaming content. This method simplifies port management because there is no need to allocate different ports for each streaming service, and it is also convenient for content distribution and optimization through network infrastructure such as CDN. This improves service efficiency and user experience.

[0055] This embodiment also provides a streaming media push method. Figure 3 is a flow chart of another streaming media push method of this embodiment. Figure 3 As shown, the process includes the following steps: Step S301, registering each streaming media forwarding server with the hot migration load balancer to keep it alive; Step S302: register the streaming device to the hot migration load balancer to keep it alive, and report the streaming device identification information; Step S303, registering the streaming device with the signaling server to keep it alive; Step S304, registering the hot migration load balancer to the scheduling server to keep it alive; Step S305, the client obtains the live broadcast address from the signaling server; Step S306, the signaling server obtains the hot migration load balancer port information from the scheduling server; extracts the streaming media forwarding server port information from the hot migration load balancer port information, and sends it to the client; Step S307, the client initiates RTSP live broadcast according to the received streaming media forwarding server port information; Step S308, the hot migration load balancer receives and analyzes the RTSP live broadcast request initiated by the client to obtain the streaming device identifier; Step S309: The hot migration load balancer adopts a load balancing strategy to migrate the streaming device connection to the streaming media forwarding server with the smallest load; Step S310, searching for a streaming media forwarding server with the smallest load corresponding to the streaming device identifier in the live broadcast request; Step S311, sending a streaming instruction to the streaming device through the corresponding streaming media forwarding server with the smallest load; Step S312: the streaming device pushes the media data stream in the streaming media forwarding server to the output layer of the client.

[0056] Through the above steps S301 to S312, compared with the prior art in which all streaming media forwarding server interfaces are exposed, this embodiment connects the streaming device to the streaming media forwarding server with the smallest load through a hot migration load balancer, thereby reducing the network exposure of the streaming media forwarding server, and then obtains the client's request through the hot migration load balancer, matches a specific streaming media forwarding server according to the client's request, and sends a streaming instruction to the streaming device through the matched streaming media forwarding server, so that the client obtains the media stream. The network exposure is reduced and the network security risk is reduced.

[0057] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from that here. For example, the order of step S301 and step S302 can be interchanged.

[0058] In this embodiment, a streaming media push system is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware for a predetermined function. 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.

[0059] Figure 4 is a structural block diagram of the streaming media push system of this embodiment. Figure 4 As shown, the streaming media push system 40 includes: a client 41, an access layer 42, a streaming device 43 and an output layer 44, wherein: The client 41 is used to initiate a client request; The access layer 42 includes a hot migration load balancer, a streaming media forwarding server, and a scheduling service; the access layer is used to receive a live broadcast request initiated by the client 41 according to the port information of the streaming media forwarding server, search for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request, and send a streaming instruction to the streaming device 43 through the corresponding streaming media forwarding server; The streaming device 43 is used to receive the streaming instruction sent by the streaming media forwarding server and push the media data stream in the streaming media forwarding server to the output layer 44 of the client 41; The output layer 44 is used to receive the media data stream pushed by the streaming media forwarding server.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: S1, obtain client request; S2, obtaining the streaming media forwarding server port information from the scheduling service according to the client request, and sending the streaming media forwarding server port information to the client; S3, through the hot migration load balancer, receives the live broadcast request initiated by the client according to the port information of the streaming media forwarding server; wherein the live broadcast request includes the streaming device identifier; S4, searching for a streaming media forwarding server corresponding to the streaming media forwarding device identifier based on the streaming media forwarding device identifier in the live broadcast request; wherein the streaming media forwarding device identifier is a streaming media forwarding device registered in advance to keep alive in the hot migration load balancer, and is transmitted and stored in the streaming media forwarding server through the hot migration load balancer; S5, sending a streaming instruction to the streaming device through the corresponding streaming media forwarding server, so that the streaming device pushes the media data stream in the streaming media forwarding server to the output layer of the client.

[0064] 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.

[0065] In addition, in combination with the streaming media push method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the streaming media push method. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the streaming media push methods in the above embodiments is implemented.

[0066] 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.

[0067] 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.

[0068] 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.

[0069] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0070] 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 streaming media push method, characterized in that: include: Get client request; Obtaining streaming media forwarding server port information from a scheduling server according to the client request, and sending the streaming media forwarding server port information to the client; Receiving, through a hot migration load balancer, a live broadcast request initiated by the client according to the port information of the streaming media forwarding server; wherein the live broadcast request includes a streaming device identifier; Based on the streaming device identifier in the live broadcast request, searching for the streaming media forwarding server corresponding to the streaming device identifier; wherein the streaming device identifier is a streaming device registered in advance to keep alive with the hot migration load balancer, and is transmitted and stored in the streaming media forwarding server through the hot migration load balancer; The corresponding streaming media forwarding server sends a streaming instruction to the streaming device, so that the streaming device pushes the media data stream in the streaming media forwarding server to the output layer of the client.

2. The streaming media push method according to claim 1, characterized in that: Before searching for a streaming media forwarding server corresponding to the streaming media device identifier based on the streaming device identifier in the live broadcast request, the method further includes: Register each streaming media forwarding server to the hot migration load balancer to keep it alive.

3. The streaming media push method according to claim 2, characterized in that: After registering each streaming media forwarding server to keep alive with the hot migration load balancer, the method further includes: The hot migration load balancer is registered to the scheduling server to keep it alive.

4. The streaming media push method according to claim 1, characterized in that: Before searching for a streaming media forwarding server corresponding to the streaming media device identifier based on the streaming device identifier in the live broadcast request, the method further includes: Register the streaming device with the signaling server to keep it alive.

5. The streaming media push method according to claim 1, characterized in that: Before searching for a streaming media forwarding server corresponding to the streaming media device identifier based on the streaming device identifier in the live broadcast request, the method further includes: Through the load balancing strategy of the hot migration load balancer, the streaming device connection is migrated to the streaming media forwarding server with the smallest load.

6. The streaming media push method according to claim 5, characterized in that: The searching for a streaming media forwarding server corresponding to the streaming device identifier based on the streaming device identifier in the live broadcast request includes: The streaming media forwarding server with the smallest load is searched through the streaming device identifier in the live broadcast request.

7. The streaming media push method according to claim 1, characterized in that: The obtaining the streaming media forwarding server port information from the scheduling service according to the client request includes: Based on the client request, obtaining the port information of the hot migration load balancer from the scheduling server; The streaming media forwarding server port information is obtained according to the port information of the hot migration load balancer.

8. The streaming media push method according to claim 1, characterized in that: The output layer includes RTMP service and HLS service, wherein in the RTMP service, the RTMP protocol is converged through a layered architecture and port multiplexing method, and in the HLS service, the port is converged using a domain name method.

9. A streaming media push system, using the streaming media push method according to any one of claims 1 to 8, characterized in that: The streaming media push system includes: a client, an access layer, a streaming device and an output layer, wherein: The client is used to initiate a client request; The access layer includes a hot migration load balancer, a streaming media forwarding server, and a scheduling service; the access layer is used to receive a live broadcast request initiated by the client according to the port information of the streaming media forwarding server, search for a streaming media forwarding server corresponding to the streaming media forwarding server identifier based on the streaming device identifier in the live broadcast request, and issue a streaming instruction to the streaming device through the corresponding streaming media forwarding server; The streaming device is used to receive a streaming instruction issued by the streaming media forwarding server, and push the media data stream in the streaming media forwarding server to the output layer of the client; The output layer is used to receive the media data stream pushed by the streaming media forwarding server.

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 streaming media push method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Method for implementing media flow balance dispatching in vedio service

    CN101001365A

  • Media stream load balancing system, method and equipment based on national standard protocol

    CN117240834A

  • Multi contaniner format integration streaming server and streaming method

    KR100820350B1

  • System and method for automatic stream fail-over

    US7318107B1

Cited By

  • Streaming media pushing method, streaming media pushing system, and storage medium

    WO2026044968A1