Media stream migration method, device, electronic device and storage medium

By introducing a coordination server into the media stream processing system, identifying exceptions and migrating media streams, the system instability caused by abnormal media stream service nodes is solved, and the stable distribution of media streams is ensured.

CN115474079BActive Publication Date: 2024-12-27CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210964660.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-11
Publication Date
2024-12-27
Estimated Expiration
2042-08-11

AI Technical Summary

Technical Problem

When an exception occurs in the media stream service node, the existing media stream processing system cannot provide the user with media streaming steadily, resulting in the problem that the system cannot distribute media streams normally.

Method used

Introduce a coordination server to recognize state by receiving status characterization information of media stream service nodes. Under abnormal conditions, based on the access location information of the target provider, select the target service node from other media stream service nodes and migrate the media stream. to the target service node.

Benefits of technology

It realizes automatic migration of the media stream processing system when an abnormality occurs on the media stream service node, avoiding the problem that the media stream processing system cannot provide media streams stably, and ensuring the stability and user experience of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115474079B_ABST
    Figure CN115474079B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a media stream migration method, device, electronic device and storage medium. In the method, the state representation information reported by the media stream service node in the media stream processing system is received through the coordination service end in the media stream processing system, and the state of the media stream service node is identified according to the state representation information. When it is identified that the media stream service node is abnormal, a service node is selected from other media stream service nodes for the target provider according to the access location information of the target provider of the media stream service node, as the target media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node. The media stream of the target provider is migrated to the target media stream service node. In this way, by introducing the coordination service end in the media stream processing system, the media stream processing system can stably provide media streams to users to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of network technology, and in particular relates to a media stream migration method, device, electronic equipment and storage medium. Background Art

[0002] At present, with the widespread application of technologies such as Voice over Internet Protocol (VoIP) and multimedia, there are more and more scenarios where media streams need to be obtained. In the current media stream processing system, the media stream processing system includes a media stream provider and a media stream service node. The media stream provider can generate a media stream and push it to the media stream service node, and the media stream service node distributes the media stream pushed by the media stream provider to the user.

[0003] Since the number of media streams is often large, how to enable the media stream processing system to stably provide media streams to users has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present invention provides a media stream migration method, device, electronic equipment and storage medium, so that a media stream processing system can stably provide media streams for users.

[0005] In a first aspect, the present invention provides a media stream migration method, the method being applied to a coordination server in a media stream processing system, the method comprising:

[0006] Receiving status representation information reported by a media stream service node in the media stream processing system, and identifying the status of the media stream service node according to the status representation information;

[0007] When it is identified that the media stream service node is abnormal, according to the access location information of the target provider of the media stream service node, a service node is selected from other media stream service nodes for the target provider as the target media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node;

[0008] Migrate the media stream of the target provider to the target media stream service node.

[0009] In a second aspect, the present invention provides another media stream migration method, which is applied to a media stream processing system, wherein the system includes a media stream service node, a coordination server, and a media stream service node; the method includes:

[0010] The media stream service node reports status representation information to the coordination server;

[0011] The coordination server identifies the state of the media stream service node according to the state representation information;

[0012] When the coordination service end identifies that the media stream service node is abnormal, the coordination service end selects a service node for the target provider end from other media stream service nodes as the target media stream service node according to the access location information of the target provider end of the media stream service node; the target provider end includes a media stream provider end that pushes the media stream to the media stream service node;

[0013] The coordination server migrates the media stream of the target provider to the target media stream service node.

[0014] In a third aspect, the present invention provides a media stream migration device, which is applied to a coordination server in a media stream processing system, and includes:

[0015] A first receiving module, configured to receive status representation information reported by a media stream service node in the media stream processing system, and identify the status of the media stream service node according to the status representation information;

[0016] A selection module is used to select a service node for the target provider from other media stream service nodes as the target media stream service node according to the access location information of the target provider of the media stream service node when an abnormality is identified in the media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node;

[0017] The first migration module is used to migrate the media stream of the target provider to the target media stream service node.

[0018] In a fourth aspect, the present invention provides a media stream processing system, the system comprising: a media stream service node, a coordination server, and a media stream service node;

[0019] The media stream service node is used to report status representation information to the coordination server;

[0020] The coordination server is used to identify the state of the media stream service node according to the state representation information;

[0021] The coordination service end is further used to select a service node for the target provider from other media stream service nodes as the target media stream service node according to the access location information of the target provider of the media stream service node when it is identified that the media stream service node is abnormal; the target provider includes a media stream provider that pushes the media stream to the media stream service node;

[0022] The coordination server is further configured to migrate the media stream of the target provider to the target media stream service node.

[0023] In a fifth aspect, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned media stream migration method when executing the program.

[0024] In a sixth aspect, the present invention provides a readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the above-mentioned media stream migration method.

[0025] In an embodiment of the present invention, the state representation information reported by the media stream service node in the media stream processing system is received through the coordination service end in the media stream processing system, and the state of the media stream service node is identified according to the state representation information. When it is identified that the media stream service node is abnormal, according to the access location information of the target provider of the media stream service node, a service node is selected from other media stream service nodes for the target provider as the target media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node. The media stream of the target provider is migrated to the target media stream service node. In this way, by introducing the coordination service end in the media stream processing system, the coordination service end actively identifies the abnormality of the media stream service node, and when it is identified that the media stream service node is abnormal, the media stream previously pushed to the abnormal media stream service node is automatically migrated to the target media stream service node, thereby avoiding the problem that the media stream service node cannot normally process the pushed media stream due to the abnormality of the media stream service node, thereby causing the media stream processing system to be unable to stably provide media streams to users, thereby enabling the media stream processing system to stably provide media streams to users to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1 is a flow chart of steps of a media stream migration method provided by an embodiment of the present invention;

[0028] Figure 2 is a schematic diagram of a scenario provided by an embodiment of the present invention;

[0029] Figure 3is a schematic diagram of a registration process provided by an embodiment of the present invention;

[0030] Figure 4 A schematic diagram of a device heartbeat processing process provided by an embodiment of the present invention;

[0031] Figure 5 is a working diagram of a coordination service provided by an embodiment of the present invention;

[0032] Figure 6 is a schematic diagram of flow management of a coordination service provided by an embodiment of the present invention;

[0033] Figure 7 is an interactive flow chart provided by an embodiment of the present invention;

[0034] Figure 8 is a flowchart of another method for media stream migration provided by an embodiment of the present invention;

[0035] Fig. 9 is a block diagram of a media stream processing system provided by an embodiment of the present invention;

[0036] Fig.10 is a structural diagram of a media stream migration device provided by an embodiment of the present invention;

[0037] Fig.11 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0039] Figure 1 is a flow chart of the steps of a media stream migration method provided by an embodiment of the present invention. The method can be applied to a coordination server in a media stream processing system, such as Figure 1 As shown, the method may include:

[0040] Step 101: Receive status representation information reported by a media stream service node in the media stream processing system, and identify the status of the media stream service node according to the status representation information.

[0041] In an embodiment of the present invention, the coordination service end may be a newly added service cluster in the media stream processing system. The media stream may specifically be a video stream, an audio stream, and the like. The media stream service node may belong to a media stream distributed cluster in the media stream processing system, and a media stream service node may correspond to a media stream service in the media stream distributed cluster. The media stream processing system may include multiple media stream distributed clusters deployed in different regions, and these multiple media stream distributed clusters may form a media stream node cluster. Among them, the media stream service may also be referred to as a streaming media service, the media stream distributed cluster may also be referred to as a streaming media distributed cluster, and the media stream node cluster may also be referred to as a streaming media node cluster.

[0042] Furthermore, the status representation information may be information that is pre-agreed with the media stream service node and needs to be reported by the media stream service node. The status representation information may be used to represent the current status of the media stream service node. Accordingly, the coordination server may identify the status of the media stream service node based on the received status representation information to determine whether the media stream service node is abnormal. Specifically, the media stream processing system may include multiple media stream service nodes, each of which may report status representation information. Accordingly, the coordination server may identify the status of each media stream service node based on the status representation information reported by each media stream service node.

[0043] Step 102: When an abnormality is identified in the media stream service node, a service node is selected from other media stream service nodes for the target provider according to the access location information of the target provider of the media stream service node, as the target media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node.

[0044] In the embodiment of the present invention, if an abnormality occurs in the media stream service node, it can be determined that the media stream service node cannot normally process the pushed media stream, that is, the media stream service node cannot normally distribute the pushed media stream to the receiving end, that is, to the user end. If the media stream service node continues to dock with the target provider and is responsible for the media stream of the target provider, the media stream pushed by the target provider cannot be normally and stably distributed to the user, so that the media stream processing system cannot stably provide the media stream to the user. Therefore, in this step, according to the access location information of the target provider of the media stream service node, a service node can be re-selected from other media stream service nodes for the target provider as the target media stream service node to perform media stream migration in the future. Among them, the access location information can represent the access location of the target provider. In this way, reselecting the media stream service node for the target provider based on the access location information of the target provider can ensure the rationality of the selected target media stream service node to a certain extent.

[0045] Step 103: Migrate the media stream of the target provider to the target media stream service node.

[0046] Specifically, a control instruction may be issued to the target provider to control the target provider to push the media stream to the target media stream service node, thereby migrating the media stream of the target provider to the target media stream service node.

[0047] It should be noted that the coordination service cluster in the embodiment of the present invention may include multiple coordination services, and these multiple coordination services may be deployed in a distributed manner. Accordingly, each coordination service may be responsible for processing the status representation information reported by different media stream service nodes. For example, assuming that there are 1,000 media stream service nodes and 10 coordination services, each coordination service may be responsible for processing the status representation information reported by 100 of the media stream service nodes. In other words, each coordination service may perform status identification for the media stream service node for which it is responsible based on the status representation information reported by the media stream service node for which it is respectively received, so as to select a target media stream service node for the target provider of the media stream service node when it is identified that the media stream service node for which it is respectively responsible is abnormal, and control the migration of the media stream of the target provider.

[0048] In summary, the media stream migration method provided by the embodiment of the present invention receives the status representation information reported by the media stream service node in the media stream processing system through the coordination service end in the media stream processing system, and identifies the status of the media stream service node according to the status representation information. When it is identified that the media stream service node is abnormal, a service node is selected from other media stream service nodes for the target provider according to the access location information of the target provider of the media stream service node, as the target media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node. The media stream of the target provider is migrated to the target media stream service node. In this way, by introducing a coordination server into the media stream processing system, the coordination server actively identifies abnormalities in the media stream service nodes. When an abnormality is identified in the media stream service node, the media stream previously pushed to the abnormal media stream service node is automatically migrated to the target media stream service node, thereby avoiding the problem that the media stream processing system cannot stably provide media streams to users due to the abnormality of the media stream service node and cannot process the pushed media streams normally. This in turn avoids the problem that the media stream processing system cannot stably provide media streams to users. This enables the media stream processing system to stably provide media streams to users to a certain extent.

[0049] Optionally, the following steps may also be performed in the embodiment of the present invention:

[0050] Step A1: receiving a node registration request sent by the media stream service node.

[0051] Step A2: In response to the node registration request, register the media stream service node to establish a persistent connection with the media stream service node.

[0052] For the above steps A1 to A2, these two steps may be performed before receiving the status representation information reported by the media stream service node in the media stream processing system. The long connection established between the media stream service node and the media stream service node may be a Transmission Control Protocol (TCP) long connection. The node registration request may be specifically sent when the media stream service node is started. Each media stream service node in the media stream processing system may send a node registration request to the coordination server at startup to initiate registration. After receiving the node registration request sent by the media stream service node, the coordination server registers according to the node-related information of the media stream service node carried in the node registration request. Exemplarily, the node-related information may include the node identifier of the media stream service node and the device identifier of the media stream provider that pushes the media stream to the media stream service node. The coordination server may store the node identifier and the device identifier in the node-related information in correspondence, for example, in a database, to achieve registration. Of course, the registration operation can be set according to actual needs. For example, the registration operation can also include authenticating the coordination server. If the coordination server passes the authentication, the registration is confirmed to be successful, and then the node identifier and the device identifier in the node-related information can be stored correspondingly, and a TCP long connection can be established with the media stream service node. In one implementation, a TCP connection can be established through a handshake, and the TCP connection can be maintained to achieve the establishment of a TCP long connection. Among them, multiple data packets can be sent continuously on the TCP connection. During the period when the TCP connection is maintained, if no data packet is sent, both parties can send a detection packet to maintain this connection.

[0053] Accordingly, the above-mentioned operation of receiving the status representation information reported by the media stream service node in the media stream processing system may include: receiving the status representation information reported by the media stream service node based on the long connection. Specifically, after the long connection is established, the media stream service node may send the status representation information directly to the coordination server through the long connection.

[0054] In an embodiment of the present invention, by responding to a node registration request sent by a media stream service node, the media stream service node is registered, and a long connection is established with the media stream service node. The coordination service end receives the state representation information reported by the media stream service node based on the long connection. In other words, when reporting the state representation information, the media stream service node can directly report the state representation information based on the long connection, thereby improving the reporting efficiency of the state representation information to a certain extent, thereby improving the sorting and processing efficiency.

[0055] Optionally, in an embodiment of the present invention, the state representation information may include node heartbeat information and operating parameters. The step of identifying the state of the media stream service node according to the state representation information may specifically include:

[0056] Step 1011: When a reporting interval of the node heartbeat information is greater than a preset threshold and / or the operating parameter exceeds a specified parameter range, it is determined that an abnormality occurs in the media stream service node.

[0057] In this step, when the interval of reporting the node heartbeat information is greater than the preset threshold, it can be determined that the media stream service node is abnormal, or when the operating parameter exceeds the specified parameter range, it can be determined that the media stream service node is abnormal. Alternatively, when the interval of reporting the node heartbeat information is greater than the preset threshold and the operating parameter exceeds the specified parameter range, it can be determined that the media stream service node is abnormal. That is, the media stream service node needs to meet at least one of the following conditions: the interval of reporting the node heartbeat information is greater than the preset threshold and the operating parameter exceeds the specified parameter range, it can be determined that the media stream service node is abnormal.

[0058] Furthermore, the node heartbeat information and operating parameter information can be reported based on the TCP long connection established above. The TCP long connection serves as a reporting channel, so that the media stream service node can conveniently report the node heartbeat information and operating parameter information. Among them, the media stream service node can periodically report the node heartbeat information according to a preset reporting period, and the preset threshold value can be the duration of a preset reporting period. Accordingly, if the reporting interval of the node heartbeat information of the media stream service node is greater than the preset threshold value, it can be determined that the reporting operation of the node heartbeat information exceeds a preset reporting period, the media stream service node fails to report the node heartbeat normally, and the TCP long connection is actively disconnected or abnormally disconnected. Therefore, it can be determined that the media stream service node is abnormal.

[0059] Furthermore, the operating parameters can be used to characterize the health of the media stream service node, and the operating parameter information can also be referred to as health information. The specified parameter range can be the parameter range to which the operating parameters belong in a healthy state. If the operating parameters exceed the specified parameter range, it can be determined that the media stream service node is abnormal. The operating parameters can be included in the heartbeat sent by the media stream service node.

[0060] Accordingly, the following steps may also be performed in the embodiment of the present invention:

[0061] Step B1: when the reporting interval of the node heartbeat information is greater than the preset threshold, all media stream providers that push media streams to the media stream service node are determined as the target providers.

[0062] Step B2: When the operating parameter exceeds the specified parameter range, select some media stream providers from all media stream providers that push media streams to the media stream service node as the target providers.

[0063] For the above steps B1 to B2, they can be performed before selecting a service node for the target provider from other media stream service nodes. Specifically, if the media stream service node has a problem that the reporting interval of the node heartbeat information is greater than the preset threshold, it can be determined that the media stream service node cannot process the media stream. Therefore, all media stream providers that currently push media streams to the media stream service node can be determined as target providers, so that the coordination service end can actively migrate all media streams under the media stream service node to other healthy media stream service nodes based on the active exception handling logic. It should be noted that a media stream service node may have a situation where the reporting interval of the node heartbeat information is greater than the preset threshold and the operating parameters exceed the specified parameter range at the same time. Since the reporting interval of the node heartbeat information is greater than the preset threshold at this time, all media stream providers that push media streams to the media stream service node can be determined as target providers.

[0064] If the media stream service node only has the problem that the operating parameters exceed the specified parameter range, it can be determined that the media stream service node can still bear part of the media stream. Therefore, some media stream providers can be selected from all the media stream providers that push media streams to the media stream service node as target providers. Among them, the operating parameters may include the utilization rate of the central processing unit (CPU) and the memory utilization rate. The CPU utilization rate can characterize the service's own CPU load information, and the memory utilization rate can characterize the service's own memory load information. Of course, other information may also be included, for example, it may also include load rate, media stream load information (for example, the number or flow of media streams currently loaded). If these parameters reach the corresponding alarm threshold, that is, exceed the corresponding fixed parameter range, then the coordination service end can actively migrate some media stream providers to other healthy media stream service nodes based on the active exception handling logic.

[0065] Specifically, some media stream providers may be randomly selected as target providers, or a preset algorithm may be used for selection, which is not limited in the embodiments of the present invention. For example, a specified proportion of media stream providers may be randomly selected as target providers. The specified proportion may be set according to actual needs, for example, the specified proportion may be 30%, 40% or 50%, etc. Alternatively, a media stream provider may be randomly selected as a target provider until the load caused by the remaining media streams to the media stream service node is reduced to an acceptable range and the operating parameters of the media stream service node fall within the specified parameter range.

[0066] In an embodiment of the present invention, when the reporting interval of the node heartbeat information is greater than a preset threshold and / or the operating parameters exceed the specified parameter range, it is determined that an abnormality has occurred in the media stream service node, thereby ensuring the efficiency of abnormal monitoring to a certain extent. Accordingly, when the reporting interval of the node heartbeat information is greater than the preset threshold, all media stream providers that push media streams to the media stream service node are determined as target providers. When the operating parameters exceed the specified parameter range, some media stream providers are selected from all media stream providers that push media streams to the media stream service node as target providers. In this way, by specifically determining the target provider, it is possible to reduce the workload of migration as much as possible while ensuring that the media stream processing system can stably provide media streams to users through migration.

[0067] Optionally, the step of selecting a service node for the target provider from other media stream service nodes as the target media stream service node according to the access location information of the target provider of the media stream service node may specifically include:

[0068] Step 1021: determine a candidate area; the distance between the candidate area and the access location represented by the access location information meets a preset requirement.

[0069] Step 1022: other media stream service nodes located in the at least one to-be-selected area are used as to-be-selected service nodes, and the target media stream service node is selected from the to-be-selected service nodes according to current load information of the to-be-selected service nodes.

[0070] For the above steps 1021 to 1022, the candidate area can be determined by querying the nearest available service. Specifically, the distance between the access location represented by the access location information and each available area can be determined, and the first M available areas with the smallest distance are used as the candidate area. For example, M can be 3, or 5, etc. Alternatively, the available area whose distance is less than the preset distance threshold is used as the candidate area. Among them, the available area can be an area where the media stream service node in the media stream processing system is deployed. The specific values ​​of M and the preset distance threshold can be set according to actual needs, and the embodiment of the present invention does not limit this. Alternatively, the candidate area whose distance from the access location represented by the access location information meets the preset requirements can be added to the candidate list in advance. In this step, the candidate list of the media stream service node with the abnormality can be directly obtained, and the area recorded in the candidate list is used as the candidate area.

[0071] Furthermore, the media stream service nodes in the candidate areas except the media stream service node with the abnormality are the candidate service nodes. The current load information of the candidate service nodes may be the information carried in the state representation information reported by the candidate service nodes.

[0072] In the embodiment of the present invention, an area whose distance from the access location represented by the access location information meets the preset requirements is used as a candidate area, and a target media stream service node is selected from the candidate service nodes located in at least one candidate area according to the current load information of the candidate service nodes. In this way, the problem that the selected target media stream service node is too far away from the target provider, thereby causing low media stream push efficiency, can be avoided to a certain extent.

[0073] Optionally, the step of selecting the target media stream service node from the candidate service nodes according to the current load information of the candidate service nodes may specifically include:

[0074] Step 10221: select the candidate area with the shortest distance as the target area. If there is a candidate service node in the target area whose current load information matches the media stream provided by the target provider, then the candidate service node whose current load information matches the media stream provided by the target provider is determined as the target media stream service node.

[0075] Step 10222: If there is no candidate service node in the target area whose current load information matches the media stream provided by the target provider, update the target area to the candidate area with the shortest distance among the remaining candidate areas until the target media stream service node is determined.

[0076] For the above steps 10221 to 10222, the selected area can be detected in order from near to far distance to determine whether there is a selected service node in the selected area whose current load information matches the media stream provided by the target provider. Among them, the current load information can be the number of media streams or traffic currently loaded by the selected service node, and the currently loaded media stream refers to the media stream pushed to the selected service node. If the difference between the maximum number of media streams that the selected service node can load and the number of media streams currently loaded is not less than the number of media streams provided by the target provider, and / or the difference between the maximum traffic that the selected service node can load and the media stream traffic currently loaded is not less than the total media stream traffic provided by the target provider, it can be determined that the current load information of the selected service node matches the media stream provided by the target provider, so as to avoid the selected target media stream service node being unable to process the migrated media stream normally. Accordingly, the selected service node whose current load information matches the media stream provided by the target provider can be used as the target media stream service node of the target provider. Among them, the target media stream service nodes of different target providers may be the same or different. That is to say, there may be multiple target media stream service nodes, and each target media stream service node is connected to some target providers. Alternatively, it is also possible to directly select a candidate service node that can accommodate all media streams of all target providers as the target media stream service node, and the target media stream service nodes of all target providers are the same. For example, the difference between the maximum number of loadable and the number of media streams currently loaded is not less than the sum of the numbers of all media streams provided by all target providers, and / or the difference between the maximum flow that the candidate service node can load and the media stream flow currently loaded is not less than the sum of the flow of all media streams provided by all target providers is selected as the target media stream service node.

[0077] On the contrary, if the difference between the maximum number of media streams that the candidate service node can load and the number of media streams that are currently loaded is less than the number of media streams provided by the target provider, and / or the difference between the maximum flow that the candidate service node can load and the media stream flow that is currently loaded is less than the total media stream flow provided by the target provider, it can be determined that there is no match. Accordingly, the candidate area with the smallest distance from the access location in the candidate area that has not been used as the target area can be used as a new target area to re-execute the step of determining the candidate service node whose current load information matches the media stream provided by the target provider as the target media stream service node if there is a candidate service node whose current load information matches the media stream provided by the target provider in the target area, until the target media stream service node is determined for the target provider. Accordingly, after determining the target media stream service of the target provider, the target media stream service can continue to be determined for the remaining target providers. In this way, according to the actual access area, the access media stream service is allocated nearby according to the access area, which can ensure the reliable migration of the original traffic to a certain extent.

[0078] It should be noted that the candidate service node in the farthest candidate area can be a media stream service node specifically used to receive migration, so as to ensure that the target media stream service node can be determined for the target provider in the end, and to ensure that the migration operation can proceed smoothly. Alternatively, when the target media stream service node is not selected from the candidate service node according to the nearest access, a global query of available nodes can be performed, that is, the target media stream service node is selected from other media stream service nodes outside the candidate area in the media stream processing system. In the embodiment of the present invention, the media stream can also be migrated regularly according to the access distance, so as to migrate the media stream to a media stream service node that is closer to the access location of the media stream provider as much as possible.

[0079] In an embodiment of the present invention, the candidate area with the shortest distance is first used as the target area. If there is a candidate service node whose current load information matches the media stream provided by the target provider in the target area, the candidate service node whose current load information matches the media stream provided by the target provider is determined as the target media stream service node. If there is no candidate service node, the target area is continuously updated to the candidate area with the shortest distance among the remaining candidate areas until the target media stream service node is determined. In this way, the target media stream service node is sequentially selected from the candidate areas according to the distance from the access location. To a certain extent, the load of the candidate service node can be taken into consideration, ensuring that the selected target media stream service node can normally process the migrated media stream, while selecting a target media stream service node that is closer to the target provider as much as possible.

[0080] Optionally, the step of migrating the media stream of the target provider to the target media stream service node may specifically include:

[0081] Step 1031: According to the preset correspondence between the signaling service node and the media stream provider, search for the signaling service node corresponding to the target provider as the target signaling service node.

[0082] Step 1032: forwarding a target streaming instruction to the target provider based on the target signaling service node to perform media stream migration; the target streaming instruction is used to instruct the target provider to push the media stream to the target media stream service node.

[0083] For the above steps 1031 to 1032, the signaling service node may belong to an information service cluster, and one signaling service node may correspond to a signaling service in the signaling service cluster. The signaling service may be a signaling service based on the Session Initiation Protocol (SIP), that is, a plurality of SIP signaling services may be included in the signaling service cluster. When the media stream provider interacts with the coordination service end, the data transmitted between the two may be forwarded through the signaling service node. Each signaling service node may correspond to part of the media stream provider, and each signaling service node is responsible for forwarding the data of the corresponding media stream provider. Among them, the signaling service node corresponding to the media stream provider has established a connection with the media stream provider. Therefore, by searching for the target signaling service node corresponding to the target provider, the target push stream instruction is forwarded to the target provider based on the target signaling service node, which can improve the instruction transmission efficiency to a certain extent. Exemplarily, take the media stream provider as a high-definition network camera (IP CAMERA, IPC) as an example. Figure 2 is a schematic diagram of a scenario provided by an embodiment of the present invention, such as Figure 2As shown, the IPC in the media stream processing system can forward signals through the Nginx service and the signaling service cluster to transmit Hypertext Transfer Protocol (HTTP) requests between the coordination service cluster. The IPC can also push media streams to the media stream node cluster. The TCP heartbeat can be maintained with the coordination service cluster, that is, the node heartbeat information is reported. The coordination service cluster can interact with the media stream node cluster based on HTTP requests for control. The IPC, the signaling service cluster, the coordination service cluster and the media stream node cluster can interact with each other to achieve media stream migration. Among them, the overall structure of the TCP heartbeat message may include a message header, a message body and data verification. Among them, the message header may include a frame start character, a protocol version number, whether it is encrypted, a media service (media Server) ID length / media Server ID value and a data packet length. The message body may include a media service business data length, a media stream payload data length, a media stream payload data, a CPU payload data length, a memory payload data length, and a media service memory payload data. The data verification may include a parameter model (e.g., CRC32) and a frame end character.

[0084] The coordination service end can send the target push stream instruction to the target signaling service node, and the target signaling service node sends the target push stream instruction to the target provider. Specifically, the correspondence relationship can specifically record the correspondence between the node information of the signaling service node and the device information of the media stream provider. The coordination service end can send the target push stream instruction carrying the device information of the target provider to the target signaling service node based on the node information of the target signaling service node recorded in the correspondence, so that the target signaling service node can locate the target provider based on the device information of the target provider, and send the target push stream instruction to the target signaling service node based on the connection with the target provider. In specific implementation, the target interruption instruction can be sent to the target signaling service node first, and the target signaling service node sends the target interruption instruction to the target provider, and the target interruption instruction is used to instruct the target provider to stop pushing the media stream to the media stream service node that has identified an abnormality. Further, after stopping pushing the media stream, the target push stream instruction is forwarded to the target provider based on the target signaling service node.

[0085] In the embodiment of the present invention, according to the correspondence between the preset signaling service node and the media stream provider, the target signaling service node corresponding to the target provider is searched. Based on the target signaling service node, the target provider is forwarded with the target push stream instruction for instructing the target provider to push the media stream to the target media stream service node. In this way, it can be ensured to a certain extent that the target push stream instruction can be smoothly forwarded to the target provider, thereby ensuring that the media stream migration can be successfully completed.

[0086] Optionally, the embodiment of the present invention may further include the following steps to achieve the creation of a corresponding relationship between the signaling service node and the media stream provider:

[0087] Step C1: Acquire device information of a media stream provider in the media stream processing system and node information of a signaling service node registered for the media stream provider.

[0088] Step C2: establishing the corresponding relationship according to the device information and the node information.

[0089] For the above steps C1 to C2, the media stream provider can generate a device registration request and send it to the signaling service node for device registration. Each media stream provider can send a device registration request at startup. The coordination service end can query the media stream provider in the media stream processing system for the device information of the media stream provider, as well as the node information of the signaling service node that registers the media stream provider. Among them, the device information may include an IP address, port (PORT) information, and a device ID. The node information may include an IP address. Further, the node information may also include port (PORT) information. Among them, the media stream provider may be a device that complies with a specified protocol standard, for example, a device that complies with GB28181.

[0090] Exemplarily, for any registered media stream provider, the device information of the registered media stream provider can be used as the key name (Key), and the node information of the signaling service node registered for the media stream provider can be used as the key value (Value), and stored in the database in the form of a key-value pair (Key-Value), thereby obtaining the above correspondence. The database can be a Redis database, and the Key in the key-value pair (Key-Value) can be: Redis Key: DEVICE#IP#PORT#Device ID, RedisValue: SIP IP+SIPPORT. "DEVICE" means that the Key is the relevant information of the device.

[0091] Take the media stream provider as IPC as an example. Figure 3 is a schematic diagram of a registration process provided by an embodiment of the present invention, such as Figure 3As shown, the IPC device can first initiate device registration, and forward the User Datagram Protocol (UDP) message through the Nginx service to send the device registration request to the SIP signaling service. Among them, the SIP signaling service can include a SIP cluster processing unit, and the SIP signaling service is a signaling service node. Specifically, the SIP signaling service can monitor the UDP port based on the JAIN-SIP framework. After the device registration request is monitored, XML parsing is performed, and after parsing, it is forwarded to the device registration module for processing according to the monitored message type. Specifically, device authentication can be performed to query whether the device information exists. In an embodiment of the present invention, when registering the media stream provider, the media stream provider can be authenticated. After the device registration is completed, a corresponding relationship between the signaling service node responsible for authenticating the media stream provider and the media stream provider can be established, and the information of the media stream provider and the media stream provider can be saved to the Redis server. Therefore, the processing logic can include: if the device information exists and is legal, it can be determined that the registration is successful. After the device is successfully registered, the cluster relationship between the device and the SIP signaling service is maintained to facilitate the subsequent coordination service to start live broadcast, cancel live broadcast, message subscription, pan / tilt control and other downlink requests. On the contrary, if the device information does not exist or is illegal, the device registration fails, and the failure information can be returned to the device so that the device can re-initiate registration according to the policy. Among them, the device is the media stream provider. When querying the device information, the message header of the information sent by the SIP signaling service can include the SIP IP, so that the coordination service can query the device information based on the Redis server and return whether the device information exists. Among them, the Redis server can include the corresponding relationship between the media stream provider and the signaling service node, for example, it can include: "Device1: SIP1; Device2: SIP2; Device3: SIP1; Device4: SIP3;...". If the device information does not exist or is illegal, the device registration fails.

[0092] Furthermore, the SIP signaling service can assemble XML based on the returned information and return the registration success or failure. Finally, based on JAIN-SIP and the source port return, the information representing the registration success or failure is returned to the IPC.

[0093] In the embodiment of the present invention, by acquiring the device information of the media stream provider in the media stream processing system and the node information of the signaling service node registered for the media stream provider, a corresponding relationship is established according to the device information and the node information. Since the signaling service node registered for the media stream provider is often the signaling service node responsible for forwarding information for the media stream provider, the accuracy of the established corresponding relationship can be ensured to a certain extent.

[0094] It should be noted that the coordination service end may also regularly update and maintain the corresponding relationship according to the device heartbeat of the media stream provider end to ensure the accuracy of the corresponding relationship. Specifically, when the media stream provider end reports the device heartbeat, the node information of the SIP signaling service used by the media stream provider end may be obtained, and based on the newly obtained node information of the SIP signaling service, the node information corresponding to the device information of the media stream provider end in the corresponding relationship may be updated.

[0095] In the embodiment of the present invention, after the device heartbeat is reported, the coordination service will maintain the relationship between the device and the SIP signaling service in real time according to the device registration information. This relationship can help the coordination service locate the device signaling currently in a certain SIP signaling service for sending downlink requests. Figure 4 A schematic diagram of a device heartbeat processing process provided by an embodiment of the present invention is as follows: Figure 4 As shown, the IPC device can first initiate a device heartbeat, and forward the UDP message through the Nginx service to send the device heartbeat information to the SIP signaling service. The SIP signaling service can monitor the UDP port based on the JAIN-SIP framework. After monitoring the device heartbeat information, XML parsing is performed, and after parsing, it is forwarded to the device heartbeat maintenance module for processing according to the monitored message type. Specifically, it can be queried whether the device is registered. If the device is registered and the heartbeat is legal, the corresponding relationship can be updated. Otherwise, it is determined that the heartbeat is illegal, and the device can re-initiate registration. Among them, the coordination service query whether the device is registered can include querying the device registration information from the Redis database and returning the device registration information. If the query is found, the returned device registration information is not empty, then it can be determined that the heartbeat is legal, and then the heartbeat can be returned to be legal, for example, the "200OK" instruction. Otherwise, if it is not found, the returned device registration information is empty, then it can be determined that the heartbeat is illegal.

[0096] Furthermore, the SIP signaling service can assemble XML according to the returned information and return the heartbeat legality or illegality. Finally, based on the JAIN-SIP and source port return, the information indicating whether the heartbeat is legal or not is returned to the IPC.

[0097] It should be noted that after the media stream migration, the coordination service can perform stream monitoring. If the migration is monitored to be successful, the migration process is completed. If a failure is monitored, the target media stream service node is reselected. Specifically, the target provider can send a test packet to the target media stream service node. The target media stream service node can start stream monitoring after receiving a new streaming media packet and report the monitoring situation to the coordination service. The coordination service can determine whether the monitoring is successful based on the received monitoring situation. Exemplarily, the monitoring situation may include a normal streaming media packet and an abnormal streaming media packet. If the streaming media packet is abnormal, it is determined that the monitoring is successful; if the streaming media packet is abnormal, it is determined that the monitoring is failed.

[0098] Furthermore, the coordinator cluster can be responsible for all media stream cluster management, and the media stream cluster can be responsible for the reception, transpackaging, transcoding, and distribution of media streams. The coordination service only acts as a computing node, not a data node. All data is stored in the redis cluster. At the same time, it maintains a TCP long connection with each media stream service node for cluster exception handling and fault recovery. The coordinator cluster is composed of multiple coordination services. The working logic of the coordination service may include: real-time maintenance of the relationship between the device and the signaling gateway during device registration and device heartbeat. Media stream service node registration and heartbeat, real-time maintenance of media stream load details, health check status, and flow monitoring status; active reporting of service anomalies, active discovery of abnormal services and abnormal flows, and active business recovery. Exemplarily, Figure 5 is a schematic diagram of a coordination service provided by an embodiment of the present invention. Figure 5 As shown, the coordination service can complete device authentication and device heartbeat maintenance based on the Redis cluster. And, manage media streaming services and IPC based on HTTP requests. Among them, the uplink message in the HTTP request can be used for reporting, and the downlink message can be used for sending. "Obtaining the SIP server where the device is located" can specifically refer to determining the target signaling service node, and "service management" can include operations such as restart and recovery. "Service load reporting and service health status reporting" can specifically refer to reporting operating parameters and load information.

[0099] Further, Figure 6 is a schematic diagram of flow management of a coordination service provided by an embodiment of the present invention, such as Figure 6As shown, the coordination service can control the media stream providing device to cut off or pull the stream based on the SIP signaling service, maintain a TCP heartbeat connection with the media stream service, and send an HTTP request. For example, the media stream service can return the stream monitoring situation based on the HTTP request. The media stream service can also register the media stream, and the media module in the coordination service can return the registration success or failure. Accordingly, a TCP long connection can be established when the registration is successful. The successfully registered media stream service can also send a media stream heartbeat to the heartbeat module, and the media stream heartbeat can include load information, CPU, memory and other information, that is, the above-mentioned state representation information. Among them, the heartbeat module can also process the media stream heartbeat information, compare the heartbeat queue, and the difference device disconnects the live stream or re-pulls the live stream. In the case of TCP connection disconnection, CPU alarm, and memory alarm, the active exception handling module in the coordination service can perform exception handling. Specifically, the exception handling can include migrating all streams to other media stream services if the TCP connection is disconnected; if the CPU alarm and memory alarm are, migrating part of the stream to other media stream services. The polling module in the coordination service can obtain all existing stream addresses from Redis, perform self-check on the stream addresses, and check whether the stream status is normal. If the stream status query is abnormal, migrate the abnormal stream to other media stream services.

[0100] Optionally, the embodiment of the present invention may further include the following steps:

[0101] Step D1: Obtain the stream address of each media stream provider in the media stream processing system.

[0102] Step D2: When it is detected based on the stream address that the media stream pushed by the media stream provider is abnormal, the media stream is migrated.

[0103] For the above steps D1 to D2, the coordination server can poll each media stream provider in the body stream processing system. The stream address may refer to the address of the media stream provider. For example, assuming that the media stream provider is an IPC, when shaking hands with the IPC, the IPC will inform its own stream address. The IP address corresponding to each IPC can be stored in the Redis database. The IP address corresponding to the IPC can be assigned by the system, or it can be obtained after the IPC is routed based on the address assigned by the system.

[0104] Further, based on the stream address of the media stream provider, it is possible to detect whether the media stream provided by the media stream provider is abnormal, and perform a self-check of the stream address. Specifically, based on the stream address of the media stream provider at the media stream output port of the media stream provider, it is possible to detect whether a preset detection word can be detected when pulling the stream from the media stream provider. If not, it can be determined that the media stream pushed by the media stream provider is abnormal. It is also possible to further perform a stream state query from the media stream service node, if the stream state query result returned by the media stream service node indicates that the media stream pushed by the media stream provider is abnormal. Specifically, the alarm information of the link where the media stream pushed by the media stream provider is located can be obtained, and if the alarm information is successfully obtained, a stream state query result indicating an abnormality is generated. Otherwise, a stream state query result indicating normality is generated. Accordingly, if the stream state query is abnormal and the preset detection word cannot be detected, it is determined that the media stream pushed by the media stream provider is abnormal. Otherwise, it can be determined that no abnormality has occurred.

[0105] Furthermore, in the event that an abnormality occurs in the media stream pushed by the media stream provider, the media stream is migrated. Specifically, a media stream service node may be reselected for the media stream, and the media stream provider may be controlled to push the media stream to the reselected media stream service node. The specific control method may refer to the aforementioned related description and will not be described in detail here. In the embodiment of the present invention, the media stream provider may also be triggered to restart so as to fix the problem by restarting as much as possible when there is a problem with the media stream provider. If the restart fails and it is confirmed that the media stream provider fails, the fault information may be further reported.

[0106] For example, all live media streams can be actively polled based on the stream status polling module. Once a certain media stream under a certain media stream service node is found to be unable to be broadcast live, the media stream is migrated to other media stream service nodes. Among them, the polling module can be managed for IPC, specifically, the link from IPC to the service deployment room (the room of the data center where the media stream gateway is deployed). The traffic of this link can be sent to the gateway through the metropolitan area network, and then enter the cloud network. After entering the cloud network, it is transmitted and aggregated and exchanged inside the data center to the cabinet in the room.

[0107] In the embodiment of the present invention, by acquiring the stream address of each media stream provider in the media stream processing system, when detecting an abnormality in the media stream pushed by the media stream provider based on the stream address, the media stream is migrated, which can further ensure that the media stream in the media stream processing system can be stably provided to the user, thereby improving the stability of the system.

[0108] Optionally, the embodiment of the present invention may also include the following steps: Step E1, periodically detect the difference tags of each media stream service node; if the difference tag is detected, the media stream of the media stream service node associated with the difference tag is disconnected. Specifically, regular polling can be performed to periodically detect the difference tags of each media stream service node. Among them, the difference tag can be set by other services, and the difference tag can be set according to the data packet transmission situation on the link of the media stream service node. For example, the difference tag can be set for the media stream service node when the number of retransmissions is greater than the preset number threshold, the bandwidth during streaming, the jitter is abnormal, or the transmitted screen is black. Correspondingly, if the difference tag is detected, the media stream of the media stream service node associated with the difference tag is disconnected. Reconnection can be performed automatically later, or reconnection can be triggered when the user needs it.

[0109] For example, take the live streaming scenario as an example. In one implementation, Figure 7 is an interactive flow chart provided by an embodiment of the present invention, such as Figure 7 As shown, the device represents the media stream provider, the signaling gateway represents the signaling service node, the coordinator represents the coordination service, and the media server represents the media stream service node. The media stream service node can be distributed in different user regions, and multiple media stream service nodes can be built. The coordination service can be deployed in the central node, and the signaling service and the media stream service can be deployed in the edge node.

[0110] Specifically, the coordinator is responsible for monitoring the service status and flow status of all downstream media stream service nodes; responsible for receiving uplink data and sending downlink requests. In order to realize media stream service status monitoring, service status reporting can be performed, including: CPU, memory usage, service heartbeat maintenance; real-time video stream monitoring data reporting, abnormal stream reporting; real-time stream load information reporting. When the coordinator finds an abnormality, it will actively migrate the device flow to the nearest available media stream service.

[0111] Specifically, when the device performs device registration and device heartbeat, it can forward uplink signaling based on the Nginx service, and maintain device registration information and maintain device and signaling service relationships based on the Redis cluster. The media server can register services, maintain TCP heartbeats, and report load and health status to the coordinator. The coordinator can maintain heartbeats with the Redis cluster and store media service information in the Redis cluster. The coordinator can also query the device information under the abnormal service when reporting service exception information, that is, when the media service information reported by the media server indicates that the media server is abnormal, and obtain the device list returned by the Redis cluster. Among them, the device list records the devices that push media streams to the media stream service with the abnormality. Then, a disconnection request can be sent to these devices, and downlink signaling can be forwarded based on the Nginx service to disconnect the device stream. Then, a query for nearby available services can be performed to obtain the service information returned by the Redis cluster. Among them, the service information can include information about the selected area. The coordinator can determine the target media stream service node based on the service information. After determining the target media stream service node, the coordinator issues a live broadcast request (i.e., a target push stream request) to request live broadcast and control the device to push the stream to the new streaming media, i.e., control the device to push the media stream to the target media stream service node. In this way, the coordinator interacts with all parties to control the device to cut off the stream and re-push the stream, thereby achieving live stream migration.

[0112] The following is an explanation in conjunction with the video streaming scenario. In order to meet the needs of various services, it is necessary to ensure the stable and uninterrupted operation of the platform. Therefore, in an embodiment of the present invention, a flexible video stream migration system is created based on the original video cloud platform. A distributed signaling gateway is built based on JAIN-SIP, and the signaling service is decoupled from the media stream service. The SIP signaling service is only used for signaling processing and does not participate in the reception or forwarding of video streams. The media stream service is used to receive, process, and forward video streams sent by the device, and is also managed by the cluster coordination service as a media stream processing module within the cluster.

[0113] Furthermore, by introducing a coordinator that does not rely on other components, computing resources are decoupled from data resources. The coordinator proactively discovers abnormal nodes and proactively migrates abnormal node flows. By flexibly scheduling media flows between media flow service nodes and controlling media flow migration, the entire media flow processing system can be ensured to run smoothly and reliably to a certain extent, improving the reliability of the system, thereby ensuring smooth and reliable operation of the business and reducing manual operation and maintenance costs. In addition, the operation status of global services and video flows can be obtained from the coordinator, which facilitates operation and maintenance.

[0114] Figure 8is a flowchart of another method for media stream migration provided by an embodiment of the present invention, the method can be applied to a media stream processing system, the system includes a media stream service node, a coordination server and a media stream service node; Figure 8 As shown, the method may include:

[0115] Step 201: The media stream service node reports status representation information to the coordination server;

[0116] Step 202: the coordination server identifies the state of the media stream service node according to the state representation information;

[0117] Step 203: When the coordination service end identifies that the media stream service node is abnormal, the coordination service end selects a service node for the target provider from other media stream service nodes according to the access location information of the target provider of the media stream service node as the target media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node;

[0118] Step 204: The coordination server migrates the media stream of the target provider to the target media stream service node.

[0119] Among them, the implementation method of each step and the technical effect that can be achieved can refer to the corresponding content mentioned above and will not be repeated here.

[0120] Further, Fig. 9 It is a block diagram of a media stream processing system provided by an embodiment of the present invention. The system may include a media stream service node 301, a coordination server 302 and a media stream service node 303.

[0121] The media stream service node 301 is used to report status representation information to the coordination server 302;

[0122] The coordination server 302 is used to identify the state of the media stream service node 303 according to the state representation information;

[0123] The coordination service end 302 is further used to select a service node for the target provider from other media stream service nodes as the target media stream service node according to the access location information of the target provider of the media stream service node 303 when an abnormality is identified in the media stream service node 303; the target provider includes a media stream provider that pushes the media stream to the media stream service node;

[0124] The coordination server 302 is further configured to migrate the media stream of the target provider to the target media stream service node.

[0125] In summary, the media stream processing system provided by the embodiment of the present invention receives the status representation information reported by the media stream service node in the media stream processing system through the coordination service end in the media stream processing system, and identifies the status of the media stream service node according to the status representation information. When it is identified that the media stream service node is abnormal, a service node is selected from other media stream service nodes for the target provider according to the access location information of the target provider of the media stream service node, as the target media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node. The media stream of the target provider is migrated to the target media stream service node. In this way, by introducing a coordination server into the media stream processing system, the coordination server actively identifies abnormalities in the media stream service nodes. When an abnormality is identified in the media stream service node, the media stream previously pushed to the abnormal media stream service node is automatically migrated to the target media stream service node, thereby avoiding the problem that the media stream processing system cannot stably provide media streams to users due to the abnormality of the media stream service node and cannot process the pushed media streams normally. This in turn avoids the problem that the media stream processing system cannot stably provide media streams to users. This enables the media stream processing system to stably provide media streams to users to a certain extent.

[0126] Fig.10 : is a structural diagram of a media stream migration device provided by an embodiment of the present invention, the device is applied to a coordination server in a media stream processing system, and the device may include:

[0127] The first receiving module 401 is used to receive the state representation information reported by the media stream service node in the media stream processing system, and identify the state of the media stream service node according to the state representation information;

[0128] The selection module 402 is used to select a service node for the target provider from other media stream service nodes as the target media stream service node according to the access location information of the target provider of the media stream service node when an abnormality is identified in the media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node;

[0129] The first migration module 403 is used to migrate the media stream of the target provider to the target media stream service node.

[0130] Optionally, the device further comprises:

[0131] A second receiving module, configured to receive a node registration request sent by the media stream service node;

[0132] A registration module, configured to register the media stream service node in response to the node registration request, so as to establish a persistent connection with the media stream service node;

[0133] The first receiving module 401 is specifically configured to receive status representation information reported by the media stream service node based on the long connection.

[0134] Optionally, the state representation information includes node heartbeat information and operating parameters; the first receiving module 401 is further specifically used for:

[0135] When the reporting interval of the node heartbeat information is greater than a preset threshold and / or the operating parameter exceeds a specified parameter range, determining that an abnormality occurs in the media stream service node;

[0136] The device also includes:

[0137] A first determining module is used to determine all media stream providing terminals that push media streams to the media stream service node as the target providing terminals when the reporting interval of the node heartbeat information is greater than the preset threshold;

[0138] The second determining module is configured to select some media stream providing terminals from all media stream providing terminals that push media streams to the media stream service node as the target providing terminals when the operating parameter exceeds the specified parameter range.

[0139] Optionally, the selection module 402 is specifically configured to:

[0140] Determine a candidate area; the distance between the candidate area and the access location represented by the access location information meets a preset requirement;

[0141] Other media stream service nodes located in the at least one to-be-selected area are used as to-be-selected service nodes, and the target media stream service node is selected from the to-be-selected service nodes according to current load information of the to-be-selected service nodes.

[0142] Optionally, the selection module 402 is further configured to:

[0143] The candidate area with the shortest distance is taken as the target area. If there is a candidate service node whose current load information matches the media stream provided by the target provider in the target area, the candidate service node whose current load information matches the media stream provided by the target provider is determined as the target media stream service node;

[0144] If there is no candidate service node in the target area whose current load information matches the media stream provided by the target provider, the target area is updated to the candidate area with the shortest distance among the remaining candidate areas until the target media stream service node is determined.

[0145] Optionally, the first migration module 403 is specifically configured to:

[0146] According to the preset correspondence between the signaling service node and the media stream provider, searching for the signaling service node corresponding to the target provider as the target signaling service node;

[0147] Based on the target signaling service node, a target streaming instruction is forwarded to the target provider to perform media stream migration; the target streaming instruction is used to instruct the target provider to push the media stream to the target media stream service node.

[0148] Optionally, the device further comprises:

[0149] A first acquisition module, used to acquire device information of a media stream provider in the media stream processing system and node information of a signaling service node registered for the media stream provider;

[0150] An establishing module is used to establish the corresponding relationship according to the device information and the node information.

[0151] Optionally, the device further comprises:

[0152] A second acquisition module, used to acquire the stream address of each media stream provider in the media stream processing system;

[0153] The second migration module is used to migrate the media stream when it is detected based on the stream address that the media stream pushed by the media stream provider is abnormal.

[0154] The present invention also provides an electronic device, see Fig.11 , including: a processor 901, a memory 902, and a computer program 9021 stored in the memory and executable on the processor, wherein the processor implements the media stream migration method of the aforementioned embodiment when executing the program.

[0155] The present invention also provides a readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the media stream migration method of the aforementioned embodiment.

[0156] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0157] It should be noted that the various information and data obtained in the embodiments of the present invention are all obtained with the authorization of the information / data holder.

[0158] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific languages ​​is for disclosing the best mode of the present invention.

[0159] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0160] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0161] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0162] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0163] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

[0164] The user information (including but not limited to the user's device information, user personal information, etc.) and related data involved in the present invention are all information authorized by the user or by all parties.

[0165] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0166] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0167] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A media stream migration method, characterized in that: The method is applied to a coordination server in a media stream processing system, and the method comprises: Receiving status representation information reported by a media stream service node in the media stream processing system, and identifying the status of the media stream service node according to the status representation information; When it is identified that the media stream service node is abnormal, according to the access location information of the target provider of the media stream service node, a service node is selected from other media stream service nodes for the target provider as the target media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node; Migrating the media stream of the target provider to the target media stream service node; The step of migrating the media stream of the target provider to the target media stream service node includes: According to the preset correspondence between the signaling service node and the media stream provider, searching for the signaling service node corresponding to the target provider as the target signaling service node; Based on the target signaling service node, a target streaming instruction is forwarded to the target provider to perform media stream migration; the target streaming instruction is used to instruct the target provider to push the media stream to the target media stream service node.

2. The method according to claim 1, characterized in that The method further comprises: Receiving a node registration request sent by the media stream service node; In response to the node registration request, register the media stream service node to establish a persistent connection with the media stream service node; The receiving the status representation information reported by the media stream service node in the media stream processing system includes: receiving the status representation information reported by the media stream service node based on the long connection.

3. The method according to claim 1, characterized in that The state representation information includes node heartbeat information and operating parameters; and the state identification of the media stream service node according to the state representation information includes: When the reporting interval of the node heartbeat information is greater than a preset threshold and / or the operating parameter exceeds a specified parameter range, determining that an abnormality occurs in the media stream service node; The method further comprises: In a case where the reporting interval of the node heartbeat information is greater than the preset threshold, determining all media stream providers that push media streams to the media stream service node as the target providers; In the case that the operating parameter exceeds the specified parameter range, some media stream providers are selected from all media stream providers that push media streams to the media stream service node as the target providers.

4. The method according to claim 1, characterized in that: The selecting a service node for the target provider from other media stream service nodes as the target media stream service node according to the access location information of the target provider of the media stream service node comprises: Determine a candidate area; the distance between the candidate area and the access location represented by the access location information meets a preset requirement; Other media stream service nodes located in at least one of the to-be-selected areas are used as to-be-selected service nodes, and the target media stream service node is selected from the to-be-selected service nodes according to current load information of the to-be-selected service nodes.

5. The method according to claim 4, characterized in that The selecting the target media stream service node from the candidate service nodes according to the current load information of the candidate service nodes includes: The candidate area with the shortest distance is taken as the target area. If there is a candidate service node whose current load information matches the media stream provided by the target provider in the target area, the candidate service node whose current load information matches the media stream provided by the target provider is determined as the target media stream service node; If there is no candidate service node in the target area whose current load information matches the media stream provided by the target provider, the target area is updated to the candidate area with the shortest distance among the remaining candidate areas until the target media stream service node is determined.

6. The method according to claim 1, characterized in that The method further comprises: Acquire device information of a media stream provider in the media stream processing system and node information of a signaling service node registered for the media stream provider; The corresponding relationship is established according to the device information and the node information.

7. The method according to claim 1, characterized in that The method further comprises: Obtaining the stream address of each media stream provider in the media stream processing system; When it is detected based on the stream address that an abnormality occurs in the media stream pushed by the media stream provider, the media stream is migrated.

8. A media stream migration method, characterized in that: The method is applied to a media stream processing system, the system comprising a media stream service node and a coordination service end; the method comprises: The media stream service node reports status representation information to the coordination server; The coordination server identifies the state of the media stream service node according to the state representation information; When the coordination service end identifies that the media stream service node is abnormal, the coordination service end selects a service node for the target provider end from other media stream service nodes as the target media stream service node according to the access location information of the target provider end of the media stream service node; the target provider end includes a media stream provider end that pushes the media stream to the media stream service node; The coordination server migrates the media stream of the target provider to the target media stream service node; The step of migrating the media stream of the target provider to the target media stream service node includes: According to the preset correspondence between the signaling service node and the media stream provider, searching for the signaling service node corresponding to the target provider as the target signaling service node; Based on the target signaling service node, a target streaming instruction is forwarded to the target provider to perform media stream migration; the target streaming instruction is used to instruct the target provider to push the media stream to the target media stream service node.

9. A media stream migration device, characterized in that: The device is applied to a coordination server in a media stream processing system, and the device comprises: A first receiving module, configured to receive status representation information reported by a media stream service node in the media stream processing system, and identify the status of the media stream service node according to the status representation information; A selection module is used to select a service node for the target provider from other media stream service nodes as the target media stream service node according to the access location information of the target provider of the media stream service node when an abnormality is identified in the media stream service node; the target provider includes a media stream provider that pushes the media stream to the media stream service node; A first migration module, configured to migrate the media stream of the target provider to the target media stream service node; Wherein, the first migration module is specifically used for: According to the preset correspondence between the signaling service node and the media stream provider, searching for the signaling service node corresponding to the target provider as the target signaling service node; Based on the target signaling service node, a target streaming instruction is forwarded to the target provider to perform media stream migration; the target streaming instruction is used to instruct the target provider to push the media stream to the target media stream service node.

10. A media stream processing system, characterized in that: The system comprises: a media stream service node and a coordination service end; The media stream service node is used to report status representation information to the coordination server; The coordination server is used to identify the state of the media stream service node according to the state representation information; The coordination service end is further used to select a service node for the target provider from other media stream service nodes as the target media stream service node according to the access location information of the target provider of the media stream service node when it is identified that the media stream service node is abnormal; the target provider includes a media stream provider that pushes the media stream to the media stream service node; The coordination server is further configured to migrate the media stream of the target provider to the target media stream service node; The step of migrating the media stream of the target provider to the target media stream service node includes: According to the preset correspondence between the signaling service node and the media stream provider, searching for the signaling service node corresponding to the target provider as the target signaling service node; Based on the target signaling service node, a target streaming instruction is forwarded to the target provider to perform media stream migration; the target streaming instruction is used to instruct the target provider to push the media stream to the target media stream service node.

11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 8 when executing the program.

12. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the methods described in claims 1-8.