Streaming media service upgrading method and device, electronic equipment and storage medium

By deploying the two streaming media server on the streaming host side, the connection transfer of the streaming broadcast side and the streaming source end is completed, and the problem of video stream interruption and data loss during the upgrading of streaming media server upgrades, realizing the streaming media services Smooth upgrade and improvement of user experience.

CN119342241APending Publication Date: 2025-01-21E SURFING VISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411529775.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

During the upgrade process, existing streaming media servers are likely to cause interruption of video streams and loss of cloud storage data, affecting the real-time streaming and the cloud storage and viewing effect, especially in video surveillance or security scenarios.

Method used

By deploying two streaming media server on the streaming host side, when one of the streaming media services need to be upgraded, the second streaming service is launched, and the streaming media playback end and streaming source end are completed through the interaction of the two streaming media services. Connect to the smooth upgrade of streaming media services.

Benefits of technology

The continuity of streaming media played during the upgrade of streaming media services. There is no need to disconnect the current media service program. The streaming media service upgrade process is smooth and non -interrupted, and effectively improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342241A_ABST
    Figure CN119342241A_ABST
Patent Text Reader

Abstract

The invention discloses a streaming media service upgrading method, which comprises the following steps of: deploying two streaming media servers at a streaming media host end, starting a second streaming media service when one streaming media service is running and needs to be upgraded, and finishing connection transfer between a streaming media playing end and a streaming media source end through interaction of the two streaming media services. The streaming media playing continuity in the streaming media service upgrading process is realized, the streaming media service program does not need to be interrupted, the streaming media service upgrading process is smooth and uninterrupted, and the user experience is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to visual networking technology, and in particular to a streaming media service upgrade method, device, electronic device and storage medium. Background Art

[0002] Streaming service is a technology that transmits and plays multimedia content such as audio and video in real time through the Internet. Users can listen or watch directly online without downloading the content. This type of service has developed rapidly in recent years with the improvement of Internet bandwidth, the popularization of smart devices and the growth of user demand. The main content types involved include movies, TV series, music, games, network monitoring and live broadcasts.

[0003] Streaming media servers are the link between visual networks and the Internet to realize audio and video transmission services. When current streaming media servers upgrade themselves, they often adjust the system architecture, optimize the transmission protocol, and adjust the data storage structure. This usually leads to video stream interruptions and cloud storage data loss, affecting the real-time nature of the push and cloud storage playback effects. This phenomenon often occurs in video surveillance or security scenarios. When the system pushes video to a streaming media platform or cloud storage, once there are problems with bandwidth, server resources, or protocol compatibility, it is easy to cause problems with fluency and data reliability. Summary of the invention

[0004] Based on this, the present invention aims to propose a streaming media service upgrade method, device, electronic device and storage medium, which realizes a smooth upgrade of the streaming media service by migrating information between a new streaming media service and the streaming media service to be upgraded.

[0005] In a first aspect, the present invention provides a method for upgrading a streaming media service, the method being executed at a first streaming media server, comprising:

[0006] Load the streaming media source information and streaming media player information from the shared memory;

[0007] Initiating a first streaming media connection transfer request to a second streaming media server, and receiving first transfer confirmation information returned by the second streaming media server;

[0008] Establishing a connection with the streaming media player terminal according to the first transfer confirmation information and the streaming media player terminal information;

[0009] Initiating a second streaming media connection transfer request to a second streaming media server, and receiving second transfer confirmation information returned by the second streaming media server;

[0010] A connection is established with the streaming media source end according to the second transfer confirmation information and the streaming media source end information to complete the streaming media service upgrade.

[0011] Further, initiating a first streaming media connection transfer request to the second streaming media server, and receiving first transfer confirmation information returned by the second streaming media server includes:

[0012] Initiate a streaming media playback connection transfer request to the second streaming media server;

[0013] Receive the streaming media player connection identifier returned by the second streaming media server.

[0014] Further, establishing a connection with the streaming media player terminal according to the first transfer confirmation information and the streaming media player terminal information includes:

[0015] Establishing a connection with the streaming media player terminal according to the streaming media player terminal connection identifier and the streaming media player terminal information, so that the streaming media content played by the streaming media player terminal is obtained from the first streaming media server;

[0016] Build a streaming media routing connection, and forward the streaming media content from the second streaming media server to the streaming media player for playback.

[0017] Further, initiating a second streaming media connection transfer request to the second streaming media server, and receiving second transfer confirmation information returned by the second streaming media server includes:

[0018] Initiate a streaming media source end connection transfer request to the second streaming media server end;

[0019] Receive the streaming media source end connection identifier returned by the second streaming media server end.

[0020] Further, establishing a connection with the streaming media source end according to the second transfer confirmation information and the streaming media source end information to complete the streaming media service upgrade includes:

[0021] Establishing a connection with the streaming media source according to the streaming media source information and the streaming media source connection identifier, so that the streaming media content collected by the streaming media source is directly pushed to the first streaming media server;

[0022] The streaming media routing connection with the second streaming media server is closed, and the forwarding of streaming media content from the second streaming media server is stopped, thereby completing the streaming media service upgrade.

[0023] In a second aspect, the present invention provides a streaming media service upgrade method, which is executed at a second streaming media server, comprising:

[0024] receiving a first streaming media connection transfer request from a first streaming media server, and returning first transfer confirmation information to the first streaming media server;

[0025] A second streaming media connection transfer request initiated by the first streaming media server is received, and second transfer confirmation information is returned.

[0026] Further, receiving a first streaming media connection transfer request from a first streaming media server, and returning first transfer confirmation information to the first streaming media server includes:

[0027] Receiving a streaming media playback connection transfer request initiated by a first streaming media server;

[0028] Returns the streaming media player connection ID;

[0029] A streaming media routing connection is established with the first streaming media server, and streaming media content is sent to the first streaming media server.

[0030] Further, receiving a second streaming media connection transfer request initiated by the first streaming media server, and returning second transfer confirmation information includes:

[0031] Receiving a streaming media source end connection transfer request initiated by a first streaming media server end;

[0032] Returns the streaming source connection ID;

[0033] Stop sending streaming media content to the first streaming media server.

[0034] In a third aspect, the present invention provides a streaming media service upgrade device, which is arranged at a first streaming media service end and includes:

[0035] An information loading module is used to load streaming media source information and streaming media player information from a shared memory;

[0036] A first connection request module, used to initiate a first streaming media connection transfer request to a second streaming media server, and receive first transfer confirmation information returned by the second streaming media server;

[0037] A first connection establishing module, used to establish a connection with the streaming media player terminal according to the first transfer confirmation information and the streaming media player terminal information;

[0038] A second connection request module initiates a second streaming media connection transfer request to a second streaming media server, and receives second transfer confirmation information returned by the second streaming media server;

[0039] The second connection establishing module establishes a connection with the streaming media source end according to the second transfer confirmation information and the streaming media source end information to complete the streaming media service upgrade.

[0040] In a fourth aspect, the present invention provides a streaming media service upgrade device, which is arranged at a second streaming media service end, and comprises:

[0041] A first information returning module, configured to receive a first streaming media connection transfer request from a first streaming media server, and return first transfer confirmation information to the first streaming media server;

[0042] The second information returning module receives a second streaming media connection transfer request initiated by the first streaming media server, and returns second transfer confirmation information.

[0043] In a fifth aspect, the present invention provides an electronic device comprising a memory storing computer executable instructions and a processor, wherein when the computer executable instructions are executed by the processor, the device executes each step of the streaming media service upgrade method provided in the first aspect and / or the second aspect.

[0044] In a sixth aspect, the present invention provides a readable storage medium storing a computer executable program, which, when executed, can implement the streaming media service upgrade method provided in the first aspect and / or the second aspect.

[0045] It can be seen from the above technical solutions that the present invention has the following beneficial effects:

[0046] The present invention provides a streaming media service upgrade method, which comprises deploying two streaming media service ends on a streaming media host end, starting a second streaming media service when one of the streaming media services is running and needs to be upgraded, completing the connection transfer between a streaming media player end and a streaming media source end through the interaction of the two streaming media services, and further comprising the step of the newly started streaming media service obtaining connection information of the streaming media player end from the streaming media service to be upgraded, forwarding streaming media content from the streaming media service to be upgraded to the streaming media player end after establishing a connection with the streaming media player end, at which point the streaming media source end is still connected to the streaming media service to be upgraded, the newly started streaming media service continuing to request the streaming media service to be upgraded for connection transfer of the streaming media source end, stopping forwarding streaming media content from the streaming media service to be upgraded after establishing a connection with the streaming media source end, thereby achieving continuity of streaming media playback during the streaming media service upgrade process, without interrupting the streaming media service program, and ensuring a smooth and uninterrupted streaming media service upgrade process, thereby effectively improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0048] Figure 1 is a flow chart of a method for upgrading streaming media services provided by an embodiment of the present invention;

[0049] Figure 2 is a flow chart of a method for upgrading streaming media services provided by another embodiment of the present invention;

[0050] Figure 3 It is a framework diagram for implementing a streaming media service upgrade method provided by an embodiment of the present invention;

[0051] Figure 4 It is an implementation interaction flow chart before upgrading in a streaming media service upgrading method provided by another embodiment of the present invention;

[0052] Figure 5 is an interactive flow chart for implementing an upgrade process in a streaming media service upgrade method provided by another embodiment of the present invention;

[0053] Figure 6 It is a structural diagram of a streaming media service upgrade device provided by an embodiment of the present invention;

[0054] Figure 7 is a structural diagram of a streaming media service upgrade device provided by another embodiment of the present invention;

[0055] Figure 8 This is a diagram of the electronic device architecture provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] Streaming media services are committed to providing high-definition (4K, 8K) and even 360-degree panoramic or VR videos, while adopting new compression standards (such as H.265 / HEVC and AV1) to improve bandwidth utilization. On a single network platform, the required services, such as high-definition video conferencing, video surveillance, intelligent monitoring analysis, emergency command, digital radio and television, delayed television, online teaching, live broadcast, VOD on demand, TV mail, personalized recording (PVR), intranet (self-organized) channels, intelligent video broadcast control, information release, and dozens of other video, voice, picture, text, communication, data and other services can be achieved through visual interactive devices to achieve high-definition quality video playback.

[0058] Based on the demand for smooth upgrade of streaming media services, the following embodiments of the present invention provide a streaming media service upgrade method, which completely migrates the original streaming media service business to the new streaming media service, so that the streaming media playback service and storage are not interrupted during the streaming media version upgrade process, thereby achieving a smooth service upgrade.

[0059] See also Figure 1An embodiment of the present invention provides a method for upgrading a streaming media service. In this embodiment, a first streaming media service end and a second streaming media service end are used to distinguish between a new version of the streaming media service and an old version of the streaming media service. The method is executed on the first streaming media service end (i.e., the new version of the streaming media service), and includes the following steps:

[0060] Step S110: Loading streaming media source information and streaming media player information from the shared memory.

[0061] In this step, it is considered that the old version of the streaming media service is running in the server, and the source end information and the playback end information of the streaming media are written into the shared memory at this time. At this time, the streaming media source end and the streaming media playback end have established a connection relationship with the old version of the streaming media service, and the streaming media source end pushes the stream to the old version of the streaming media service, and the old version of the streaming media service forwards the acquired streaming media content to the streaming media playback end. When the streaming media service needs to be upgraded, the host can start the new version of the streaming media service at the same time, and the new version of the streaming media service loads the streaming media source end information and the streaming media playback end information from the shared memory, which is used to identify the streaming media source end and the streaming media playback end, and uses the loaded information to connect with the source end and the server end.

[0062] Specifically, in the streaming media server architecture, the use of shared memory can effectively speed up the process of loading streaming media information from the source end and distributing data to the player end. Shared memory allows multiple processes to efficiently share data without having to communicate through sockets or files, thereby improving data access speed and reducing memory copy overhead. Streaming media source information usually includes the path, format, resolution, bit rate, etc. of the streaming media file. The source information can be read by multiple players; streaming media player information usually includes the status of each client, such as playback progress, buffer, connection status, etc.

[0063] In a further embodiment, the first streaming media server (i.e., the new version of the streaming media service) may first request the address of the shared memory from the second streaming media server (i.e., the old version of the streaming media service), and then load the streaming media source information and the streaming media player information according to the shared memory address.

[0064] Step S120: Initiate a first streaming media connection transfer request to the second streaming media server, and receive first transfer confirmation information returned by the second streaming media server.

[0065] Specifically, connection transfer refers to seamlessly switching the client's streaming media connection from one server (e.g., the second streaming media server) to another server (e.g., the first streaming media server). In this embodiment, the first streaming media connection request is used to request the second streaming media server to transfer the connection relationship of the streaming media player, that is, the streaming media player transfers the current connection with the old version streaming media service to the connection with the new version streaming media service. The specific request format is determined by the communication protocol of the server. After the old version streaming media service responds to the transfer request of the new version streaming media service, it can return the corresponding player identifier to the new version streaming media service.

[0066] In a further embodiment, step S120 includes the following steps:

[0067] Step S121. Initiate a streaming media playback connection transfer request to the second streaming media server;

[0068] Step S122: Receive the streaming media player connection identifier returned by the second streaming media server.

[0069] For example, taking the RTSP protocol as an example, the RTSP protocol is used to control multimedia stream transmission between the client and the server. After the second streaming media server receives the transfer request from the first streaming media server, it returns the RTSP file descriptor to it. The program can directly operate the operating system resources (such as network sockets) to control the sending and receiving of data.

[0070] Step S130: Establish a connection with the streaming media player terminal according to the first transfer confirmation information and the streaming media player terminal information.

[0071] In this step, the new version of the streaming media service constructs a connection object based on the acquired streaming media player connection identifier and streaming media player information, and establishes a mapping relationship with the streaming media player. At this time, the connection between the streaming media player and the streaming media service has been updated to the new version of the streaming media service, but the streaming media source still maintains a connection relationship with the old version of the streaming media service, that is, the collected streaming media is still pushed to the old version of the streaming media service. In order to ensure that the streaming media service is not interrupted, it is necessary to construct a streaming media back-source object so that the new version of the streaming media service can go back to the old version of the streaming media service to pull the streaming media content and forward it to the player until the streaming media source connection is transferred to the new version of the streaming media service.

[0072] In a further embodiment, step S130 includes the following steps:

[0073] Step S131. Establishing a connection with the streaming media player terminal according to the streaming media player terminal connection identifier and the streaming media player terminal information, so that the streaming media content played by the streaming media player terminal is obtained from the first streaming media server;

[0074] Step S132: Establish a streaming media routing connection, and forward the streaming media content from the second streaming media server to the streaming media player for playback.

[0075] In this step, the first streaming media server constructs a streaming media back-source object for back-source pulling the stream to the second streaming media server. The back-source object initiates a streaming media communication request to the second streaming media server, pulls the video stream from the second streaming media server, and caches it to the first streaming media server. The first streaming media server forwards the received content to the playback end in real time and saves it in the local cache so that it can be directly provided next time.

[0076] Step S140: Initiate a second streaming media connection transfer request to the second streaming media server, and receive second transfer confirmation information returned by the second streaming media server.

[0077] In this embodiment, the second streaming media connection request is used to request the second streaming media service end to transfer the connection relationship of the streaming media source end, that is, the streaming media source end transfers the current connection with the old version streaming media service to the connection with the new version streaming media service. The specific request format is determined by the communication protocol of the server end. After the old version streaming media service responds to the transfer request of the new version streaming media service, it can return the corresponding source end identifier to the new version streaming media service.

[0078] In a further embodiment, step S140 includes the following steps:

[0079] Step S141. Initiate a streaming media source terminal connection transfer request to the second streaming media server;

[0080] Step S142: Receive the streaming media source connection identifier returned by the second streaming media server.

[0081] Specifically, after receiving the transfer request from the first streaming media server, the second streaming media server returns the source file descriptor to the first streaming media server, and the program can directly operate the operating system resources (such as network sockets) to control the sending and receiving of data.

[0082] Step S150: Establish a connection with the streaming media source end according to the second transfer confirmation information and the streaming media source end information, and complete the streaming media service upgrade.

[0083] In this step, the new version of the streaming media service constructs a connection object based on the acquired streaming media source connection identifier and streaming media source information, and establishes a mapping relationship with the streaming media source. At this time, the connection between the streaming media source and the streaming media service has been updated to the new version of the streaming media service. At this point, both the streaming media source and the streaming media player have transferred the connection to the new version of the streaming media service, and can stop pulling streaming media from the old version of the streaming media service.

[0084] In a further embodiment, step S150 includes the following steps:

[0085] Step S151. Establishing a connection with the streaming media source according to the streaming media source information and the streaming media source connection identifier, so that the streaming media content collected by the streaming media source is directly pushed to the first streaming media server;

[0086] Step S152: close the streaming media routing connection with the second streaming media server, stop forwarding the streaming media content from the second streaming media server, and complete the streaming media service upgrade.

[0087] Specifically, after stopping the old version of the streaming media server, the host points the soft link of the program instance of the second streaming media server to the program instance of the first streaming media server, thereby completing the streaming media service upgrade.

[0088] The above embodiment describes the streaming media service upgrade method provided by the present invention from the perspective of a new version of the streaming media server. Two streaming media servers are deployed on the streaming media host. When one of the streaming media services is running and needs to be upgraded, the second streaming media service is started. The connection transfer between the streaming media player and the streaming media source is completed through the interaction of the two streaming media services, thereby achieving the continuity of streaming media playback during the streaming media service upgrade process. There is no need to interrupt the streaming media service program. The streaming media service upgrade process is smooth and uninterrupted, effectively improving the user experience.

[0089] See also Figure 2 An embodiment of the present invention provides a streaming media service upgrade method. This embodiment describes the method from the perspective of an old version of the streaming media service. A first streaming media service end and a second streaming media service end respectively distinguish between a new version of the streaming media service and an old version of the streaming media service. The method is executed on the second streaming media service end (i.e., the old version of the streaming media service), and includes the following steps:

[0090] Step S210: Receive a first streaming media connection transfer request from a first streaming media server, and return first transfer confirmation information to the first streaming media server.

[0091] In this step, the second streaming media server is the streaming media service currently connected to the source end and the playback end of the streaming media. When the streaming media service needs to be upgraded, the server host will start a new version of the streaming media service. At this time, the link relationship of the streaming media is still that the streaming media source end pushes the stream to the old version of the streaming media service. The old version of the streaming media service forwards the acquired streaming media content to the streaming media playback end. When the streaming media service is upgraded, the new version of the streaming media service loads the streaming media source end information and the streaming media playback end information from the shared memory to identify the streaming media source end and the streaming media playback end, and uses the loaded information to connect to the source end and the server end.

[0092] Specifically, connection transfer refers to seamlessly switching the client's streaming media connection from one server (e.g., the second streaming media server) to another server (e.g., the first streaming media server). In this embodiment, the first streaming media connection request is used to request the second streaming media server to transfer the connection relationship of the streaming media player, that is, the streaming media player transfers the current connection with the old version streaming media service to the connection with the new version streaming media service. The specific request format is determined by the communication protocol of the server. After the old version streaming media service responds to the transfer request of the new version streaming media service, it can return the corresponding player identifier to the new version streaming media service.

[0093] In some embodiments, step S210 includes the following steps:

[0094] Step S211. Receive a streaming media playback connection transfer request initiated by the first streaming media server;

[0095] Step S212: Return the streaming media player connection identifier;

[0096] Step S213: Establish a streaming media routing connection with the first streaming media server, and send streaming media content to the first streaming media server.

[0097] Specifically, the old version of the streaming media service responds to the connection transfer request of the new version of the streaming media service, initiates a communication connection to the new version of the streaming media service, and sends a streaming media player connection identifier. After the connection of the streaming media player is transferred to the new version of the streaming media service, the connection between the streaming media player and the streaming media service has been updated to the new version of the streaming media service, but the streaming media source still maintains a connection relationship with the old version of the streaming media service, that is, the streaming media it collects is still pushed to the old version of the streaming media service. In order to ensure that the streaming media service is not interrupted, the new version of the streaming media service needs to construct a streaming media return source object so that the new version of the streaming media service returns to the old version of the streaming media service to pull the streaming media content and forward it to the player until the streaming media source connection is transferred to the new version of the streaming media service. The return source object initiates a streaming media communication request to the second streaming media service end, pulls the video stream from the second streaming media service end, and caches it to the first streaming media service end. The first streaming media service end forwards the received content to the player end in real time and saves it in the local cache so that it can be directly provided next time.

[0098] Step S220: Receive a second streaming media connection transfer request initiated by the first streaming media server, and return second transfer confirmation information.

[0099] In this step, the second streaming media connection request is used to request the second streaming media server to transfer the connection relationship of the streaming media source, that is, the streaming media source transfers the current connection with the old version streaming media service to the connection with the new version streaming media service. The specific request format is determined by the communication protocol of the server. After the old version streaming media service responds to the transfer request of the new version streaming media service, it can return the corresponding source end identifier to the new version streaming media service.

[0100] In a further embodiment, step S220 includes the following steps:

[0101] Step S221. Receive a streaming media source terminal connection transfer request initiated by the first streaming media server;

[0102] Step S222. Return the streaming media source connection identifier;

[0103] Step S223: Stop sending streaming media content to the first streaming media server.

[0104] Specifically, after the second streaming media server receives the transfer request from the first streaming media server, it returns the source file descriptor to it. After the connection of the streaming media source is transferred to the new version of the streaming media service, it will stop pushing the stream to the old version of the streaming media service, that is, the second streaming media server will no longer receive the streaming media content pushed by the source. The first streaming media server will close the return-to-source object and stop pulling the stream from the second streaming media server. The second streaming media server can stop sending streaming media content to the first streaming media server.

[0105] The above embodiment describes the streaming media service upgrade method provided by the present invention from the perspective of an old version of the streaming media server. Two streaming media servers are deployed on the streaming media host. When one of the streaming media services is running and needs to be upgraded, the new version of the streaming media service is started. The connection transfer between the streaming media player and the streaming media source is completed through the interaction of the two streaming media services, thereby achieving the continuity of streaming media playback during the streaming media service upgrade process. There is no need to interrupt the streaming media service program. The streaming media service upgrade process is smooth and uninterrupted, effectively improving the user experience.

[0106] In order to further illustrate the streaming media service upgrade method of the present invention, a specific scenario will be described in detail below.

[0107] participate Figure 3 and Figure 4 In this embodiment, the camera is used as the streaming media source end, and the client is used as the streaming media playback end. Two streaming media services are deployed in the host, namely, streaming media 1 and streaming media 2. Streaming media 1 is the old version of the streaming media service, and streaming media 2 is the upgraded new version of the streaming media service. The streaming media service and the client use the RTSP protocol to control media stream transmission.

[0108] like Figure 4 As shown, it illustrates the information interaction process before and after the streaming media service upgrade.

[0109] In the initial stage of service deployment, the camera initiates a login request to streaming media 1, streaming media 1 records the camera login information to the shared memory, the client initiates an RTSP connection request to streaming media 1, and streaming media 1 writes the RTSP connection information to the shared memory.

[0110] The interactive process before upgrading includes the following steps:

[0111] Step S401: The camera initiates a login request to the streaming media 1.

[0112] Step S402: Streaming media 1 records camera login information.

[0113] Step S403: Streaming media 1 writes the camera login information into the shared memory and returns login response information to the camera.

[0114] Step S404: The client initiates an RTSP live broadcast request to the streaming media 1.

[0115] Step S405: Streaming media 1 records RTSP live broadcast information.

[0116] Step S406: Streaming media 1 writes RTSP live broadcast information into the shared memory.

[0117] Step S407: Streaming media 1 sends a streaming instruction to the camera.

[0118] Step S408: The camera returns a streaming response to the streaming media 1.

[0119] Step S409: Streaming media 1 updates the camera information to the shared memory and sets the camera state to the streaming state.

[0120] Step S410: The camera pushes the video stream to the streaming media 1.

[0121] Step S411. Streaming media 1 forwards the RTSP video stream to the client.

[0122] When starting the streaming media service upgrade, the host starts the program instance of streaming media 2. After the streaming media 2 program instance is started, it loads the camera status information and RTSP live broadcast information from the shared memory. Streaming media 1 sends the RTSP connection file descriptor of the outgoing stream to streaming media 2, which is taken over by streaming media 2. Since the camera is still pushing the stream to streaming media 1 at this time, in order to prevent the media stream from being interrupted, streaming media 2 will go back to the source to streaming media 1 to pull the stream; streaming media 1 sends the camera connection file descriptor of the outgoing stream to streaming media 2, which is taken over by streaming media 2. The connection between the camera and streaming media 1 is transferred to streaming media 2. At this time, streaming media 2 directly receives the media stream from the camera and forwards it to the client. At this point, the connection between the client and the camera is transferred to streaming media 2. Streaming media 2 closes the connection back to streaming media 1. After all outgoing stream services are transferred from streaming media 1 to streaming media 2, the streaming media 1 program is stopped and the streaming media 2 program file is overwritten to the original position of streaming media 1.

[0123] like Figure 5 As shown, the interactive process when the streaming media service is upgraded includes the following steps:

[0124] Step S501. Streaming media 2 loads RTSP live broadcast information and camera status information from the shared memory.

[0125] Step S502: Streaming media 2 initiates an RTSP live connection transfer request to streaming media 1.

[0126] Step S503: Streaming media 1 returns a transfer confirmation response to streaming media 2.

[0127] Step S504: Streaming media 1 initiates a Unix domain socket connection request to streaming media 2 and sends an RTSP file descriptor.

[0128] Step S505. Streaming media 2 receives the RTSP file descriptor from streaming media 1, and constructs an RTSP connection object, establishes a mapping relationship with the client, and constructs an RTSP back-to-source object for back-to-source streaming media 1 to pull the stream. At this time, the RTSP connection established between the client and streaming media 1 is transferred to streaming media 2.

[0129] Step S506: Streaming media 2 pulls the stream back to the source of streaming media 1 to ensure that the media stream is not interrupted.

[0130] Step S507: Streaming media 1 returns the RTSP stream to streaming media 2.

[0131] Step S508: Streaming media 2 forwards the RTSP video stream to the client.

[0132] Step S509: Streaming media 2 requests streaming media 1 to transfer the camera push streaming connection.

[0133] Step S510. Streaming media 1 initiates a Unix domain socket connection request to streaming media 2, and sends a file descriptor for establishing a connection with the camera.

[0134] Step S511. Streaming media 2 receives the camera connection file descriptor from streaming media 1, constructs a camera connection object, and establishes a mapping relationship with the camera. At this time, the connection established between the camera and streaming media 1 is transferred to streaming media 2.

[0135] Step S512: The camera pushes the video stream to the streaming media 2.

[0136] Step S513: Streaming media 2 disconnects the back-source connection and stops pulling the stream.

[0137] Step S514: Stop the stream media 1 process, and overwrite the stream media 2 program file to the stream media 1 program file installation location.

[0138] The above disclosed embodiment describes in detail a method for upgrading streaming media services. The above disclosed method can be implemented using various forms of equipment. Therefore, the present invention also discloses a device corresponding to the above method. A specific embodiment is given below for detailed description.

[0139] See also Figure 6 An embodiment of the present invention provides a streaming media service upgrade device, which is arranged at a first streaming media service end and includes:

[0140] The information loading module 602 is used to load the streaming media source end information and the streaming media player end information from the shared memory;

[0141] The first connection request module 604 is used to initiate a first streaming media connection transfer request to the second streaming media server, and receive first transfer confirmation information returned by the second streaming media server;

[0142] A first connection establishing module 606, configured to establish a connection with the streaming media player terminal according to the first transfer confirmation information and the streaming media player terminal information;

[0143] The second connection request module 608 initiates a second streaming media connection transfer request to the second streaming media server, and receives second transfer confirmation information returned by the second streaming media server;

[0144] The second connection establishing module 610 establishes a connection with the streaming media source end according to the second transfer confirmation information and the streaming media source end information to complete the streaming media service upgrade.

[0145] participate Figure 7 An embodiment of the present invention provides a streaming media service upgrade device, which is arranged at a second streaming media service end and includes:

[0146] The first information returning module 702 is used to receive a first streaming media connection transfer request from a first streaming media server and return first transfer confirmation information to the first streaming media server;

[0147] The second information returning module 704 receives a second streaming media connection transfer request initiated by the first streaming media server, and returns second transfer confirmation information.

[0148] The implementation principle and technical effects of the device provided in the embodiments of the present application are the same as those of the aforementioned method embodiments. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiments.

[0149] The methods and related devices mentioned in the above embodiments are described with reference to the method flow charts and / or structural diagrams provided in the embodiments of the present application. Specifically, each process and / or block in the method flow charts and / or structural diagrams, as well as the combination of processes and / or blocks in the flow charts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the process. Figure 1 Schematic diagram of one or more processes and / or structures Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 Schematic diagram of one or more processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.

[0150] The following embodiments are described by taking the method applied to a computer device as an example. It can be understood that the computer device can be any device with computing and processing functions, and can be but not limited to a server or a personal laptop computer, etc. In one embodiment, the computer device can be an application server, and the application server can be a server for running an application to be tested.

[0151] See also Figure 8 , which shows a hardware block diagram of an electronic device, the electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0152] like Figure 7 As shown, the electronic device includes: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0153] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0154] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0155] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory;

[0156] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to implement various processing flows of the aforementioned streaming media service upgrade solution.

[0157] An embodiment of the present invention further provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processing flow of the streaming media service upgrade solution provided in the above embodiment and / or any possible implementation method in combination with the embodiment is implemented.

[0158] The above-mentioned embodiments have described the present invention in particular detail with respect to possible scenarios, and those skilled in the art will recognize that the present invention can be practiced through other embodiments. The specific naming of components, the capitalization of terms, attributes, data structures, or any other programming or structural aspects are not mandatory or important, and the mechanisms or features of the present invention may have different names, forms, or procedures. The system may be implemented by a combination of hardware and software (as described), entirely by hardware elements, or entirely by software elements. The specific division of functions between the various system components described herein is exemplary only and not mandatory; on the contrary, the functions performed by a single system component may be performed by multiple components, or the functions performed by multiple components may be performed by a single component.

[0159] Those skilled in the art should understand that the various steps of the above disclosed method can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented with program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present invention are not limited to any specific combination of hardware and software.

[0160] These computing device executable programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors, and these computing programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0161] Certain aspects of the present invention include process steps and instructions described herein in the form of algorithms. It should be noted that the process steps and instructions of the present invention can be implemented in software, firmware and / or hardware, and when implemented by software, it can be downloaded, stored on different platforms used by various operating systems and operated from the platforms.

[0162] Those skilled in the art will understand that the structures shown in the accompanying drawings are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the terminal device to which the scheme of the present application is applied. The specific terminal device may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.

[0163] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "possible design" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0164] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0165] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for upgrading streaming media service, characterized in that: The method is performed on a first streaming media server, and includes: Load the streaming media source information and streaming media player information from the shared memory; Initiating a first streaming media connection transfer request to a second streaming media server, and receiving first transfer confirmation information returned by the second streaming media server; Establishing a connection with the streaming media player terminal according to the first transfer confirmation information and the streaming media player terminal information; Initiating a second streaming media connection transfer request to the second streaming media server, and receiving second transfer confirmation information returned by the second streaming media server; A connection is established with the streaming media source end according to the second transfer confirmation information and the streaming media source end information to complete the streaming media service upgrade.

2. The method according to claim 1, characterized in that The initiating a first streaming media connection transfer request to the second streaming media server and receiving first transfer confirmation information returned by the second streaming media server includes: Initiating a streaming media playback connection transfer request to the second streaming media server; Receive the streaming media player connection identifier returned by the second streaming media server.

3. The method according to claim 2, characterized in that The establishing a connection with the streaming media player terminal according to the first transfer confirmation information and the streaming media player terminal information comprises: Establishing a connection with the streaming media player terminal according to the streaming media player terminal connection identifier and the streaming media player terminal information, so that the streaming media content played by the streaming media player terminal is obtained from the first streaming media server; Build a streaming media routing connection, and forward the streaming media content from the second streaming media server to the streaming media player for playback.

4. The method according to claim 1, characterized in that: The initiating a second streaming media connection transfer request to the second streaming media server and receiving second transfer confirmation information returned by the second streaming media server includes: Initiating a streaming media source end connection transfer request to the second streaming media server end; Receive the streaming media source end connection identifier returned by the second streaming media server.

5. The method according to claim 4, characterized in that The step of establishing a connection with the streaming media source end according to the second transfer confirmation information and the streaming media source end information to complete the streaming media service upgrade comprises: Establishing a connection with the streaming media source according to the streaming media source information and the streaming media source connection identifier, so that the streaming media content collected by the streaming media source is directly pushed to the first streaming media server; The streaming media routing connection with the second streaming media server is closed, and the forwarding of streaming media content from the second streaming media server is stopped, thereby completing the streaming media service upgrade.

6. A method for upgrading streaming media service, characterized in that: The method is performed on the second streaming media server, including: receiving a first streaming media connection transfer request from a first streaming media server, and returning first transfer confirmation information to the first streaming media server; A second streaming media connection transfer request initiated by the first streaming media server is received, and second transfer confirmation information is returned.

7. A streaming media service upgrade device, characterized in that: The settings are on the first streaming media server, including: An information loading module is used to load streaming media source information and streaming media player information from a shared memory; A first connection request module, used to initiate a first streaming media connection transfer request to a second streaming media server, and receive first transfer confirmation information returned by the second streaming media server; A first connection establishing module, used to establish a connection with the streaming media player terminal according to the first transfer confirmation information and the streaming media player terminal information; A second connection request module initiates a second streaming media connection transfer request to a second streaming media server, and receives second transfer confirmation information returned by the second streaming media server; The second connection establishing module establishes a connection with the streaming media source end according to the second transfer confirmation information and the streaming media source end information to complete the streaming media service upgrade.

8. A streaming media service upgrade device, characterized in that: The settings on the second streaming media server include: A first information returning module, configured to receive a first streaming media connection transfer request from a first streaming media server, and return first transfer confirmation information to the first streaming media server; The second information returning module receives a second streaming media connection transfer request initiated by the first streaming media server, and returns second transfer confirmation information.

9. An electronic device, characterized in that: It includes a memory and a processor storing computer executable instructions. When the computer executable instructions are executed by the processor, the device executes the streaming media service upgrade method as described in any one of claims 1 to 5, and / or the streaming media service upgrade method as described in claim 6.

10. A readable storage medium, characterized in that: A computer executable program is stored, and when the program is executed, the streaming media service upgrade method according to any one of claims 1 to 5 and / or the streaming media service upgrade method according to claim 6 can be implemented.