Method, apparatus and storage medium for optimizing media data transmission link
Patent Information
- Application Number
- CN202410094834.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-23
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2044-01-23
AI Technical Summary
[0003]有鉴于此,本公开提供了一种媒体数据传输链路优化方法、装置、设备及存储介质,以解决相关技术存在的网络故障感知不及时和传输链路优化不及时的问题
[0008]This disclosure implements the detection function of each cascaded link based on the report message sent by the first edge node to the next hop node and the confirmation message fed back by the next hop node in response to the report message. Specifically, it uses the statistical results of message loss and round-trip delay to promptly detect whether the media data transmission network is faulty and to optimize it in a timely manner when the transmission link fails. It can be seen that this disclosure effectively solves the problems of untimely network fault detection and untimely transmission link optimization in related technologies. This disclosure helps to improve the communication quality of the media data transmission network and enhance the user's audiovisual experience.
Smart Images

Figure CN117880181B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of media data transmission technology, specifically to media data transmission link optimization methods, apparatus, devices, and storage media. Background Technology
[0002] Currently, the industry-standard network transmission of media data relies on RTN (Real-Time Network) transmission networks and SDN (Software Defined Network). This approach uses an SDN controller to collect real-time status information of each transmission link in the network and selects the optimal transmission link for media data transmission based on certain strategies, thereby enabling link optimization when transmission links fail. For example, it can provide automatic network recovery in about 1.5 minutes after a transmission link failure. However, because the entire link optimization process in existing solutions depends on the SDN controller, it is prone to problems such as untimely network fault detection and untimely transmission link optimization. Summary of the Invention
[0003] In view of this, this disclosure provides a method, apparatus, device and storage medium for optimizing media data transmission links, in order to solve the problems of untimely network fault detection and untimely transmission link optimization in related technologies.
[0004] In a first aspect, this disclosure provides a media data transmission link optimization method, which is applied to a first edge node, and the method includes:
[0005] Send a report message to the second edge node, which is the next-hop node that has successfully established a connection with the first edge node;
[0006] Based on the confirmation message replied by the second edge node based on the report message, the message loss result and round-trip delay result are determined; wherein, the message loss result is used to characterize the situation of report message loss, and the round-trip delay result is used to characterize the transmission delay between the first edge node and the second edge node;
[0007] Based on the message loss results and round-trip latency results, the media data transmission link, including the first edge node, is optimized.
[0008] This disclosure implements the detection function of each cascaded link based on the report message sent by the first edge node to the next hop node and the confirmation message fed back by the next hop node in response to the report message. Specifically, it uses the statistical results of message loss and round-trip delay to promptly detect whether the media data transmission network is faulty and to optimize it in a timely manner when the transmission link fails. It can be seen that this disclosure effectively solves the problems of untimely network fault detection and untimely transmission link optimization in related technologies. This disclosure helps to improve the communication quality of the media data transmission network and enhance the user's audiovisual experience.
[0009] Secondly, this disclosure provides a media data transmission link optimization device, the device comprising:
[0010] The message sending module is used to send report messages to the second edge node, which is the next-hop node that has successfully established a connection with the first edge node.
[0011] The result determination module is used to determine the message loss result and round-trip delay result based on the confirmation message replied by the second edge node based on the report message; wherein, the message loss result is used to characterize the situation of report message loss, and the round-trip delay result is used to characterize the transmission delay between the first edge node and the second edge node;
[0012] The link optimization module is used to optimize the media data transmission link, including the first edge node, based on message loss results and round-trip delay results.
[0013] Thirdly, this disclosure provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the media data transmission link optimization method of the first aspect or any corresponding embodiment described above.
[0014] Fourthly, this disclosure provides a computer-readable storage medium storing computer instructions for causing a computer to execute the media data transmission link optimization method of the first aspect or any corresponding embodiment described above. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0016] Figure 1This is a flowchart illustrating a media data transmission link optimization method according to an embodiment of the present disclosure;
[0017] Figure 2 This is a flowchart illustrating another media data transmission link optimization method according to an embodiment of the present disclosure;
[0018] Figure 3 This is a schematic diagram illustrating the working principle of cascaded link detection according to an embodiment of this disclosure;
[0019] Figure 4 This is a flowchart illustrating another media data transmission link optimization method according to an embodiment of the present disclosure;
[0020] Figure 5 This is a schematic diagram illustrating the working principle of the cascading retry strategy according to an embodiment of this disclosure;
[0021] Figure 6 This is a schematic diagram illustrating the working principle of another cascaded retry strategy according to an embodiment of this disclosure;
[0022] Figure 7 This is a flowchart illustrating another media data transmission link optimization method according to an embodiment of the present disclosure;
[0023] Figure 8 This is a schematic diagram illustrating the working principle of the loop closure detection scheme according to an embodiment of the present disclosure;
[0024] Figure 9 This is a schematic flowchart of a loop closure detection method according to an embodiment of the present disclosure;
[0025] Figure 10 This is a flowchart illustrating a fast obstacle avoidance method for a media data transmission link according to an embodiment of this disclosure;
[0026] Figure 11 This is a structural block diagram of a media data transmission link optimization apparatus according to an embodiment of the present disclosure;
[0027] Figure 12 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present disclosure. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0029] In related technologies, schemes that rely on SDN controllers to optimize media data transmission links can be implemented through methods such as transport layer routing switching. However, the recovery time of up to 1.5 minutes in this method significantly impacts the user's audiovisual experience, indicating a long network automatic recovery time that can easily lead to customer churn. Moreover, these technologies cannot solve the link loop problem: Taking source station S, edge node A, and edge node B as an example, assuming the push stream is at source station S and the two pull streams are located at edge nodes A and B respectively, when A and B simultaneously obtain pull stream links from the scheduling service, the path sent to edge node A after scheduling is A→B→S and the path sent to edge node B is B→A→S. This may lead to a loop problem of A→B→A or B→A→B, meaning that neither A nor B can reach the source station, resulting in users not being able to hear audio or see video. Furthermore, link optimization methods based on SDN controllers cannot automatically recover links when link loop problems occur.
[0030] According to an embodiment of this disclosure, a method for optimizing media data transmission links is provided. It should be noted that the steps shown in the flowcharts in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0031] This embodiment provides a media data transmission link optimization method, which can be used in the first edge node. Figure 1 This is a flowchart of a media data transmission link optimization method according to an embodiment of this disclosure, such as... Figure 1 As shown, the process includes the following steps:
[0032] Step S101: Send a report message to the second edge node, which is the next-hop node that has successfully established a connection with the first edge node.
[0033] In this embodiment, the first edge node is any edge node in the media data transmission network, and the second edge node is the next-hop node in the communication direction from the first edge node to the source station.
[0034] Among them, the report message is a type of message sent by the first edge node to the next hop node, which contains the first edge node's report information on a specific event or situation.
[0035] Combination Figure 3As shown, the first edge node and the second edge node are two edge nodes on the server side. Taking a video conferencing or live streaming scenario as an example, after a user enters the current room in the video conferencing or live streaming scenario (i.e., 3.1 User enters the room), under the condition that the first edge node successfully establishes a connection with the cascaded next-hop node, the first edge node in this embodiment sends a report message to the next-hop node every first specified interval through a preset channel (i.e., 3.2 Sending a Report message: CoorID = 123). The preset channel can specifically be a data channel, and the first specified interval can be, for example, 3 seconds. The report message in this embodiment carries a CoorID (unique identifier), which is used by the next-hop node to identify the report message. CoorID = 123.
[0036] Step S102: Based on the confirmation message replied by the second edge node based on the report message, determine the message loss result and the round-trip delay result; wherein, the message loss result is used to characterize the situation of report message loss, and the round-trip delay result is used to characterize the transmission delay between the first edge node and the second edge node.
[0037] Combination Figure 3 As shown, the second edge node responds to the report message by sending an acknowledgment message back to the first edge node (i.e., sending an ACK message in 3.3: CoorID = 123). The acknowledgment message is specifically an ACK (Acknowledgement) message, which carries the original CoorID (unique identifier) from the report message. Then, the first edge node can determine the message loss result and round-trip time result (i.e., calculating RTT, packet loss, etc.) based on the series of report messages sent and the series of acknowledgment messages received. The round-trip time result may include RTT (Round Trip Time) information, and the message loss result may include packet loss information.
[0038] In some alternative implementations, message loss results include the number of messages lost, and round-trip time results include the average round-trip time.
[0039] Specifically, step S202 includes:
[0040] Step a1: Count the total number of confirmation messages replied by the second edge node based on a specified number of report messages, and determine multiple round-trip delays based on the specified number of report messages.
[0041] In some specific implementations, the specified quantity can be, for example, 20.
[0042] In this embodiment, the first edge node summarizes the response status of a specified number of past report messages every second specified time interval, that is, it receives the confirmation message from the second edge node in response to the specified number of report messages. The second specified time interval can be, for example, 3 seconds.
[0043] Step a2: The difference between the specified number and the total number of acknowledgment messages is determined as the message loss number (Loss), and the average of the multiple round-trip times is determined as the average round-trip time (Average RTT).
[0044] Specifically, the round-trip time is the difference between the time it takes for the first edge node to receive the acknowledgment message and the time it takes to send the corresponding report message. If no ACK message is received within a specified third time interval, the loss of the ACK message corresponding to the current report message is recorded. In this embodiment, the specified third time interval can be used as the round-trip time when the ACK message is determined to be lost. In some implementations, the specified third time interval is, for example, 5 seconds.
[0045] Taking 20 report messages as an example, the number of lost messages is the difference between 20 and the number of received acknowledgment messages (e.g., 18) (e.g., 20-18=2), and the average round-trip time is the average of the 20 round-trip times determined based on the 20 report messages.
[0046] This embodiment can accurately determine the communication link status between the first edge node and the second edge node by statistically analyzing and calculating a specified number of report messages and confirmation messages, thereby achieving high-precision detection of cascaded links.
[0047] Step S103: Optimize the media data transmission link, including the first edge node, based on the message loss results and round-trip delay results.
[0048] The media data involved in this disclosure may include, but is not limited to, one or more of video data, audio data, and data channel messages.
[0049] Specifically, if the message loss result is large and / or the round-trip delay result is large, it can be identified that the communication link between the first edge node and the second edge node is poor. When planning the communication path in the future, this path can be avoided. If the communication between the first edge node and the second edge node is too poor, the connection between the two can be disconnected. If the number of message loss results is small and the round-trip delay result is small, the connection between the first edge node and the second edge node can be maintained.
[0050] The media data transmission link optimization method provided in this embodiment realizes the detection function of each cascaded link based on the report message sent by the first edge node to the next hop node and the confirmation message fed back by the next hop node in response to the report message. By using the statistical message loss results and round-trip delay results, it can promptly detect whether the media data transmission network is faulty and optimize it in a timely manner when the transmission link fails. It can be seen that compared with the media data transmission link optimization method based on SDN controller, this embodiment effectively solves the problems of untimely network fault detection and untimely transmission link optimization in related technologies. It can shorten the network recovery time after the link failure from 1.5 minutes to 3 to 30 seconds. This embodiment helps to improve the communication quality of the media data transmission network and enhance the user's audio-visual experience.
[0051] This embodiment provides a media data transmission link optimization method, which can be used in the first edge node. Figure 2 This is a flowchart of a media data transmission link optimization method according to an embodiment of this disclosure, such as... Figure 2 As shown, the process includes the following steps:
[0052] Step S201: Send a report message to the second edge node, which is the next-hop node that has successfully established a connection with the first edge node. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0053] Step S202: Based on the acknowledgment message replied by the second edge node based on the report message, determine the message loss result and round-trip delay result; wherein, the message loss result is used to characterize the situation of report message loss, and the round-trip delay result is used to characterize the transmission delay between the first edge node and the second edge node. For details, please refer to... Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0054] Step S203: Optimize the media data transmission link, including the first edge node, based on the message loss results and round-trip delay results.
[0055] Specifically, step S203 includes step S2031 and / or step S2032.
[0056] Step S2031: If the number of lost messages is greater than the first preset number and the average round-trip time is greater than the first preset duration, then disconnect the connection between the first edge node and the second edge node, and replace the next-hop node of the first edge node with the third edge node.
[0057] In this embodiment, both the first preset quantity and the first preset duration can be configured. For example, the first preset quantity is 5, and the first preset duration is 3 seconds.
[0058] Specifically, if Loss > 5 and AverageRTT > 3 seconds, the connection between the first edge node and the second edge node is disconnected, and the link is replaced for retry and next-hop connection establishment.
[0059] In this embodiment, when the number of lost messages is too large and the average round-trip latency is too high, the next-hop node of the first edge node can be changed from the second edge node to the third edge node, thereby ensuring that media data is reliably provided to the first edge node, optimizing the media data transmission link, and improving the customer's audiovisual experience.
[0060] In addition, if the communication quality of the media data transmission link is found to be poor, this embodiment can automatically recover the link by retrying the link; based on the automatic retry method, this embodiment can help solve the link loop problem.
[0061] Step S2032: If the number of lost messages is greater than the second preset number and the average round-trip time is greater than the second preset duration, then notify the scheduling node to add the second edge node to the preset list; the edge nodes recorded in the preset list are used to indicate the nodes that the scheduling node avoids when planning the transmission link; wherein, the second preset number is less than the first preset number and the second preset duration is less than the first preset duration.
[0062] In this embodiment, both the second preset quantity and the second preset duration can be configured. For example, the second preset quantity is 2, and the second preset duration is 2 seconds.
[0063] Specifically, if Loss > 2 and AverageRTT > 2 seconds, the scheduling node can be notified to add the second edge node to the preset list. In other words, negative feedback is sent to the scheduling service so that the scheduling service knows that the communication quality of the link is poor and will take this factor into account when planning the path in the future, such as avoiding the first edge node.
[0064] The media data transmission link optimization method provided in this embodiment can also identify situations where the communication quality between the first edge node and the second edge node is poor, and can use such poor communication quality as the basis for subsequent link planning to improve the rationality of link planning and achieve the purpose of rapid obstacle avoidance.
[0065] This embodiment provides a media data transmission link optimization method, which can be used in the first edge node. Figure 4 This is a flowchart of a media data transmission link optimization method according to an embodiment of this disclosure, such as... Figure 4 As shown, the process includes the following steps:
[0066] Step S401: Send a report message to the second edge node, which is the next-hop node that has successfully established a connection with the first edge node. For details, please refer to [link to relevant documentation]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.
[0067] Step S402: Based on the acknowledgment message replied by the second edge node based on the report message, determine the message loss result and round-trip delay result; wherein, the message loss result is used to characterize the situation of report message loss, and the round-trip delay result is used to characterize the transmission delay between the first edge node and the second edge node. For details, please refer to... Figure 2 Step S202 of the illustrated embodiment will not be described again here.
[0068] Step S403: Optimize the media data transmission link, including the first edge node, based on the message loss results and round-trip delay results.
[0069] Specifically, step S403 includes:
[0070] Step S4031: If the number of lost messages exceeds a first preset number and the average round-trip time exceeds a first preset duration, then disconnect the connection between the first edge node and the second edge node. Please refer to [link to relevant documentation]. Figure 2 Based on step S2031 of the illustrated embodiment, this embodiment also includes steps S4032 and S4033.
[0071] Step S4032: Obtain at least one new path based on the scheduling service provided by the scheduling node. The at least one new path includes a path from the first edge node through the third edge node to the source station.
[0072] The scheduling node is a node in the server that is independent of the edge nodes and is used to provide scheduling services. This scheduling service can be used to provide a new path from the first edge node to the source station. The first edge node performs cascading retries according to the new path provided by the scheduling service in order to attempt to connect to the new node.
[0073] Step S4033: Perform a retry operation to attempt to establish a connection between the first edge node and the third edge node.
[0074] The third edge node is a node in at least one of the new paths mentioned above. During the process of the first edge node's attempt, it may succeed or fail to retry. If the retry is successful, the first edge node establishes a connection with the new node, such as establishing a connection with the third edge node.
[0075] Step S4034: If the retry is successful, change the next hop node of the first edge node to the third edge node.
[0076] like Figure 5 The diagram illustrates the working principle of the cascading retry strategy in this embodiment. The connection between the first edge node E and the second edge node R1 may be broken (e.g., ...). Figure 5 If network jitter occurs (5.1, cascade connection is abnormally disconnected), then the first edge node E needs to replan its connection with a new edge node (5.2 replanning the path). Specifically, it obtains a new path from the scheduling node Q and connects to the new node determined in the new path (5.3 establishing the connection), that is, it performs a retry operation, such as establishing a connection with the third edge node R2. If the connection is established successfully (i.e., the retry is successful), then the third edge node R2, which has already been successfully connected to the source station S, is used as the current upstream node of the first edge node E.
[0077] As can be seen, this embodiment adopts a smooth strategy when switching links between cascaded links, that is, it provides a strategy that only requires the internal edge nodes of the server to retry, without requiring the client to retry. This achieves the goal of making the client unaware of the link change, thus improving the user's audiovisual experience.
[0078] Specifically, step S403 above also includes:
[0079] In step S4035, if the retry fails, a second retry is performed to attempt to establish a connection between the first edge node and the fourth edge node.
[0080] In this embodiment, the fourth edge node is a new node different from the third edge node. If the connection with the third edge node fails (retry fails), the first edge node may attempt to establish a connection with the fourth edge node in another new path provided by the scheduling service.
[0081] In step S4036, if the number of consecutive failed retries exceeds the first preset number, the client is removed from the first edge node (Node Change), and the edge node providing media data services to the client is switched from the first edge node to the fifth edge node.
[0082] The first preset number of attempts is configurable, for example, 3 attempts. If the number of consecutive failed retries exceeds the first preset number of attempts, this embodiment can identify the first edge node as a network island, remove users from the first edge node, and switch the removed users to the fifth edge node.
[0083] In this embodiment, the number of consecutive failed retries is the number of times the connection with multiple edge nodes fails to be retried. The first preset number can specifically be the number of edge nodes for which multiple retries are made.
[0084] like Figure 6As shown, a schematic diagram illustrating the working principle of another cascaded retry strategy in this embodiment is provided.
[0085] Initially, the first edge node E can establish a connection with the second edge node R1 based on the scheduling service provided by the scheduling node Q. The second edge node R1 is connected to the source station S. The first edge node E provides streaming services to clients, enabling the provision of audio and video data to streaming users. If the first edge node E disconnects from the second edge node R1 due to network jitter or other reasons, the first edge node E will establish a connection with a new node based on a new path provided by the scheduling service, such as establishing a connection with a new node like the fourth edge node R3. If multiple retry attempts with multiple edge nodes fail (6.1 disconnection after multiple retries), the first edge node E will remove the streaming user (6.2 user removal). The removed client will be transferred to a new node (6.3 switching edge nodes), such as the fifth edge node F. The fifth edge node F can connect to the source station S through the fourth edge node R3 (the fifth edge node F has already established a connection with the fourth edge node R3, i.e., 6.4 connection establishment).
[0086] This embodiment provides a media data transmission link optimization method, which can be used in the first edge node. Figure 7 This is a flowchart of a media data transmission link optimization method according to an embodiment of this disclosure, such as... Figure 7 As shown, the process includes the following steps:
[0087] Step S701: Send a report message to the second edge node, which is the next-hop node that has successfully established a connection with the first edge node. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0088] Step S702: Based on the acknowledgment message replied by the second edge node based on the report message, determine the message loss result and round-trip delay result; wherein, the message loss result is used to characterize the situation of report message loss, and the round-trip delay result is used to characterize the transmission delay between the first edge node and the second edge node. For details, please refer to... Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0089] Step S703: Based on the message loss results and round-trip delay results, optimize the media data transmission link including the first edge node. For details, please refer to [link to relevant documentation]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.
[0090] Step S704: If the number of connection failures between multiple first edge nodes and their respective upstream nodes all exceed the second preset number, then all clients in the multiple first edge nodes will be removed, and the edge node providing media data services to the multiple clients will be switched from multiple first edge nodes to a sixth edge node; wherein, the multiple clients are all clients that have joined the target room, the multiple first edge nodes provide media data services to the clients in the target room, and the upstream node includes at least one of the source station, relay node, and upstream edge node.
[0091] The second preset number of times can be configured, and for example, the second preset number of times can be 3.
[0092] In this embodiment, the upstream node of each of the multiple first edge nodes can be the same node.
[0093] In conjunction with the aforementioned embodiments, a concentrated and large-scale removal of edge node users may cause an avalanche problem. For example, edge nodes A1, A2, and A3 are all connected to edge node B1. If edge node B1 experiences network problems, and edge nodes A1, A2, and A3 repeatedly fail to connect to edge node B1, and all users from edge nodes A1, A2, and A3 are removed, these nodes will flood into edge node A4 in a short period of time. In this embodiment, edge node A4 is connected to edge node B2 and is operating normally. With the sudden influx of users into edge node A4, edge node A4 may not be able to handle the user volume of edge nodes A1, A2, and A3, leading to edge node A4 becoming unusable, i.e., an avalanche problem. In some implementations, edge nodes B1 and B2 can be source nodes.
[0094] Step S705: For the target room, if the client is removed from the edge node at least twice, the time interval between two adjacent removal actions is gradually increased.
[0095] For the same room, i.e., the aforementioned target room, this embodiment controls the time interval between two adjacent move-out actions to gradually increase; specifically, the time interval between each subsequent move-out is longer than the previous one. For example, for the same room, when a user moves out (Node Change), the following strategy is followed: the second Node Change needs to be at least 5 seconds apart from the first; the third Node Change needs to be at least 7 seconds apart from the second; and the fourth and subsequent Node Changes need to be at least 10 seconds apart from the previous Node Change. This specific time interval is configurable and is not limited to the values described above.
[0096] This embodiment, by controlling the time interval between two adjacent user removals, avoids to some extent the problem of a large influx of user traffic into a certain edge node in a short period of time. In other words, this embodiment can reduce the possibility of avalanche problems.
[0097] In some optional implementations, the media data transmission link optimization method further includes:
[0098] Step b1: If no heartbeat information is received from the source station within the third preset time period, the source station is determined to be unreachable.
[0099] Specifically, the heartbeat information is the Heartbeat (HB) signal, and the third preset duration is the maximum gap time threshold (HBMaxGapMs). The specific value of the maximum gap time threshold can be configured, for example, it can be 8 seconds.
[0100] For example, the source station where the streaming endpoint is located periodically initiates a heartbeat and broadcasts the heartbeat to downstream nodes. In this embodiment, the period for the source station to broadcast the heartbeat is the heartbeat period (HBBroadCastPeriodMs); the specific value of the heartbeat period can be configured, for example, 3 seconds.
[0101] like Figure 8 The diagram illustrates the working principle of the loopback detection scheme in this embodiment. Every 3 seconds, the source station S sends a heartbeat signal HB to relay nodes such as relay node M1 and relay node M2, or to edge nodes. Upon receiving the heartbeat signal HB, the relay node M1, relay node M2, and other relay nodes or edge nodes continue to broadcast the heartbeat signal HB to downstream nodes. For example, relay node M1 broadcasts the heartbeat signal HB to edge nodes E1, E2, and E3, and relay node M2 broadcasts the heartbeat signal HB to edge nodes E4, E5, and E6.
[0102] Specifically, heartbeat information may include, but is not limited to, timestamps, original port information, original IP (Internet Protocol) information, and original public IP information.
[0103] Step b2: If a heartbeat message is received from the source station within the third preset time period, the heartbeat message is broadcast to downstream nodes, which include at least one of downstream edge nodes and relay nodes.
[0104] In this embodiment, the first edge node maintains heartbeat information and periodically checks whether it has received heartbeat information from the source station. Specifically, after receiving heartbeat information, the first edge node updates its local timestamp and broadcasts the heartbeat to downstream nodes (specifically, downstream media nodes in this embodiment).
[0105] This embodiment provides a loopback detection method based on link keep-alive, which can detect a stable link connection between the first edge node and the source station, and ensure the reliability of media data link communication.
[0106] In some optional implementations, the media data transmission link optimization method further includes:
[0107] Step c1: If it is determined that the source station is unreachable, disconnect the connection between the first edge node and the second edge node, and wait for a fourth preset time period before retrying to attempt to establish a connection between the first edge node and the source station.
[0108] The specific value of the fourth preset duration is configurable; for example, the fourth preset duration can be 3 seconds. It is evident that this embodiment can retry every 3 seconds if the source station is unreachable. The node to be retried can be an upstream node other than the second edge node, thus allowing the first edge node to attempt to establish a connection with the source station.
[0109] Based on the loopback detection method described above, this embodiment can not only detect link loopbacks in a timely manner, but also automatically recover them, effectively solving the problem that users cannot hear audio and / or see video for a long time due to link loopbacks.
[0110] like Figure 9 The diagram shows a flowchart of the loop closure detection method in this embodiment.
[0111] In conjunction with the aforementioned embodiments, the source station triggers the heartbeat information transmission action periodically (according to the heartbeat cycle). Specifically, the source station broadcasts heartbeat data packets to downstream nodes. If a downstream node receives a heartbeat data packet, it updates its local timestamp and broadcasts it to the next downstream node, and then the process ends. If a downstream node does not receive a heartbeat data packet, and does not receive a heartbeat data packet for more than N seconds (e.g., 8 seconds), the downstream node disconnects from the source station and then performs a periodic retry to reconnect with the source station.
[0112] like Figure 10 The diagram shows a flowchart illustrating the fast obstacle avoidance method for the media data transmission link in this embodiment.
[0113] Based on the aforementioned embodiments, taking the first edge node and the second edge node as an example, the first edge node and the second edge node are cascaded and connected, and then link detection is performed. If the communication quality is good, link detection can continue. If the communication quality is poor, the link is replaced and the connection is retried. The first edge node attempts to connect with other edge nodes. If the retry is successful, the link detection step is returned. If the retry fails, it is determined whether the number of consecutive failures is greater than 3. If not, the link replacement and connection retry steps are returned. If so, the user removal interval threshold T can be determined based on the current number of user removals (for example, the interval between the 2nd and 1st user removals needs to be T = 5 seconds, the interval between the 3rd and 2nd user removals needs to be T = 7 seconds, and the interval between the 4th and subsequent user removals needs to be T = 10 seconds). The interval threshold T increases with the increase of the number of user removals. If the interval since the last user removal is greater than T, the user is removed from the first edge node and user reconnection is performed to switch the client to other edge nodes.
[0114] This embodiment also provides a media data transmission link optimization device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0115] This embodiment provides a media data transmission link optimization device, such as... Figure 11 As shown, it includes:
[0116] The message sending module 1101 is used to send a report message to the second edge node, which is the next-hop node that has successfully established a connection with the first edge node.
[0117] The result determination module 1102 is used to determine the message loss result and the round-trip delay result based on the confirmation message replied by the second edge node based on the report message; wherein, the message loss result is used to characterize the situation of report message loss, and the round-trip delay result is used to characterize the transmission delay between the first edge node and the second edge node.
[0118] The link optimization module 1103 is used to optimize the media data transmission link, including the first edge node, based on the message loss result and round-trip delay result.
[0119] In some alternative implementations, message loss results include the number of messages lost, and round-trip time results include the average round-trip time.
[0120] The link optimization module 1103 is specifically used to disconnect the connection between the first edge node and the second edge node and replace the next-hop node of the first edge node with the third edge node if the number of lost messages is greater than a first preset number and the average round-trip delay is greater than a first preset duration.
[0121] In some optional implementations, the link optimization module 1103 is specifically used to notify the scheduling node to add the second edge node to a preset list based on the number of lost messages being greater than a second preset number and the average round-trip delay being greater than a second preset duration; the edge nodes recorded in the preset list are used to indicate the nodes that the scheduling node avoids when planning the transmission link; wherein, the second preset number is less than the first preset number and the second preset duration is less than the first preset duration.
[0122] In some alternative implementations, the result determination module 1102 includes a statistical unit and a determination unit.
[0123] The statistics unit is used to count the total number of acknowledgment messages replied by the second edge node based on a specified number of report messages, and to determine multiple round-trip delays based on a specified number of report messages.
[0124] The determining unit is used to determine the difference between a specified number and the total number of acknowledgment messages as the number of lost messages, and to determine the average of multiple round-trip times as the average round-trip time.
[0125] In some optional implementations, the link optimization module 1103 includes a path acquisition unit, a retry operation unit, and a node replacement unit.
[0126] The path acquisition unit is used to acquire at least one new path based on the scheduling service provided by the scheduling node. The at least one new path includes a path from the first edge node through the third edge node to the source station.
[0127] The retry operation unit is used to perform retry operations to attempt to establish a connection between the first edge node and the third edge node.
[0128] The node replacement unit is used to replace the next-hop node of the first edge node with the third edge node if the retry is successful.
[0129] In some alternative implementations, the link optimization module 1103 may also include a retry unit and a node removal unit.
[0130] The retry unit is used to attempt to retry if the retry fails, in order to establish a connection between the first edge node and the fourth edge node.
[0131] The client removal unit is used to remove the client from the first edge node and switch the edge node that provides media data services to the client from the first edge node to the fifth edge node if the number of consecutive failed retries exceeds a first preset number.
[0132] In some alternative implementations, the media data transmission link optimization device further includes a service node switching module and a time interval increase module.
[0133] The service node switching module is used to remove all clients from the multiple first edge nodes and switch the edge node that provides media data services to the multiple clients from the multiple first edge nodes to the sixth edge node, based on the fact that the number of connection failures between the multiple first edge nodes and their respective upstream nodes all exceed a second preset number.
[0134] The time interval increment module is used to control the time interval between two adjacent removal actions to gradually increase, based on the fact that the client has been removed from the edge node at least twice for the target room.
[0135] In some alternative implementations, the media data transmission link optimization device further includes a fault determination module and a heartbeat broadcast module.
[0136] The fault determination module is used to determine that the source station is unreachable if no heartbeat information is received from the source station within a third preset time period.
[0137] The heartbeat broadcast module is used to broadcast heartbeat information to downstream nodes after receiving heartbeat information from the source station within a third preset time period. The downstream nodes include at least one of downstream edge nodes and relay nodes.
[0138] In some optional implementations, the fault determination module is also used to disconnect the connection between the first edge node and the second edge node based on the determination that the source station is unreachable, and to retry at a set time after a fourth preset time period in order to attempt to establish a connection between the first edge node and the source station.
[0139] The further functional descriptions of each module and unit are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0140] The media data transmission link optimization device involved in this embodiment is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0141] This disclosure also provides a computer device having the above-described features. Figure 11 The media data transmission link optimization device shown is shown.
[0142] Please see Figure 12 , Figure 12 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this disclosure, such as... Figure 12 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 12 Take a processor 10 as an example.
[0143] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0144] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0145] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0146] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0147] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0148] This disclosure also provides a computer-readable storage medium in which the methods described in this disclosure can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded over a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium may be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0149] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for optimizing media data transmission links, characterized in that, Applied to the first edge node, the method includes: Send a report message to the second edge node, which is the next-hop node that has successfully established a connection with the first edge node; Based on the confirmation message replied by the second edge node based on the report message, the message loss result and round-trip delay result are determined; wherein, the message loss result is used to characterize the situation of the report message being lost, and the round-trip delay result is used to characterize the transmission delay between the first edge node and the second edge node; Based on the message loss results and the round-trip delay results, the media data transmission link including the first edge node is optimized; If the number of connection failures between multiple first edge nodes and their respective upstream nodes all exceed a second preset number, then all clients among the multiple first edge nodes will be removed, and the edge node providing media data services to the multiple clients will be switched from the multiple first edge nodes to a sixth edge node; wherein, the multiple clients are all clients that have joined the target room, the multiple first edge nodes provide media data services to the clients in the target room, and the upstream node includes at least one of the following: origin station, relay node, and upstream edge node; For the target room, if the client is removed from the edge node at least twice, the time interval between two adjacent removal actions is gradually increased.
2. The method according to claim 1, characterized in that, The message loss result includes the number of messages lost, and the round-trip time result includes the average round-trip time. The optimization of the media data transmission link, including the first edge node, based on the message loss result and the round-trip delay result includes: If the number of lost messages is greater than a first preset number and the average round-trip time is greater than a first preset duration, then the connection between the first edge node and the second edge node is disconnected, and the next-hop node of the first edge node is replaced with a third edge node.
3. The method according to claim 2, characterized in that, The optimization of the media data transmission link, including the first edge node, based on the message loss result and the round-trip delay result includes: If the number of lost messages is greater than the second preset number and the average round-trip time is greater than the second preset duration, then the scheduling node is notified to add the second edge node to the preset list; the edge nodes recorded in the preset list are used to indicate the nodes that the scheduling node avoids when planning the transmission link. Wherein, the second preset quantity is less than the first preset quantity, and the second preset duration is less than the first preset duration.
4. The method according to claim 2 or 3, characterized in that, The step of determining the message loss result and round-trip delay result based on the confirmation message replied by the second edge node based on the report message includes: The total number of confirmation messages replied by the second edge node based on a specified number of report messages is counted, and multiple round-trip delays are determined based on the specified number of report messages; The difference between the specified number and the total number of acknowledgment messages is determined as the number of lost messages, and the average of the multiple round-trip times is determined as the average round-trip time.
5. The method according to claim 2, characterized in that, The step of replacing the next-hop node of the first edge node with the third edge node includes: At least one new path is obtained based on the scheduling service provided by the scheduling node, and the at least one new path includes a path from the first edge node through the third edge node to the source station; Perform a retry operation to attempt to establish a connection between the first edge node and the third edge node; If the retry is successful, the next-hop node of the first edge node is replaced with the third edge node.
6. The method according to claim 5, characterized in that, The method further includes: If the retry fails, it will be retried again to attempt to establish a connection between the first edge node and the fourth edge node; If the number of consecutive failed retries exceeds a first preset number, the client will be removed from the first edge node, and the edge node providing media data services to the client will be switched from the first edge node to the fifth edge node.
7. The method according to any one of claims 1 to 3 or 5 to 6, characterized in that, The method further includes: If no heartbeat information is received from the source station within the third preset time period, the source station is determined to be unreachable. If a heartbeat message is received from the source station within the third preset time period, the heartbeat message is broadcast to downstream nodes, which include at least one of downstream edge nodes and relay nodes.
8. The method according to claim 7, characterized in that, The method further includes: If the source station is determined to be unreachable, the connection between the first edge node and the second edge node is disconnected, and a timed retry is performed after a fourth preset time period to attempt to establish a connection between the first edge node and the source station.
9. A media data transmission link optimization device, characterized in that, The device includes: The message sending module is used to send a report message to the second edge node, which is the next-hop node that has successfully established a connection with the first edge node; The result determination module is used to determine the message loss result and the round-trip delay result based on the confirmation message replied by the second edge node based on the report message; wherein, the message loss result is used to characterize the situation of the report message being lost, and the round-trip delay result is used to characterize the transmission delay between the first edge node and the second edge node; The link optimization module is used to optimize the media data transmission link including the first edge node based on the message loss result and the round-trip delay result. The service node switching module is used to remove all clients from multiple first edge nodes and switch the edge node providing media data services to the sixth edge node from multiple first edge nodes if the number of connection failures between multiple first edge nodes and their respective upstream nodes exceeds a second preset number. Here, multiple clients are all clients that have joined the target room, multiple first edge nodes provide media data services to clients in the target room, and upstream nodes include at least one of source station, relay node, and upstream edge node. The time interval increment module is used to control the time interval between two adjacent removal actions to gradually increase, based on the fact that the client has been removed from the edge node at least twice for the target room.
10. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the media data transmission link optimization method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the media data transmission link optimization method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for detecting device state in power line communication network
CN108696297A
Network system, back-to-source disaster recovery method and equipment
CN113596079A
Method, device and equipment for detecting edge network quality and computer readable storage medium
CN114584485A