Streaming media sending and repairing method and device of mobile ad hoc network, equipment and storage medium
By building a dynamic routing table and path maintenance mechanism in the mobile ad hoc network, the problem of unstable streaming data transmission is solved, and stable and continuous streaming media transmission is achieved in a dynamic topology environment.
Patent Information
- Application Number
- CN202510974993.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-09-30
AI Technical Summary
In mobile ad hoc networks, it is difficult to achieve orderly and stable transmission of streaming data. The existing multi-path redundancy mechanism cannot guarantee the continuity and stability of streaming services when the network topology changes frequently or the density is low.
A dynamic routing table is constructed by sensing network status information through nodes. Combined with link establishment request and confirmation control packets, a business flow routing table is established hop by hop. When a link is disconnected, path maintenance request and confirmation packets are introduced to dynamically update and repair the link routing table to achieve link reconstruction.
In the case of dynamic changes in node topology, path reachability is continuously maintained, which improves the stability and continuity of streaming service transmission and realizes fast link reconstruction and reliable streaming distribution.
Smart Images

Figure CN120730419A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of streaming media transmission technology, and in particular to a method, device, equipment and storage medium for sending and repairing streaming media in a mobile self-organizing network. Background Art
[0002] A mobile ad hoc network (MON) is a network structure consisting of a group of mobile nodes communicating via wireless packet relay. Because it does not rely on fixed communication infrastructure, MONs offer significant advantages in low cost and rapid deployment. With the advancement of microelectronics technology, a large number of mobile devices have acquired the capabilities to capture, encode, and transmit audio and video. MONs are gradually taking on more complex information exchange tasks. Streaming media data transmission differs from standard data in that it places higher demands on transmission latency, sequentiality, and timeliness.
[0003] To ensure the orderly and timely delivery of data packets, traditional technical solutions often incorporate multipath redundancy mechanisms. This involves pre-establishing multiple, disjoint paths between the service requesting node and the destination node, and switching to a backup path when the primary path fails to maintain data transmission continuity. However, when the network topology frequently changes or the density is low, the backup path is also prone to failure, making it impossible to guarantee the continuity and stability of streaming services.
[0004] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a method, device, equipment and storage medium for sending and repairing streaming media in a mobile self-organizing network, aiming to solve the technical problem of difficulty in achieving sequential and stable transmission of streaming media data in a mobile self-organizing network.
[0006] To achieve the above objectives, the present application proposes a method for sending and repairing streaming media in a mobile ad hoc network, the method comprising:
[0007] Perceiving network situation information based on node information, and constructing a node routing table based on the network situation information;
[0008] Determine the intermediate node hop by hop based on the request node information, the destination node information and the node routing table, and perform service routing link building based on the destination node and the intermediate node to obtain an initial service routing link;
[0009] Performing hop-by-hop forwarding of the streaming media service according to the requesting node information, the streaming media service data, and the initial service routing link;
[0010] When it is detected that the service routing link is disconnected, a repair service routing link is established according to the maintenance initiating node information, the maintenance destination node information, the initial service routing link and the node routing table.
[0011] In one embodiment, the step of determining the intermediate node hop by hop based on the requesting node information, the destination node information, and the node routing table, and establishing a service routing link based on the destination node and the intermediate node to obtain the initial service routing link includes:
[0012] Determine whether a service routing link exists in the node routing table according to the request node information and the destination node information;
[0013] When it is determined that a service routing link exists in the node routing table, a link establishment request is sent according to the requesting node information, and a link establishment request control packet is obtained according to the link establishment request, wherein the link establishment request control packet includes a service requesting node identifier, a destination node identifier, a flow identifier set by the service requesting node, and identifiers of intermediate nodes on a hop-by-hop routing path of the link establishment request control packet;
[0014] Selecting a first intermediate node according to the requesting node information and the network situation information, and sending the link establishment request control packet to the first intermediate node within a preset timeout threshold;
[0015] Upon detecting that the link establishment request control packet is successfully sent, updating the link establishment request control packet according to the identifier of the first intermediate node, selecting a second intermediate node according to the first intermediate node information and the network status information, and sending the updated link establishment request control packet to the second intermediate node until the updated link establishment request control packet is sent to the destination node;
[0016] When it is determined that the updated link establishment request control packet is sent to the destination node, whether the current link is valid is confirmed according to the updated link establishment request control packet, and if the current link is valid, an initial service routing link is obtained.
[0017] In one embodiment, when determining that the updated link establishment request control packet is sent to the destination node, confirming whether the current link is valid according to the updated link establishment request control packet, and obtaining the initial service routing link if the current link is valid includes:
[0018] When determining that the updated link establishment request control packet is sent to the destination node, parsing the intermediate node identifier according to the updated link establishment request control packet;
[0019] Constructing a link establishment confirmation control packet according to the intermediate node identifier, wherein the path carried in the link establishment confirmation control packet is the reverse path of the path recorded in the link establishment request control packet;
[0020] Returning the link establishment confirmation control packet to the service request node hop by hop along the reverse path, and establishing a current service flow routing table based on the intermediate node information and the link establishment confirmation control packet when detecting that the jump passes through an intermediate node;
[0021] When it is detected that the service request node receives the link establishment confirmation control packet and the intermediate nodes in the path complete the configuration of the current service flow routing table, the current link is confirmed to be valid, and the initial service routing link is obtained.
[0022] In one embodiment, the step of performing hop-by-hop forwarding of the streaming media service according to the requesting node information, the streaming media service data, and the initial service routing link includes:
[0023] Constructing a data group according to the request node information and the streaming service data, wherein the data group includes a streaming service identifier, a current sequence number, a service request node identifier, and a destination node identifier;
[0024] Selecting a first intermediate node according to the initial service routing link, and sending the data packet to the first intermediate node, so that the first intermediate node records the received current sequence number, and determines whether the initial service routing link is valid based on the current sequence number and provides feedback;
[0025] When detecting that the first intermediate node has received the data packet and the initial service routing link is valid, searching for corresponding path information in a local service routing table according to the streaming service identifier, and forwarding the data packet to a second intermediate node until the data packet is sent to a destination node;
[0026] When it is detected that the destination node receives the data packet, the streaming media service is forwarded hop by hop.
[0027] In one embodiment, when the service routing link is detected to be disconnected, the step of establishing a repair service routing link according to the maintenance initiating node information, the maintenance destination node information, the initial service routing link, and the node routing table includes:
[0028] When detecting that the service routing link is disconnected, determining whether there is a repair path to the maintenance destination node information according to the maintenance initiating node information and the node routing table;
[0029] When it is determined that there is a repair path that reaches the maintenance destination node information, a link maintenance request packet is sent to a node on the repair path, and it is determined whether to send the link maintenance request packet to a new intermediate node, the link maintenance request packet including a maintenance initiating node identifier, a maintenance destination node identifier, a current streaming media service identifier, a current data packet sequence number, a maintenance path identifier, and identifiers of intermediate nodes traversed in the current path;
[0030] When it is determined that the link maintenance request packet is to be sent to the new intermediate node, determining a repair node according to the new intermediate node information and the maintenance destination node identifier, and sending the link maintenance request packet to the repair node;
[0031] When it is detected that the next hop node is the node of the initial service routing link, a repair service routing link is established according to the link maintenance request packet.
[0032] In one embodiment, when detecting that the next hop node is a node of the initial service routing link, the step of establishing a repair service routing link according to the link maintenance request packet includes:
[0033] When detecting that the next hop node is a node of the initial service routing link, confirming the size relationship between the data packet sequence number in the link maintenance request packet and the data packet sequence number recorded by the current node, and sending the link maintenance request packet to the maintenance destination node;
[0034] When the data packet sequence number in the link maintenance request packet is greater than the data packet sequence number recorded by the current node, it is determined that the maintenance initiating node is an upstream node or the current node is no longer in the new service path, and a link maintenance confirmation packet is sent to the maintenance initiating node;
[0035] When the data packet sequence number in the link maintenance request packet is less than or equal to the data packet sequence number recorded by the current node, determining that the maintenance initiating node is a downstream node or the current node is already in a new service path, regenerating a link maintenance request packet, wherein the regenerated link maintenance request packet specifies the current node as the maintenance initiating node, and sending a link maintenance confirmation packet to the previous maintenance initiating node;
[0036] When the maintenance destination node receives the link maintenance request packet, it records the path information in the link maintenance request packet, constructs a link maintenance confirmation packet according to the path information, and sends the link maintenance confirmation packet to the maintenance initiating node through the intermediate nodes hop by hop;
[0037] When the intermediate node receives the link maintenance confirmation packet, it extracts the payload content therein and establishes or updates a service routing table corresponding to the flow identifier;
[0038] When the maintenance initiating node receives the link maintenance confirmation packet, it establishes a repair service routing link.
[0039] In one embodiment, the step of sensing network situation information based on node information and constructing a node routing table based on the network situation information includes:
[0040] Sense network situation information based on node information and a preset sensing period, wherein the network situation information includes network node identification, the amount of data queued by the node waiting to be sent, and the status of links between nodes;
[0041] Constructing a neighbor node list according to the node information and the link status between the nodes;
[0042] Based on the neighbor node list and the network status information, a routing path to other nodes is determined, and a node routing table is constructed based on the routing path. The node routing table includes a destination node, a next-hop node, and link cost information. The other nodes include neighbor nodes and non-neighbor nodes within the network status information range of the current node.
[0043] In addition, to achieve the above-mentioned purpose, the present application also proposes a streaming media sending and repairing device for a mobile self-organizing network, the streaming media sending and repairing device for a mobile self-organizing network comprising: an information perception module, configured to perceive network situation information based on node information, and construct a node routing table based on the network situation information;
[0044] A routing link building module is used to determine the intermediate node hop by hop based on the request node information, the destination node information and the node routing table, and to build a service routing link based on the destination node and the intermediate node to obtain an initial service routing link;
[0045] A service forwarding module, configured to forward the streaming media service hop by hop according to the requesting node information, the streaming media service data, and the initial service routing link;
[0046] The path maintenance module is used to establish a repair service routing link according to the maintenance initiating node information, the maintenance destination node information, the initial service routing link and the node routing table when detecting that the service routing link is disconnected.
[0047] In addition, to achieve the above-mentioned purpose, the present application also proposes a streaming media sending and repair device for a mobile self-organizing network, wherein the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the streaming media sending and repair method for a mobile self-organizing network as described above.
[0048] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the streaming media sending and repair method of the mobile self-organizing network are implemented as described above.
[0049] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the streaming media sending and repair method of the mobile ad hoc network as described above.
[0050] One or more technical solutions proposed in this application have at least the following technical effects:
[0051] By adopting a technical means of building a dynamic routing table based on node-perceived network situation information, combined with the link establishment request control packet initiated by the service request node and the link establishment confirmation control packet returned by the destination node, a path establishment mechanism is implemented in which the intermediate node establishes the service flow routing table hop by hop. Furthermore, when the link is disconnected, a path maintenance request and confirmation packet is introduced. The upstream and downstream relationships and path validity are judged by the data packet sequence number, and the link routing table is dynamically updated and repaired, thereby completing the link reconstruction. This effectively solves the problem of frequent node movement in mobile self-organizing networks, which leads to easy link interruption, slow path recovery, and discontinuous streaming media transmission. Compared with the existing technology, it can not only maintain path reachability in the case of dynamic changes in node topology, but also improve the stability and continuity of streaming media service transmission, and achieve fast link reconstruction and reliable streaming media distribution in a non-fixed topology environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0053] In order to more clearly illustrate the embodiments of the present application 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0054] Figure 1 A flowchart of a first embodiment of a method for transmitting and repairing streaming media in a mobile ad hoc network of the present application is provided;
[0055] Figure 2 A schematic diagram of a self-organizing network node provided in Example 1 of the method for transmitting and repairing streaming media in a mobile self-organizing network of the present application;
[0056] Figure 3 A schematic diagram of a link in which a requesting node sends a link establishment request control packet to a destination node, as provided in Example 1 of the method for sending and repairing streaming media in a mobile ad hoc network of the present application;
[0057] Figure 4 Schematic diagram of the process of a node sending a link establishment confirmation control packet to a service requesting node provided in the first embodiment of the streaming media transmission and repair method of the mobile self-organizing network of the present application;
[0058] Figure 5 A schematic diagram of a streaming media service transmission process provided in Example 1 of the method for transmitting and repairing streaming media in a mobile ad hoc network of the present application;
[0059] Figure 6 A schematic diagram of adding a new intermediate node to the repair path provided in the first embodiment of the method for transmitting and repairing streaming media in a mobile ad hoc network of the present application;
[0060] Figure 7 A schematic diagram of upstream node link break repair provided in Example 1 of the method for transmitting and repairing streaming media in a mobile ad hoc network of the present application;
[0061] Figure 8 A schematic diagram of repairing a broken link at a downstream node provided in Example 1 of the method for transmitting and repairing streaming media in a mobile ad hoc network of the present application;
[0062] Figure 9 A flow chart of the second embodiment of the method for transmitting and repairing streaming media in a mobile ad hoc network of the present application is provided;
[0063] Figure 10 This is a schematic diagram of the module structure of a streaming media sending and repairing device for a mobile ad hoc network according to an embodiment of the present application;
[0064] Figure 11 This is a schematic diagram of the device structure of the hardware operating environment involved in the streaming media sending and repair method of the mobile self-organizing network in the embodiment of the present application.
[0065] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0066] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0067] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0068] The main solution of the embodiment of the present application is: to perceive network status information based on node information, and to construct a node routing table based on the network status information; to determine the intermediate node hop by hop based on the request node information, the destination node information and the node routing table, and to establish a service routing link based on the destination node and the intermediate node to obtain an initial service routing link; to forward the streaming service hop by hop based on the request node information, the streaming service data and the initial service routing link; and to establish a repair service routing link based on the maintenance initiating node information, the maintenance destination node information, the initial service routing link and the node routing table when the service routing link is detected to be disconnected.
[0069] In this embodiment, for ease of description, the following description is made by taking the identification of a streaming media sending and repairing device in a mobile ad hoc network as the execution subject.
[0070] Since it is difficult for existing technologies to achieve sequential and stable transmission of streaming media data in mobile self-organizing networks, this application provides a solution. By adopting a technical means of building a dynamic routing table based on the network situation information perceived by the node, combined with the link establishment request control packet initiated by the service request node and the link establishment confirmation control packet returned by the destination node, a path link establishment mechanism is realized in which the intermediate node establishes the service flow routing table hop by hop, and further introduces path maintenance request and confirmation packets when the link is disconnected. The upstream and downstream relationships and path validity are judged by the data packet sequence number, and the link routing table is dynamically updated and repaired, thereby completing the link reconstruction; it effectively solves the problem of frequent node movement in mobile self-organizing networks in the existing technology, which leads to easy link interruption, slow path recovery, and discontinuous streaming media transmission. Compared with the existing technology, it can not only maintain path reachability in the case of dynamic changes in node topology, but also improve the stability and continuity of streaming media service transmission, and achieve fast link reconstruction and reliable streaming media distribution in a non-fixed topology environment.
[0071] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of implementing the above functions, a streaming media transmission and repair device for a mobile ad hoc network, etc. The following uses a streaming media transmission and repair device for a mobile ad hoc network as an example to illustrate this embodiment and the following embodiments.
[0072] Based on this, the embodiment of the present application provides a method for sending and repairing streaming media in a mobile self-organizing network, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for sending and repairing streaming media in a mobile ad hoc network of the present application.
[0073] In this embodiment, the streaming media sending and repairing method of the mobile ad hoc network includes steps S10 to S40:
[0074] Step S10, sensing network situation information according to the node information, and constructing a node routing table according to the network situation information;
[0075] It should be noted that node information is basic data such as the identification and status of each node in the mobile self-organizing network, including the node's unique identification, which is used to distinguish different nodes, the queue size of the node waiting to send data, reflecting the current load situation of the node, and the node's hardware performance, such as processing power and communication range.
[0076] Furthermore, network status information is the overall network status data perceived by all network nodes through a distributed method. The network status information includes but is not limited to network node identification, the amount of data queued by nodes waiting to be sent, and the link status between nodes.
[0077] Furthermore, a node routing table is a table created by each node based on network status information, used to record path information to other nodes. Its entries include the destination address (the identifier of the destination node), the next hop (the identifier of the next node during data transmission), and the link cost (a measure of the quality of the path, which may be based on factors such as link bandwidth and node queues).
[0078] It is understandable that all nodes use a distributed method to perceive the network situation information of the entire network (including but not limited to network node identification, node waiting to send data queue, inter-node link status, etc.), and use a specific algorithm to calculate the route to other nodes. Specifically, all nodes in the entire network use a distributed method to periodically perceive network situation information based on their own node information. Each node constructs a node routing table based on the perceived network situation information. The routing table contains entries such as the destination address, next hop node, and link cost. The shortest path first algorithm can be used when calculating the route, while taking into account factors such as link bandwidth and node queue.
[0079] Step S20, determining the intermediate node hop by hop based on the requesting node information, the destination node information, and the node routing table, and performing service routing link building based on the destination node and the intermediate node to obtain an initial service routing link;
[0080] It should be noted that requesting node information refers to data related to the node initiating the streaming service request, primarily including the requesting node's identifier, which is used to identify the service initiator. Destination node information refers to data related to the receiving node of the streaming service, primarily including the destination node's identifier, which is used to identify the service recipient. Intermediate nodes are nodes between the requesting node and the destination node that forward data. In an established routing link, any node other than the requesting node and the destination node may serve as an intermediate node.
[0081] It can be understood that service routing is the process of establishing a dedicated path between the requesting node and the destination node for transmitting streaming media services. By sending a link establishment request control packet and a link establishment confirmation control packet, intermediate nodes create corresponding routing table entries, ensuring that data can be transmitted hop by hop along the initial service routing link. The initial service routing link is a path formed through the hop-by-hop link establishment process, and its node sequence is dynamically generated by local decisions of each node.
[0082] In addition, it can be understood that after the service request node sends a link establishment request control packet, and reaches the destination node through hop-by-hop routing, the destination node sends a link establishment confirmation control packet in reverse to the service request node according to the path forwarded by the link establishment request control packet, and the intermediate node that receives the link establishment confirmation control packet establishes a routing table for the flow. Specifically, the request node determines the first-hop intermediate node based on its own node routing table, combined with the request node information, i.e., its own identifier, and the destination node information, i.e., the destination node identifier. After each intermediate node receives the request, it selects the next-hop node and forwards the request according to its own node routing table and network status information until it reaches the destination node. The request node sends a link establishment request control packet PATH, which contains the request node identifier, destination node identifier, flow identifier, intermediate node identifier on the path, etc., and forwards it to the destination node hop by hop. After receiving it, the destination node sends a link establishment confirmation control packet RESV in reverse according to the path of the PATH packet. After receiving RESV, the intermediate node establishes a routing table entry, including the flow identifier, request node identifier, destination node identifier, next-hop node, data packet sequence number, etc. After the request node receives RESV, the link establishment is completed, and the initial service routing link is formed. Reference Figure 2 , Figure 2 This is a schematic diagram of the nodes of a self-organizing network according to the first embodiment of the method for transmitting and repairing streaming media in a mobile self-organizing network of the present application.
[0083] like Figure 2 As shown in Figure 1, a line indicates a connection between two nodes. In this self-organizing network, node A is a streaming service requesting node, and node F is a destination node. Node A requests to establish a communication link to node F and continuously maintains the link.
[0084] In a feasible implementation, step S20 may include steps S21 to S25:
[0085] Step S21, determining whether there is a service routing link in the node routing table according to the request node information and the destination node information;
[0086] It should be noted that the service routing link is the path between the requesting node and the destination node for transmitting streaming media services. It is formed by connecting multiple nodes through routing table entries to ensure that data can be transmitted hop by hop from the requesting node to the destination node.
[0087] It is understood that the service requesting node determines whether a path to the destination node exists based on its own perception of the overall network status information. If so, it continues with the subsequent steps; if not, it returns a failure notification to the upper-layer application.
[0088] Step S22: When it is determined that a service routing link exists in the node routing table, a link establishment request is sent according to the requesting node information, and a link establishment request control packet is obtained according to the link establishment request. The link establishment request control packet includes a service requesting node identifier, a destination node identifier, a flow identifier set by the service requesting node, and identifiers of intermediate nodes on the hop-by-hop routing path of the link establishment request control packet.
[0089] It should be noted that the link establishment request is a signal sent by the requesting node to the destination node, which is used to request the establishment of a transmission path specifically used for transmitting streaming media services, so as to trigger the subsequent link establishment process.
[0090] Furthermore, the link establishment request control packet is a data packet that carries link establishment request information. Its function is to transmit key data required for link establishment between nodes, ensuring that all nodes can collaboratively complete link establishment. The service request node identifier contained in this packet is the unique identifier of the requesting node, the destination node identifier is the unique identifier of the destination node, the flow identifier set by the service request node is the unique number set by the requesting node for the current streaming service (used to distinguish different service flows), and the identifiers of each intermediate node on the hop-by-hop routing path of the link establishment request control packet are the identifiers of each node in the packet's transmission path, excluding the requesting node and the destination node.
[0091] It is understandable that when it is determined that there is a service routing link in the node routing table, the requesting node will send a link establishment request to the destination node based on its own requesting node information. A link establishment request control packet is generated based on the link establishment request. The link establishment request control packet contains the service requesting node identifier, the destination node identifier, the flow identifier set by the service requesting node, and the identifiers of each intermediate node on the hop-by-hop routing path of the link establishment request control packet. When the application layer has a streaming media service to send, the service requesting node initiates a link establishment request, selects the next hop based on the routing table generated by the local situation information, and subsequently sends the PATH packet to the destination node using a hop-by-hop routing method. The payload of the PATH packet may include the service requesting node identifier, the destination node identifier, the flow identifier set by the service requesting node, and the identifiers of each intermediate node on the hop-by-hop routing path of the PATH packet.
[0092] In addition, the service flow information is information related to the service flow, such as the flow ID, service request node ID, and destination node ID. When initiating a link establishment request control packet, after the link is established, the service request node starts sending data, which may carry the service flow information.
[0093] Step S23: selecting a first intermediate node according to the requesting node information and the network status information, and sending the link establishment request control packet to the first intermediate node within a preset timeout threshold;
[0094] It should be noted that the first intermediate node is the first intermediate node that the link establishment request control packet arrives at after departing from the requesting node.
[0095] Additionally, the preset timeout threshold is a time limit set by the requesting node for waiting for the first intermediate node to confirm receipt of the link establishment request control packet. If the requesting node still does not receive confirmation from the first intermediate node after the time threshold, it will resend the link establishment request control packet.
[0096] It is understood that the requesting node selects the first node to forward the link establishment request control packet from among possible intermediate nodes based on its own requesting node information and perceived network status information, i.e., the first intermediate node. During the selection process, priority is given to nodes with good link status and low load. Within a preset timeout threshold, the requesting node sends the link establishment request control packet to the first intermediate node. The service requesting node starts a link establishment wait timer, which is used to set the timeout for waiting to receive the RESV packet. If the timer times out, the flow identification number is incremented, and an attempt is made to send the PATH packet again, and the link establishment wait timer is started, with a maximum of m attempts.
[0097] Step S24: When it is detected that the link establishment request control packet is successfully sent, the link establishment request control packet is updated according to the identifier of the first intermediate node, a second intermediate node is selected according to the first intermediate node information and the network status information, and the updated link establishment request control packet is sent to the second intermediate node until the updated link establishment request control packet is sent hop by hop to the destination node.
[0098] The first intermediate node information is relevant data about the first intermediate node.
[0099] In addition, the updated link establishment request control packet is a new packet formed after the first intermediate node successfully receives the link establishment request control packet and adds its own identifier to the end of the identifier list of each intermediate node on the hop-by-hop routing path in the link establishment request control packet to record the transmission path of the packet.
[0100] It is understandable that intermediate node reads the destination node identification of PATH grouping and the identification of each intermediate node on the routing path in the PATH grouping, selects next hop according to the routing table generated by local situation information.If there is next hop, i.e. second intermediate node, adds the node identification of oneself at the tail of the identification of each intermediate node on the hop-by-hop routing path of PATH grouping, and then jumps to the next hop, i.e. second intermediate node forwards PATH grouping.Here intermediate node utilizes local situation information when selecting next hop, avoids selecting intermediate node as next hop on the routing path in the PATH grouping simultaneously, can avoid the link loop problem.
[0101] Reference Figure 3 , Figure 3 This is a link diagram of a requesting node sending a link establishment request control packet to a destination node in the first embodiment of the streaming media sending and repairing method in a mobile ad hoc network of the present application.
[0102] like Figure 3 As shown, service requesting node A determines that the next hop to destination node F is node B based on the routing table periodically maintained by situation information, and then sends a link establishment request control packet PATH to node B. The payload in the PATH packet sent by node A may include: service requesting node identifier A, destination node identifier F, stream identifier set by the service requesting node (e.g., Stream0), and identifiers A for each intermediate node on the hop-by-hop routing path of the PATH packet. Node A starts a link establishment wait timer, which is used to set a timeout for waiting to receive the RESV packet. If the timer times out, the stream identifier is incremented, and the PATH packet is retried. The link establishment wait timer is started, with a maximum number of attempts of m. After receiving the link establishment request control packet PATH sent by node A, node B reads the destination node identifier F of the PATH packet and the identifiers of each intermediate node on the routing path in the PATH packet. Based on the routing table generated by local situation information, node B selects the next hop C, updates the PATH packet, and forwards the PATH packet to node C. The payload in the PATH packet sent by node B may include: service requesting node identifier A, destination node identifier F, stream identifier Stream0, and identifiers A and B of the intermediate nodes. Similarly, the PATH packet passes through nodes A, B, C, D, and E until it is forwarded to node F. The payload in the PATH packet sent by node E may include the service request node identifier A, the destination node identifier F, the stream identifier Stream0, and the identifiers of the intermediate nodes A, B, C, D, and E. Upon receiving the PATH packet, node F locally records the contents of the PATH packet payload.
[0103] Step S25: When it is determined that the updated link establishment request control packet is sent to the destination node, whether the current link is valid is confirmed according to the updated link establishment request control packet, and if the current link is valid, an initial service routing link is obtained.
[0104] It is understood that upon determining that the updated link establishment request control packet has been successfully sent to the destination node, the destination node first locally records the contents of the link establishment request control packet payload, namely, the complete path from the requesting node to itself. Based on the reverse path of this complete path, a link establishment confirmation control packet (RESV) is generated and sent hop by hop back to the requesting node. When the requesting node receives the RESV packet, the current link becomes the initial service routing link.
[0105] In a feasible implementation, step S25 may include steps S251 to S254:
[0106] Step S251: when it is determined that the updated link establishment request control packet is sent to the destination node, parsing the intermediate node identifier according to the updated link establishment request control packet;
[0107] It should be noted that the updated link establishment request control packet is a link establishment request data packet containing complete path information after being forwarded by each intermediate node. Its payload records the identifiers of each intermediate node on the hop-by-hop routing path from the service request node to the destination node.
[0108] It can be understood that after confirming that the updated link establishment request control packet has been successfully sent to the destination node, the destination node will parse the packet and extract the identifiers of each intermediate node on the hop-by-hop routing path recorded in the packet payload, which fully reflects all the intermediate nodes that the link establishment request control packet passes through from the service request node to the destination node.
[0109] Step S252: construct a link establishment confirmation control packet according to the intermediate node identifier, wherein the path carried in the link establishment confirmation control packet is the reverse path of the path recorded in the link establishment request control packet;
[0110] It should be noted that the reverse path is a path in the opposite direction to the path recorded in the link establishment request control packet, that is, the path starting from the destination node, passing through each intermediate node in reverse order of the intermediate node identifier, and finally reaching the service request node.
[0111] It is understood that upon receiving a PATH packet, the destination node first locally records the contents of the PATH packet payload, i.e., the complete path from the service requesting node to itself. The destination node then sends a link establishment confirmation control packet, RESV, to the service requesting node. The sent path is the reverse order of the intermediate node identifiers along the hop-by-hop routing path of the PATH packet.
[0112] Step S253: Return the link establishment confirmation control packet to the service request node hop by hop along the reverse path, and when detecting that the jump passes through an intermediate node, establish a current service flow routing table based on the intermediate node information and the link establishment confirmation control packet;
[0113] It can be understood that the reverse path hop-by-hop return refers to the process in which the link establishment confirmation control packet follows the reverse path, starting from the destination node, passing through each intermediate node in sequence, and finally reaching the service request node.
[0114] It should be noted that the current service flow routing table is a routing record table established by each intermediate node for the current streaming media service. The table items include flow identifier, service request node identifier, destination node identifier, next hop node identifier, and data packet sequence number (initialized to 0). For example, the routing table of node E will record the flow identifier Stream0, service request node A, destination node F, next hop F, and data packet sequence number 0.
[0115] It is understandable that the intermediate node establishes a routing table for the service flow, and the routing table entries may include a flow identifier, a service request node identifier, a destination node identifier, a next-hop node identifier, and a data packet sequence number. The flow identifier, service request node identifier, and destination node identifier can be obtained from the payload of the control packet RESV. The next-hop node identifier is the identifier of the node that sent the link establishment confirmation control packet RESV, and the data packet sequence number is initialized to 0. The intermediate node continues to forward the link establishment confirmation control packet RESV to the service request node according to the sending path, and at the same time starts the path duration timer, which is used to determine whether the streaming media service link is valid. That is, if the intermediate node still does not receive the streaming media data packet before the path duration timer expires, the node's routing table for the service flow is deleted.
[0116] Step S254: When it is detected that the service request node receives the link establishment confirmation control packet and the intermediate node in the path completes the configuration of the current service flow routing table, the current link is confirmed to be valid, and an initial service routing link is obtained.
[0117] It is understood that when it is detected that the service request node has successfully received the link establishment confirmation control packet and all intermediate nodes in the path have completed the configuration of the current service flow routing table, the current link is confirmed to be valid. The link establishment process for the streaming media service is completed, and a routing table for the service flow is established at the service request node. The routing table entries may include the flow identifier, service request node identifier, destination node identifier, next hop node identifier, and data packet sequence number. The next hop node identifier is the identifier of the node that sent the link establishment confirmation control packet RESV, and the data packet sequence number is initialized to 0. At the same time, the path duration timer is started.
[0118] Reference Figure 4 , Figure 4 This is a schematic diagram of the process of a node sending a link establishment confirmation control packet to a service requesting node in the first embodiment of the streaming media sending and repairing method in a mobile ad hoc network of the present application.
[0119] like Figure 4 As shown, after receiving the PATH packet, node F sends a link establishment confirmation control packet RESV to service request node A. The path sent is the reverse order of the intermediate node identifiers on the hop-by-hop routing path of the PATH packet. The payload of the RESV packet sent by node F may include: the service request node identifier A, the destination node identifier F, the flow identifier Stream0 set by the service request node, and the reverse order of the intermediate node identifiers on the hop-by-hop routing path of the PATH packet: E, D, C, B, A. After receiving the link establishment confirmation control packet RESV sent by node F, node E establishes a routing table for the service flow. The routing table entries may include the flow identifier, service request node identifier, destination node identifier, next hop node identifier, and data packet sequence number. In this embodiment, the routing table set by node E for the service flow includes: flow identifier Stream0, service request node identifier A, destination node identifier F, next hop node identifier F, and the data packet sequence number is initialized to 0. At the same time, a path persistence timer is started. This timer is used to determine whether the streaming media service link is valid. That is, if the intermediate node still does not receive the streaming media data packet before the path persistence timer expires, node E deletes the routing table for the service flow. Node E then repeats the above steps, continuing to send RESV packets to node D based on the contents of the RESV payload. Node A, the service requesting node, receives the link establishment confirmation control packet RESV. Node A establishes a routing table for this service flow and starts the path duration timer. At this point, each node has a service routing table for this service, and the link establishment process for this streaming service is complete.
[0120] Step S30, performing hop-by-hop forwarding of the streaming media service according to the requesting node information, the streaming media service data, and the initial service routing link;
[0121] It should be noted that streaming media service data is continuous media data that needs to be transmitted in real time, such as video streams, audio streams, etc. Its characteristics are that it has strict requirements on the continuity, real-time and sequential nature of transmission. It needs to arrive at the destination node in sequence within the specified time limit to ensure smooth playback.
[0122] Furthermore, hop-by-hop forwarding of streaming services is the process by which streaming service data originates from the requesting node, is forwarded sequentially through intermediate nodes along the initial service routing link, and finally reaches the destination node. Each intermediate node forwards the data to the next hop node based on its own routing table and simultaneously updates the path duration timer.
[0123] It is understandable that each node maintains the path status and routing table entries. When a streaming data packet arrives, it queries the routing table entries of the corresponding stream and forwards it. At the same time, each node that forwards the data packet records the sequence number of the data packet that has recently passed through the node in the service flow. Specifically, the requesting node determines, based on the requesting node information, to forward the streaming service data to the destination node hop by hop through the intermediate nodes according to the initial service routing link. Each node forwards data according to its own routing table, and at the same time records the sequence number of the data packet that has recently passed through this node in the service flow. The sequence number of the upstream node is greater than or equal to the sequence number of the downstream node, and updates the path duration timer. If no data is received within the timeout, the routing table entry is deleted.
[0124] In a feasible implementation, step S30 may include steps S31 to S34:
[0125] Step S31, constructing a data packet according to the requesting node information and the streaming service data, wherein the data packet includes a streaming service identifier, a current sequence number, a service requesting node identifier, and a destination node identifier;
[0126] It should be noted that a data packet is a data packet that carries streaming media service data and is the basic unit for transmitting streaming media data in the network. It contains key information such as the streaming media service identifier, current sequence number, and destination node identifier, which is used to be correctly identified and forwarded during the transmission process.
[0127] Additionally, the streaming service identifier is a unique number assigned by the requesting node for the current streaming service. It distinguishes different service flows and ensures that each node can accurately identify and process the corresponding data stream. The current sequence number is the number of the data packet, which increases in the order in which the requesting node sends the data. It is used to identify the order in which the data packets are sent, helping receiving nodes and intermediate nodes determine whether the data is transmitted in order. For example, the 14th data packet sent by requesting node A has a current sequence number of 14.
[0128] Step S32: selecting a first intermediate node according to the initial service routing link, sending the data packet to the first intermediate node, and determining whether the initial service routing link is valid;
[0129] It can be understood that whether the initial business routing link is valid refers to whether the nodes in the link can forward data packets normally. It can be judged by whether the intermediate nodes receive data packets in sequence and whether the link is unobstructed. If the first intermediate node can receive and record the current sequence number normally, it means that the link is valid at this node.
[0130] Specifically, in this embodiment, each node forwarding streaming media data packets records the sequence number of the most recent data packet that passed through that node in the service flow, effectively distinguishing the upstream and downstream relationships between nodes. For example, in a certain exemplary network, if the service requesting node is S, the destination node is D, the intermediate nodes are X and Y, and the established link is SXYD, then as the service requesting node S continuously sends data packets, the most recently received data packet by node X is newer than the most recently received data packet by node Y. When this mechanism is employed, for nodes on the same link, if node X is upstream of node Y, it can be concluded that the data packet sequence number of node X is greater than or equal to the data packet sequence number of node Y; if node X is downstream of node Y, then the data packet sequence number of node X is less than or equal to the data packet sequence number of node Y.
[0131] Step S33: When detecting that the first intermediate node has received the data packet and the initial service routing link is valid, searching for corresponding path information in a local service routing table according to the streaming service identifier, so that the first intermediate node forwards the data packet to a second intermediate node according to the path information until the data packet is sent to the destination node hop by hop;
[0132] It should be noted that the local service routing table is the routing record stored by each node for the current streaming media service. The table items include the stream ID, service request node ID, destination node ID, next hop node ID, data packet sequence number, etc. For example, the routing table of node B will record that the next hop of F is C.
[0133] It is understood that when the first intermediate node detects that the data packet has been successfully received and the initial service routing link is valid, the first intermediate node searches its local service routing table for the corresponding path information, namely, the next-hop node identifier, based on the streaming service identifier in the data packet. Upon finding the corresponding path information, the first intermediate node forwards the data packet to the second intermediate node. Upon receiving the packet, the second intermediate node repeats the above process: searching the local routing table based on the service identifier, determining the next-hop node, and forwarding the packet, and so on, until the data packet is finally delivered to the destination node.
[0134] Step S34: When it is detected that the destination node receives the data packet, the streaming media service is forwarded hop by hop.
[0135] It is understandable that when it is detected that the destination node has successfully received the data packet, it indicates that the data packet has been forwarded hop by hop through each intermediate node in the initial service routing link, completing the transmission from the requesting node to the destination node. The transmission steps can be as follows: the service requesting node sends a data packet with a streaming service identifier and sends it to the next hop node according to the service routing table of the service requesting node. Each intermediate node forwards it to the next hop node according to the service identifier in the data packet and the locally stored service routing table until it is sent to the destination node. During the data transmission process, each node updates the path duration timer expiration time as it receives the data packet.
[0136] Reference Figure 5 , Figure 5 This is a schematic diagram of the streaming media service sending process of the first embodiment of the streaming media sending and repair method in a mobile ad hoc network of the present application.
[0137] like Figure 5 As shown in the figure, after the link establishment process is completed, the service request node A can send the streaming service to the destination node F. Each node forwards the service packet hop by hop according to the routing table stored in the node until it is forwarded to the destination node, and updates the path duration timer expiration time as the data packet is received. In particular, each node that forwards the streaming data packet records the sequence number of the latest data packet that passes through the node in the service flow, for example, Figure 4 In the example, the data packet sequence number sent by A to B is 14, the data packet sequence number sent by B to C is 13, the data packet sequence number sent by C to D is 12, the data packet sequence number sent by D to E is 11, and the data packet sequence number sent by E to F is 10. Then the data packet sequence numbers in the routing tables of each node are updated to A: 14, B: 13, C: 12, D: 11, and E: 10. By comparing the data packet sequence numbers stored in each node, the upstream and downstream relationships between nodes can be effectively distinguished.
[0138] Step S40: When it is detected that the service routing link is disconnected, a repair service routing link is established according to the maintenance initiating node information, the maintenance destination node information, the initial service routing link and the node routing table.
[0139] It should be noted that the service routing link disconnection refers to a situation where the link between two adjacent nodes in the initial service routing link cannot communicate normally.
[0140] In addition, the maintenance initiating node information is the data related to the node that senses the link disconnection and initiates the path maintenance. The maintenance destination node information is the data related to the original next-hop node whose link with the maintenance initiating node is disconnected, mainly including the identifier of the maintenance destination node.
[0141] Furthermore, the repair service routing link is a path from the maintenance initiating node to the maintenance destination node that is reestablished through the path maintenance process after the initial service routing link is disconnected, and is used to replace the disconnected part of the link to restore the entire service routing link to normal operation.
[0142] It is understandable that the node where the path failure occurs starts the local maintenance process based on the situation information mastered by the node, and uses the data packet sequence number and other information to re-establish the path to the original next-hop node, thereby completing the local maintenance of the link. Specifically, after detecting that the link is disconnected, the maintenance initiating node, that is, the node that perceives the broken link, determines whether there is a path to the maintenance destination node based on its own node routing table, combined with the maintenance initiating node information, that is, its own identification and the maintenance destination node information, that is, the original next-hop node identification. If so, the maintenance initiating node sends a link maintenance request packet REPR, containing service identification, node identification, data packet sequence number, etc., and forwards it hop by hop to the maintenance destination node. After receiving the REPR, the maintenance destination node returns a link maintenance confirmation packet REBD. The intermediate node and the maintenance initiating node update the routing table based on REBD, establish a repair service routing link, and then the streaming media data continues to be sent along the repaired link.
[0143] In a feasible implementation, step S40 may include steps S41 to S44:
[0144] Step S41, when it is detected that the service routing link is disconnected, determining whether there is a repair path to the maintenance destination node information according to the maintenance initiating node information and the node routing table;
[0145] It should be noted that the maintenance destination node information is data related to the original next-hop node whose link with the maintenance initiating node is disconnected, mainly including its unique identifier. For example, when link BC is disconnected, the identifier of node C is the maintenance destination node information.
[0146] It is understood that the node that senses the link disconnection, i.e., the maintenance initiating node, determines whether there is an alternative path to the original next-hop node based on its current network status information. If so, the path maintenance process is initiated; if not, the path maintenance request fails.
[0147] Step S42: When it is determined that there is a repair path to the maintenance destination node information, a next-hop repair node is selected according to the node routing table and a link maintenance request packet is sent to the next-hop repair node. The link maintenance request packet includes a maintenance initiating node identifier, a maintenance destination node identifier, a current streaming service identifier, a current data packet sequence number, a maintenance path identifier, and identifiers of intermediate nodes traversed by the repair path.
[0148] It should be noted that the link maintenance request packet is a control packet sent by the maintenance initiating node to request the establishment of a repair path. It contains the maintenance initiating node identifier, the maintenance destination node identifier, the current streaming media service identifier, the current data packet sequence number, that is, the latest data sequence number recorded by the maintenance initiating node, the maintenance path identifier, that is, the number used to distinguish different maintenance processes, the intermediate node identifier traversed in the current path, that is, the node that the packet has passed through and other information.
[0149] In addition, the next hop repair node represents the next node for forwarding the REPR packet dynamically selected from neighbor nodes based on its own node routing table and real-time network status information during the path maintenance process by the maintenance initiating node or the intermediate node that forwards the link maintenance request packet REPR.
[0150] It is understandable that the maintenance initiating node selects the next hop according to the routing table generated by the local situation information, and subsequently uses a hop-by-hop routing method to send a link maintenance request packet (REPR packet) to the original next hop node. The payload of the REPR packet can include the service request node identifier of the corresponding streaming media service link to be maintained, the destination node identifier, the stream identifier set by the service request node, the maintenance initiating node identifier (current node identifier), the maintenance destination node identifier (original next hop node identifier), that is, the maintenance destination node identifier, the maintenance identifier set by the maintenance initiating node, that is, the maintenance identifier set by the current node, the identifiers of each intermediate node on the hop-by-hop routing path of the REPR packet, and the sequence number of the data packet currently to be forwarded by the node and the intermediate node identifier traversed in the repair path. Each intermediate node that receives the REPR packet will repeat this process, select a new next hop repair node according to its own routing table, and forward the updated REPR packet hop by hop until it gradually approaches the maintenance destination node. The maintenance initiating node starts a maintenance waiting timer, which is used to set a timeout for waiting to receive a link maintenance confirmation packet (REBD packet). If the timer times out, the maintenance identification number is increased, and an attempt is made to send the REPR packet again, and the maintenance wait timer is started. The number of attempts is at most n times.
[0151] Step S43, when it is detected that the next-hop repair node does not belong to the node of the initial service routing link, determining a repair node according to the local routing table, sending a link maintenance request packet to the repair node, and updating the intermediate node identifier traversed by the repair path in the link maintenance request packet;
[0152] It should be noted that the repair node refers to the next forwarding node selected by the new intermediate node in the repair path. The node may be another new intermediate node, a maintenance destination node, or a node belonging to the initial service routing link.
[0153] It is understandable that the maintenance initiating node selects a node that does not belong to the initial service routing link on the path maintained to the original next hop node. The node reads the destination node identifier of the REPR packet and the identifiers of the intermediate nodes on the routing path in the REPR packet, and re-screens the most suitable repair node from the candidate neighbor nodes as the next hop node based on its own local routing table. If there is a next hop, add its own node identifier to the tail of the identifier of each intermediate node on the hop-by-hop routing path of the REPR packet, and then forward the REPR packet to the next hop. The intermediate node uses local situation information when selecting the next hop, and avoids selecting the intermediate node on the routing path in the REPR packet as the next hop, which can avoid the path maintenance loop problem.
[0154] Step S44: When it is detected that the next-hop repair node belongs to the node of the initial service routing link, a repair service routing link is established according to the link maintenance request packet.
[0155] It can be understood that when it is detected that the next-hop repair node belongs to the node of the initial service routing link, the node of the initial service routing link determines its upstream and downstream relationship with the maintenance initiating node based on the data packet sequence number in the link maintenance request packet, determines the repair method based on the judgment result, and establishes a repair service routing link.
[0156] Reference Figure 6 , Figure 6 This is a schematic diagram of adding a new intermediate node in the repair path of the first embodiment of the method for sending and repairing streaming media in a mobile ad hoc network of the present application.
[0157] like Figure 6As shown, node A senses that the link between AB is disconnected and determines that there is a path (AKB) to node B based on the situation information it senses. Node A sends a link maintenance request packet REPR to node B hop by hop, selecting node K as the next hop. Node K is not on the original path. The payload of the REPR packet sent by node A may include the service request node identifier A, the destination node identifier F, the flow identifier STREAM0, the maintenance initiating node identifier A, the maintenance destination node identifier B, the maintenance identifier MAINTAIN0, the identifiers A of each intermediate node, and the sequence number (for example, 14) of the data packet that node A is currently forwarding. Node A starts a maintenance wait timer, which is used to set the timeout for waiting to receive the REBD packet. If the timer times out, the maintenance identifier is incremented, and the REPR packet is retried, and the maintenance wait timer is started, with a maximum of n attempts. Node K, which is not on the original path, receives the link maintenance request packet REPR. At this time, node K reads the destination node identifier B of the REPR packet and the identifiers of each intermediate node on the routing path in the REPR packet, and selects the next hop B based on the routing table generated by the local situation information. The payload of the REPR packet sent by node K updates the identifiers A and K of each intermediate node. The maintenance destination node B sends a link maintenance confirmation packet REBD to the maintenance initiating node A (because node B is downstream of node A). Node B first locally records the contents of the REPR packet payload. Node B then sends a link maintenance confirmation packet REBD to node A, sending the path along the reverse order of the identifiers of the intermediate nodes on the REPR packet's hop-by-hop routing path, i.e., K and A. The payload of the link maintenance confirmation packet REBD sent by node B may include a path maintenance success identifier (currently 1), a flow identifier STREAM0, a service requesting node identifier A, a destination node identifier F, a maintenance initiating node identifier A, a maintenance destination node identifier B, a maintenance identifier MAINTAIN0, and the reverse order K and A of the identifiers of the intermediate nodes on the REPR packet's hop-by-hop routing path. After receiving the link maintenance confirmation packet REBD, intermediate node K establishes a routing table for this service flow. The routing table entries may include the flow identifier STREAM0, the service requesting node identifier A, the destination node identifier F, the next-hop node identifier B, and the data packet sequence number initialized to 0. Node K continues forwarding the link maintenance confirmation packet REBD to node A and simultaneously starts the path duration timer. Node A receives the link maintenance confirmation packet REBD, completing the path maintenance process. It updates the routing table for this service flow. The routing table entry may include the stream identifier STREAM0, the service request node identifier A, the destination node identifier F, the next-hop node identifier K, and the data packet sequence number, which is the sequence number of the most recent data packet in this service flow that has passed through this node. Node A also starts the path duration timer.
[0158] In a feasible implementation, step S44 may include steps S441 to S446:
[0159] Step S441, when it is detected that the next hop repair node belongs to the node of the initial service routing link, confirming the size relationship between the data packet sequence number in the link maintenance request packet and the data packet sequence number recorded by the current node;
[0160] It should be noted that the data packet sequence number recorded by the current node is the sequence number of the latest streaming data packet stored by the current node and passing through this node. This sequence number is continuously updated with data transmission and reflects the data transmission progress of the current node in the service link.
[0161] It can be understood that when it is detected that the next hop node is a node in the initial service routing link, the current node will extract the data packet sequence number from the received link maintenance request packet and compare it with the latest data packet sequence number of the current service flow recorded by itself to confirm the size relationship between the two.
[0162] Step S442: When the data packet sequence number in the link maintenance request packet is greater than the data packet sequence number recorded by the current node, it is determined that the maintenance initiating node is an upstream node or the current node is no longer in the new service path, and a link maintenance confirmation packet is sent to the maintenance initiating node;
[0163] It should be noted that the upstream node refers to the node that is located before the current node in the service routing link and is closer to the service request node in the data transmission direction. The data packet sequence number recorded by the upstream node is greater than or equal to the sequence number of the current node.
[0164] Furthermore, the new service path refers to a new service routing link formed by the repair path that replaces the original disconnected part and the remaining initial link, which may be formed through the path maintenance process.
[0165] It is understandable that if the sequence number of a data packet is greater than the sequence number of the latest data packet in the service flow recorded by the current node, it means that the upstream node initiated the path maintenance or the current node is no longer on the latest service link. At this time, the current node sends a link maintenance confirmation packet REBD to the maintenance initiating node, and the path sent is the reverse order of the identifiers of the intermediate nodes on the hop-by-hop routing path of the REPR packet. The payload of the link maintenance confirmation packet REBD sent by the current node may include a path maintenance success identifier, a flow identifier, a service request node identifier, a destination node identifier, a maintenance initiating node identifier, a maintenance destination node identifier, a maintenance identifier set by the maintenance initiating node, and the reverse order of the identifiers of the intermediate nodes on the hop-by-hop routing path of the REPR packet.
[0166] Reference Figure 7 , Figure 7 This is a schematic diagram of repairing a broken link at an upstream node in the first embodiment of the method for sending and repairing streaming media in a mobile ad hoc network of the present application.
[0167] like Figure 7 As shown in Figure 1, node B senses that the link to BC is disconnected, and determines that there is a path to node C (BMNEDC) based on the situation information it senses. Node B sends a link maintenance request packet REPR to node C hop by hop, and selects node M as the next hop. Figure 5 The process is similar to that in , until node N sends a REPR packet to node E, and finds that the sequence number of the data packet in the REPR packet (node B, sequence number 13) is greater than the sequence number of the latest data packet passing through node E (for example, 10), which means that the upstream node initiates path maintenance or node E is no longer on the latest service link. At this time, node E no longer continues to send REPR packets to node D, but sends a link maintenance confirmation packet REBD to the maintenance initiating node B. The path sent is the reverse order of the identifiers of each intermediate node on the hop-by-hop routing path of the REPR packet, which is N, M, and B. The payload of the link maintenance confirmation packet REBD sent by node E may include a path maintenance success identifier (1 at this time), a flow identifier STREAM0, a service request node identifier A, a destination node identifier F, a maintenance initiating node identifier B, a maintenance destination node identifier C, a maintenance identifier MAINTAIN0, and the reverse order of the identifiers of each intermediate node on the hop-by-hop routing path of the REPR packet, N, M, and B. The subsequent process is the same as Figure 6 The examples shown are similar.
[0168] Step S443: When the data packet sequence number in the link maintenance request packet is less than or equal to the data packet sequence number recorded by the current node, it is determined that the maintenance initiating node is a downstream node or the current node is already in a new service path, a link maintenance request packet is regenerated, the regenerated link maintenance request packet specifies the current node as the maintenance initiating node, and a link maintenance confirmation packet is sent to the previous maintenance initiating node.
[0169] It should be noted that the downstream node refers to a node located after the current node in the service routing link and closer to the destination node in the data transmission direction. The data packet sequence number recorded by the downstream node is less than or equal to the sequence number of the current node.
[0170] It can be understood that a new service path refers to a new transmission path formed during the maintenance process that replaces the original disconnected link. The current node is already in this path and assumes data forwarding functions. Furthermore, the newly generated link maintenance request packet is a new maintenance request packet generated by the current node, with itself as the maintenance initiating node. It contains a new maintenance initiating node identifier (i.e., the current node identifier), the original maintenance destination node identifier, the current data packet sequence number, and other information, used to re-initiate path maintenance.
[0171] Furthermore, it is understood that when the data packet sequence number in the link maintenance request packet is less than or equal to the data packet sequence number recorded by the current node, this indicates that the node sending the packet, i.e., the maintenance initiating node, is closer to the destination node than the current node, meaning that the maintenance initiating node is a downstream node, or that the current node is already on a new service path. In this case, the current node regenerates a link maintenance request packet, establishing itself as the new maintenance initiating node, while the maintenance destination node remains the original maintenance destination node.
[0172] Specifically, if the sequence number of the data packet is less than or equal to the sequence number of the most recent data packet in the service flow that passed through the node, as recorded by the current node, this indicates that the downstream node initiated path maintenance, or that the maintenance-initiating node is no longer on the latest service link. At this point, the current node restarts the path maintenance process and regenerates a link maintenance request packet (REPR). In this REPR packet, the maintenance-initiating node is the current node, and the maintenance destination node is the same as the maintenance destination node identifier in the received REPR packet. The current node also responds with a REBD packet to the most recent maintenance-initiating node. The maintenance success flag in the REBD packet is 0, indicating that the current path maintenance has failed.
[0173] Reference Figure 8 , Figure 8 This is a schematic diagram of repairing a broken link at a downstream node in the first embodiment of the method for sending and repairing streaming media in a mobile ad hoc network of the present application.
[0174] like Figure 8As shown, node E senses that the link of EF is disconnected, and determines that there is a path to node F (EDCXYF) based on the situation information it senses. Node E sends link maintenance request packets REPR to node F hop by hop, and selects node D as the next hop. After receiving the REPR packet, node D finds that the sequence number of the data packet in the REPR packet (node E, sequence number 10) is smaller than the sequence number of the latest data packet passing through node D (for example, 11), which means that the downstream node initiated the path maintenance or the maintenance initiating node is no longer on the latest service link. At this time, node D restarts the path maintenance process and regenerates the link maintenance request packet REPR, in which the maintenance initiating node is D and the maintenance destination node is F. At the same time, node D replies with a REBD packet to the maintenance initiating node E, in which the maintenance success flag in the REBD packet is 0, indicating that the current path maintenance has failed. Similarly, node D sends a REPR packet to the next hop node C. After receiving the REPR packet, node C finds that the sequence number of the data packet in the REPR packet (node D, sequence number 11) is less than the sequence number of the data packet that has recently passed through node C (for example, 12). Node C restarts the path maintenance process and regenerates the link maintenance request packet REPR. In this REPR packet, the maintenance initiating node is C and the maintenance destination node is F. At the same time, node C replies with a REBD packet to the maintenance initiating node D, in which the maintenance success flag in the REBD packet is 0. The subsequent process is the same as Figure 6 The examples shown are similar.
[0175] Step S444: When the maintenance destination node receives the link maintenance request packet, it records the path information in the link maintenance request packet, constructs a link maintenance confirmation packet based on the path information, and sends the link maintenance confirmation packet to the maintenance initiating node through the intermediate nodes hop by hop;
[0176] It should be noted that the path information is a hop-by-hop node identifier sequence from the maintenance initiating node to the maintenance destination node recorded in the link maintenance request packet, reflecting the transmission path of the maintenance request packet.
[0177] It is understandable that the maintenance destination node that receives the REPR packet first records the contents of the REPR packet payload locally, that is, records the complete path from the maintenance initiating node to itself. The maintenance destination node then sends a link maintenance confirmation packet REBD to the maintenance initiating node, and the path sent is the reverse order of the identifiers of the intermediate nodes on the hop-by-hop routing path of the REPR packet. The payload of the link maintenance confirmation packet REBD sent by the maintenance initiating node may include a path maintenance success identifier (1 in this case), a flow identifier, a service requesting node identifier, a destination node identifier, a maintenance initiating node identifier, a maintenance destination node identifier, a maintenance identifier set by the maintenance initiating node, and the reverse order of the identifiers of the intermediate nodes on the hop-by-hop routing path of the REPR packet.
[0178] Step S445: When the intermediate node receives the link maintenance confirmation packet, it extracts the payload content and establishes or updates a service routing table corresponding to the flow identifier;
[0179] It should be noted that the flow identifier is a unique number set by the service request node for the current streaming media service, which is used to distinguish different service flows and ensure that intermediate nodes can accurately identify the corresponding routing table entries.
[0180] It is understood that after receiving the link maintenance confirmation packet, the intermediate node extracts information from the packet's payload, including the flow ID, service request node ID, destination node ID, and next-hop node ID (i.e., the node ID that sent the confirmation packet). Based on this information, the intermediate node creates a new service routing table for the corresponding flow ID, or updates an existing routing table entry, such as the next-hop node ID and data packet sequence number. It also starts a path duration timer and deletes the routing table entry if no data is received within the timeout period.
[0181] Specifically, the intermediate node receives the link maintenance confirmation packet REBD and establishes / updates the routing table for the service flow. The routing table entries may include the flow identifier, service request node identifier, destination node identifier, next hop node identifier, and data packet sequence number. The flow identifier, service request node identifier, and destination node identifier can be obtained from the payload of the link maintenance confirmation packet REBD. The next hop node identifier is the identifier of the node that sent the link maintenance confirmation packet REBD. The data packet sequence number is initialized to 0 or the current node records the sequence number of the latest data packet that passes through the node in the service flow. The intermediate node continues to forward the link maintenance confirmation packet REBD to the maintenance initiating node according to the sending path, and at the same time starts the path duration timer. The timer is used to determine whether the streaming media service link is valid. That is, if the intermediate node still does not receive the streaming media data packet before the path duration timer times out, the node's routing table for the service flow is deleted.
[0182] Step S446: When the maintenance initiating node receives the link maintenance confirmation packet, it establishes a repair service routing link.
[0183] It is understood that when the maintenance initiating node receives the link maintenance confirmation packet REBD, the path maintenance process is complete. The maintenance initiating node updates the routing table for the service flow. The routing table entries may include the flow identifier, service request node identifier, destination node identifier, next-hop node identifier, and data packet sequence number. The next-hop node identifier is the identifier of the node that sent the link maintenance confirmation packet REBD. The data packet sequence number maintains the sequence number of the most recent data packet in the service flow that passed through the node, which is recorded by the current node. At the same time, the path duration timer is started.
[0184] This embodiment provides a method for sending and repairing streaming media in a mobile self-organizing network. By utilizing computing service equipment in the mobile self-organizing network, the network situation is perceived based on node information and a routing table is constructed to implement service routing link establishment, hop-by-hop forwarding of streaming media data, and dynamic repair when the link is disconnected. This technical means solves the technical problem of how to ensure stable and efficient transmission of streaming media service data in a complex and changeable network environment, and achieves the beneficial effects of improving the continuity, real-time performance, and reliability of streaming media transmission and optimizing user experience.
[0185] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 9 Step S10 of the method for sending and repairing streaming media in a mobile ad hoc network includes steps S11 to S13:
[0186] Step S11, sensing network status information based on node information and a preset sensing period, wherein the network status information includes network node identifiers, the amount of data queued by nodes waiting to be sent, and the status of links between nodes;
[0187] It should be noted that the preset sensing period is the time interval for a node to periodically sense network status information, which is preset by the network.
[0188] Furthermore, the network node identification, that is, the unique identification of each node, and the queue size of the node waiting to send data, that is, the amount of data currently to be transmitted by the node, reflect the node load and the link status between nodes, that is, the smoothness, bandwidth, delay, etc. of the communication link between nodes.
[0189] It is understandable that all nodes use a distributed method to periodically sense the network status information of the entire network, that is, a preset sensing period, where the network status information includes but is not limited to network node identification, the number of nodes waiting to send data, the link status between nodes, etc.
[0190] Further, it is understandable that the distributed situational awareness method can adopt the traditional flooding method, that is, each node sends the situation information of itself and its one-hop neighbor, and forwards the first copy of the information it receives; or combine the multipoint relay (MPR) in the optimal link state routing (Optimized Link State Routing, OLSR) protocol to reduce the flooding of situation information and reduce the forwarding of redundant information; or adopt a data broadcast distribution method based on situation fusion, that is, each node sends the whole network situation information it has mastered to the neighboring node at a certain period, and the neighboring node does not forward it, but only performs local updates; or adopt a hierarchical data broadcast distribution method based on situation fusion, that is, each node sends the hierarchical situation information it has mastered to the neighboring node according to different periods (the period of close distance is small, the period of far distance is large) according to the number of hops from other nodes to itself, and the neighboring node does not forward it, but only performs local updates. In the embodiment, the method of whole network situation information perception is not limited.
[0191] Step S12: constructing a neighbor node list based on the node information and the link status between the nodes;
[0192] It should be noted that the neighbor node list is a list of nodes directly connected to the node, that is, a list of nodes that can be reached within one hop. The list contains key information such as the neighbor node identifier, which is used to identify the range of nodes with which the current node can directly communicate.
[0193] In addition, the inter-node link status represents the real-time quality indicator of the communication link between nodes, which can determine whether there is direct communication capability between nodes and evaluate the link reliability.
[0194] It is understood that a node determines whether it has direct communication capabilities with other nodes based on its own node information and the real-time perceived inter-node link status. If the link status between two nodes meets the communication requirements, it is determined that direct communication is possible. The node compiles the identifiers of nodes with direct communication and the corresponding link status information into a neighbor node list.
[0195] Step S13, based on the neighbor node list and the network status information, determine the routing path to other nodes, and build a node routing table based on the routing path, the node routing table includes the destination node, the next hop node and the link cost information, the other nodes include neighbor nodes and non-neighbor nodes within the network status information range of the current node.
[0196] It should be noted that other nodes refer to nodes that are within the network situation information perception range of the current node but are not included in the neighbor node list, that is, nodes that need to be reached through multi-hop forwarding.
[0197] In addition, the routing path is the transmission path from the current node to other nodes, which is formed by a series of nodes connected in sequence.
[0198] The node routing table is a table of path information stored by the node to guide data forwarding. The table entries include the destination node, that is, the identifier of the other node that needs to be reached, the next hop node, which is the first node when forwarding data, usually a neighboring node or an adjacent node in the path, and the link cost information, which is a numerical value used to evaluate the quality of the routing path. It is usually calculated based on the bandwidth, delay, node queue amount, etc. of the link between nodes, and reflects the efficiency and reliability of data transmission on the path.
[0199] It is understood that each node establishes a list of neighboring nodes centered around itself and, based on network status information and certain rules, builds a routing table. Routing table entries include, but are not limited to, destination address, next-hop node, and link cost. When calculating routes to other nodes, a node can use the Shortest Path First (SPF) algorithm based on status information, taking into account factors such as link bandwidth and node queues.
[0200] This embodiment provides a method for sending and repairing streaming media in a mobile self-organizing network. By utilizing computing service equipment in the mobile self-organizing network, periodically sensing network status information and building a neighbor node list, and combining the network status information and the neighbor node list to build a node routing table, the technical problem of how to efficiently sense the network status and reasonably build a routing table in a complex network environment is solved, achieving the beneficial effects of optimizing routing path selection and improving data transmission efficiency and reliability.
[0201] It should be noted that the above examples are only used to understand this application and do not constitute a limitation on the streaming media sending and repair method of the mobile self-organizing network of this application. More simple transformations based on this technical concept are all within the scope of protection of this application.
[0202] This application also provides a streaming media sending and repair device for a mobile self-organizing network, please refer to Figure 10 , the streaming media sending and repairing device of the mobile self-organizing network includes:
[0203] The information sensing module 10 is used to sense network situation information based on node information and construct a node routing table based on the network situation information;
[0204] The routing link building module 20 is used to determine the intermediate node hop by hop based on the request node information, the destination node information and the node routing table, and to build a service routing link based on the destination node and the intermediate node to obtain an initial service routing link;
[0205] A service forwarding module 30 is configured to forward the streaming media service hop by hop based on the requesting node information, the streaming media service data, and the initial service routing link;
[0206] The path maintenance module 40 is configured to establish a repairing service routing link according to the maintenance initiating node information, the maintenance destination node information, the initial service routing link and the node routing table when detecting that the service routing link is disconnected.
[0207] The streaming media sending and repairing device for a mobile self-organizing network provided by the present application adopts the streaming media sending and repairing method for a mobile self-organizing network in the above-mentioned embodiment, which can solve the technical problem of difficulty in achieving sequential and stable transmission of streaming media data in a mobile self-organizing network. Compared with the prior art, the beneficial effects of the streaming media sending and repairing device for a mobile self-organizing network provided by the present application are the same as the beneficial effects of the streaming media sending and repairing method for a mobile self-organizing network provided by the above-mentioned embodiment, and the other technical features of the streaming media sending and repairing device for a mobile self-organizing network are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0208] In one embodiment, the routing link building module 20 is further used to determine whether there is a service routing link in the node routing table according to the requesting node information and the destination node information; when it is determined that there is a service routing link in the node routing table, send a link building request according to the requesting node information, and obtain a link building request control packet according to the link building request, the link building request control packet including a service requesting node identifier, a destination node identifier, a flow identifier set by the service requesting node, and identifiers of each intermediate node on the hop-by-hop routing path of the link building request control packet; select a first intermediate node according to the requesting node information and the network situation information, and send a request to the intermediate node within a preset timeout threshold. The first intermediate node sends the link establishment request control packet; when detecting that the link establishment request control packet is sent successfully, updating the link establishment request control packet according to the identifier of the first intermediate node, selecting a second intermediate node according to the first intermediate node information and the network status information, and sending the updated link establishment request control packet to the second intermediate node until the updated link establishment request control packet is sent to the destination node; when determining that the updated link establishment request control packet is sent to the destination node, confirming whether the current link is valid according to the updated link establishment request control packet, and obtaining the initial service routing link if the current link is valid.
[0209] In one embodiment, the routing link establishment module 20 is further used to parse the intermediate node identifier according to the updated link establishment request control packet when determining that the updated link establishment request control packet is sent to the destination node; construct a link establishment confirmation control packet according to the intermediate node identifier, and the path carried in the link establishment confirmation control packet is the reverse path of the path recorded in the link establishment request control packet; return the link establishment confirmation control packet to the service request node hop by hop according to the reverse path, and when detecting that the jump passes through the intermediate node, establish the current service flow routing table according to the intermediate node information and the link establishment confirmation control packet; when detecting that the service request node receives the link establishment confirmation control packet and the intermediate node in the path completes the configuration of the current service flow routing table, confirm that the current link is valid and obtain the initial service routing link.
[0210] In one embodiment, the service forwarding module 30 is further used to construct a data packet based on the request node information and streaming service data, the data packet including a streaming service identifier, a current sequence number, a service request node identifier, and a destination node identifier; select a first intermediate node based on the initial service routing link, and send the data packet to the first intermediate node, so that the first intermediate node records the received current sequence number, and determines whether the initial service routing link is valid based on the current sequence number and provides feedback; when it is detected that the first intermediate node has received the data packet and the initial service routing link is valid, the corresponding path information is searched in the local service routing table according to the streaming service identifier, and the data packet is forwarded to the second intermediate node until the data packet is sent to the destination node; when it is detected that the destination node has received the data packet, the hop-by-hop forwarding of the streaming service is completed.
[0211] In one embodiment, the path maintenance module 40 is further used to determine whether there is a repair path to the maintenance destination node information based on the maintenance initiating node information and the node routing table when it is detected that the service routing link is disconnected; when it is determined that there is a repair path to the maintenance destination node information, a link maintenance request packet is sent to the node of the repair path, and it is determined whether the link maintenance request packet is sent to a new intermediate node, the link maintenance request packet includes a maintenance initiating node identifier, a maintenance destination node identifier, a current streaming service identifier, a current data packet sequence number, a maintenance path identifier, and an intermediate node identifier traversed in the current path; when it is determined that the link maintenance request packet is sent to a new intermediate node, a repair node is determined based on the new intermediate node information and the maintenance destination node identifier, and a link maintenance request packet is sent to the repair node; when it is detected that the next hop node is a node of the initial service routing link, a repair service routing link is established based on the link maintenance request packet.
[0212] In one embodiment, the path maintenance module 40 is further configured to, when detecting that the next hop node is a node of the initial service routing link, confirm the size relationship between the data packet sequence number in the link maintenance request packet and the data packet sequence number recorded by the current node, and send the link maintenance request packet to the maintenance destination node; when the data packet sequence number in the link maintenance request packet is greater than the data packet sequence number recorded by the current node, determine that the maintenance initiating node is an upstream node or the current node is no longer in the new service path, and send a link maintenance confirmation packet to the maintenance initiating node; when the data packet sequence number in the link maintenance request packet is less than or equal to the data packet sequence number recorded by the current node, determine that the maintenance initiating node is a downstream node or the current node is no longer in the new service path. The point is already in the new service path, a link maintenance request packet is regenerated, the current node is used as the maintenance initiating node in the regenerated link maintenance request packet, and a link maintenance confirmation packet is sent to the previous maintenance initiating node; when the maintenance destination node receives the link maintenance request packet, the path information in the link maintenance request packet is recorded, and a link maintenance confirmation packet is constructed according to the path information and sent hop by hop to the maintenance initiating node through the intermediate node; when the intermediate node receives the link maintenance confirmation packet, the payload content is extracted and a service routing table corresponding to the flow identifier is established or updated; when the maintenance initiating node receives the link maintenance confirmation packet, a repair service routing link is established.
[0213] In one embodiment, the information perception module 10 is also used to perceive network status information based on node information and a preset perception period, wherein the network status information includes network node identification, the amount of data waiting to be sent by the node, and the link status between nodes; construct a neighbor node list based on the node information and the link status between nodes; determine the routing path to other nodes based on the neighbor node list and the network status information, and construct a node routing table based on the routing path, wherein the node routing table includes the destination node, the next hop node, and the link cost information, and the other nodes include neighbor nodes and non-neighbor nodes within the network status information range of the current node.
[0214] The present application provides a streaming media sending and repairing device for a mobile self-organizing network, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the streaming media sending and repairing method for the mobile self-organizing network in the above-mentioned embodiment one.
[0215] Reference below Figure 11, which shows a schematic structural diagram of a streaming media sending and repairing device for a mobile ad hoc network suitable for implementing an embodiment of the present application. The streaming media sending and repairing device for a mobile ad hoc network in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 11 The streaming media sending and repairing device of the mobile ad hoc network shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0216] like Figure 11 As shown, the streaming media sending and repairing device for a mobile self-organizing network may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a ROM (Read Only Memory) 1002 or a program loaded from a storage device 1003 into a RAM (Random Access Memory) 1004. Various programs and data required for the operation of the streaming media sending and repairing device for a mobile self-organizing network are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the streaming media transmission and repair device of the mobile ad hoc network to communicate wirelessly or wired with other devices to exchange data. Although the figure shows the streaming media transmission and repair device of the mobile ad hoc network with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems can be implemented or have instead.
[0217] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0218] The streaming media sending and repairing device for a mobile self-organizing network provided by this application adopts the streaming media sending and repairing method for a mobile self-organizing network in the above-mentioned embodiment, which can solve the technical problem of difficulty in achieving sequential and stable transmission of streaming media data in a mobile self-organizing network. Compared with the prior art, the beneficial effects of the streaming media sending and repairing device for a mobile self-organizing network provided by this application are the same as the beneficial effects of the streaming media sending and repairing method for a mobile self-organizing network provided by the above-mentioned embodiment, and the other technical features of the streaming media sending and repairing device for a mobile self-organizing network are the same as the features disclosed in the method of the previous embodiment, and are not further described here.
[0219] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0220] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0221] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the streaming media sending and repairing method for a mobile ad hoc network in the above-mentioned embodiment.
[0222] The computer-readable storage medium provided in this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, RAM (Random Access Memory), ROM (Read Only Memory), Erasable Programmable Read Only Memory (Erasable Programmable Read Only Memory or flash memory, EPROM), optical fiber, CD-ROM (CD-Read Only Memory, portable compact disk read-only memory), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0223] The computer-readable storage medium may be included in the streaming media sending and repairing device of the mobile ad hoc network; or may exist independently without being assembled into the streaming media sending and repairing device of the mobile ad hoc network.
[0224] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the streaming media sending and repairing device of the mobile self-organizing network, the streaming media sending and repairing device of the mobile self-organizing network: perceives the network status information based on the node information, and constructs a node routing table based on the network status information; determines the intermediate node hop by hop based on the request node information, the destination node information and the node routing table, and establishes a service routing link based on the destination node and the intermediate node to obtain an initial service routing link; forwards the streaming media service hop by hop based on the request node information, the streaming media service data and the initial service routing link; when it is detected that the service routing link is disconnected, establishes a repair service routing link based on the maintenance initiating node information, the maintenance destination node information, the initial service routing link and the node routing table.
[0225] The computer program code for performing the operations of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a LAN (Local Area Network) or a WAN (Wide Area Network), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0226] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0227] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0228] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., a computer program) for executing the above-mentioned method for transmitting and repairing streaming media in a mobile ad hoc network. This computer-readable storage medium can solve the technical problem of difficulty in achieving sequential and stable transmission of streaming media data in a mobile ad hoc network. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the method for transmitting and repairing streaming media in a mobile ad hoc network provided in the above-mentioned embodiment, and will not be elaborated here.
[0229] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for sending and repairing streaming media in a mobile ad hoc network.
[0230] The computer program product provided in this application can solve the technical problem of difficulty in achieving sequential and stable transmission of streaming media data in a mobile ad hoc network. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the method for transmitting and repairing streaming media in a mobile ad hoc network provided in the above-mentioned embodiment, and will not be further described here.
[0231] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for transmitting and repairing streaming media in a mobile ad hoc network, characterized in that: The method comprises: Perceiving network situation information based on node information, and constructing a node routing table based on the network situation information; Determine the intermediate node hop by hop based on the request node information, the destination node information and the node routing table, and perform service routing link building based on the destination node and the intermediate node to obtain an initial service routing link; Performing hop-by-hop forwarding of the streaming media service according to the requesting node information, the streaming media service data, and the initial service routing link; When it is detected that the service routing link is disconnected, a repair service routing link is established according to the maintenance initiating node information, the maintenance destination node information, the initial service routing link and the node routing table.
2. The method according to claim 1, wherein The step of determining the intermediate node hop by hop based on the requesting node information, the destination node information and the node routing table, and establishing a service routing link based on the destination node and the intermediate node to obtain the initial service routing link includes: Determine whether a service routing link exists in the node routing table according to the request node information and the destination node information; When it is determined that a service routing link exists in the node routing table, a link establishment request is sent according to the requesting node information, and a link establishment request control packet is obtained according to the link establishment request, wherein the link establishment request control packet includes a service requesting node identifier, a destination node identifier, a flow identifier set by the service requesting node, and identifiers of intermediate nodes on a hop-by-hop routing path of the link establishment request control packet; Selecting a first intermediate node according to the requesting node information and the network situation information, and sending the link establishment request control packet to the first intermediate node within a preset timeout threshold; Upon detecting that the link establishment request control packet is successfully sent, updating the link establishment request control packet according to the identifier of the first intermediate node, selecting a second intermediate node according to the first intermediate node information and the network status information, and sending the updated link establishment request control packet to the second intermediate node until the updated link establishment request control packet is sent hop by hop to the destination node; When it is determined that the updated link establishment request control packet is sent to the destination node, whether the current link is valid is confirmed according to the updated link establishment request control packet, and if the current link is valid, an initial service routing link is obtained.
3. The method according to claim 2, wherein The step of determining whether the current link is valid according to the updated link establishment request control packet when the updated link establishment request control packet is sent to the destination node, and obtaining the initial service routing link if the current link is valid includes: When determining that the updated link establishment request control packet is sent to the destination node, parsing the intermediate node identifier according to the updated link establishment request control packet; Constructing a link establishment confirmation control packet according to the intermediate node identifier, wherein the path carried in the link establishment confirmation control packet is the reverse path of the path recorded in the link establishment request control packet; Returning the link establishment confirmation control packet to the service request node hop by hop along the reverse path, and establishing a current service flow routing table based on the intermediate node information and the link establishment confirmation control packet when detecting that the jump passes through an intermediate node; When it is detected that the service request node receives the link establishment confirmation control packet and the intermediate nodes in the path complete the configuration of the current service flow routing table, the current link is confirmed to be valid, and the initial service routing link is obtained.
4. The method according to claim 1, wherein The step of forwarding the streaming media service hop by hop according to the requesting node information, the streaming media service data and the initial service routing link includes: Constructing a data group according to the request node information and the streaming service data, wherein the data group includes a streaming service identifier, a current sequence number, a service request node identifier, and a destination node identifier; selecting a first intermediate node according to the initial service routing link, sending the data packet to the first intermediate node, and determining whether the initial service routing link is valid; When detecting that the first intermediate node receives the data packet and the initial service routing link is valid, searching for corresponding path information in a local service routing table according to the streaming service identifier, so that the first intermediate node forwards the data packet to the second intermediate node according to the path information until the data packet is sent to the destination node hop by hop; When it is detected that the destination node receives the data packet, the streaming media service is forwarded hop by hop.
5. The method according to claim 1, wherein When the service routing link is detected to be disconnected, the step of establishing a repair service routing link according to the maintenance initiating node information, the maintenance destination node information, the initial service routing link, and the node routing table includes: When detecting that the service routing link is disconnected, determining whether there is a repair path to the maintenance destination node information according to the maintenance initiating node information and the node routing table; When it is determined that there is a repair path to the maintenance destination node information, selecting a next-hop repair node according to the node routing table and sending a link maintenance request packet to the next-hop repair node, the link maintenance request packet including a maintenance initiating node identifier, a maintenance destination node identifier, a current streaming media service identifier, a current data packet sequence number, a maintenance path identifier, and an identifier of an intermediate node traversed by the repair path; When detecting that the next-hop repair node does not belong to a node of the initial service routing link, determining a repair node according to a local routing table, sending a link maintenance request packet to the repair node, and updating the intermediate node identifier traversed by the repair path in the link maintenance request packet; When it is detected that the next-hop repair node belongs to a node of the initial service routing link, a repair service routing link is established according to the link maintenance request packet.
6. The method according to claim 5, wherein The step of establishing a repair service routing link according to a link maintenance request packet when detecting that the next hop repair node belongs to a node of the initial service routing link comprises: When detecting that the next-hop repair node belongs to a node of the initial service routing link, confirming a size relationship between a data packet sequence number in a link maintenance request packet and a data packet sequence number recorded by the current node; When the data packet sequence number in the link maintenance request packet is greater than the data packet sequence number recorded by the current node, it is determined that the maintenance initiating node is an upstream node or the current node is no longer in the new service path, and a link maintenance confirmation packet is sent to the maintenance initiating node; When the data packet sequence number in the link maintenance request packet is less than or equal to the data packet sequence number recorded by the current node, determining that the maintenance initiating node is a downstream node or the current node is already in the new service path, regenerating a link maintenance request packet, with the current node as the maintenance initiating node in the regenerated link maintenance request packet, and sending a link maintenance confirmation packet to the previous maintenance initiating node; When the maintenance destination node receives the link maintenance request packet, it records the path information in the link maintenance request packet, constructs a link maintenance confirmation packet according to the path information, and sends the link maintenance confirmation packet to the maintenance initiating node through the intermediate nodes hop by hop; When the intermediate node receives the link maintenance confirmation packet, it extracts the payload content therein and establishes or updates a service routing table corresponding to the flow identifier; When the maintenance initiating node receives the link maintenance confirmation packet, it establishes a repair service routing link.
7. The method according to claim 1, wherein The step of perceiving network situation information according to node information and constructing a node routing table according to the network situation information includes: Sense network situation information based on node information and a preset sensing period, wherein the network situation information includes network node identification, the amount of data queued by the node waiting to be sent, and the status of links between nodes; Constructing a neighbor node list according to the node information and the link status between the nodes; Based on the neighbor node list and the network status information, a routing path to other nodes is determined, and a node routing table is constructed based on the routing path. The node routing table includes a destination node, a next-hop node, and link cost information. The other nodes include neighbor nodes and non-neighbor nodes within the network status information range of the current node.
8. A streaming media sending and repairing device for a mobile ad hoc network, characterized in that: The device comprises: An information perception module, configured to perceive network situation information based on node information and construct a node routing table based on the network situation information; A routing link building module is used to determine the intermediate node hop by hop based on the request node information, the destination node information and the node routing table, and to build a service routing link based on the destination node and the intermediate node to obtain an initial service routing link; A service forwarding module, configured to forward the streaming media service hop by hop according to the requesting node information, the streaming media service data, and the initial service routing link; The path maintenance module is used to establish a repair service routing link according to the maintenance initiating node information, the maintenance destination node information, the initial service routing link and the node routing table when detecting that the service routing link is disconnected.
9. A streaming media sending and repair device for a mobile ad hoc network, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for sending and repairing streaming media in a mobile ad hoc network according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for sending and repairing streaming media in a mobile ad hoc network according to any one of claims 1 to 7 are implemented.
