Dynamic management and control method for ad hoc network single-transmitting multi-receiving wireless image transmission system
By employing WIFI networking and UDP protocol in the self-organizing wireless image transmission system, combined with dynamic packet control methods, the problem of poor hardware and software compatibility was solved, achieving stable image transmission and bandwidth optimization for multiple receivers, and meeting the needs of multi-role collaborative work.
Patent Information
- Application Number
- CN202511491344.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-18
- Publication Date
- 2026-01-09
AI Technical Summary
Existing wireless image transmission systems suffer from poor hardware and software compatibility in ad hoc network scenarios, failing to effectively support stable image transmission from multiple receivers. This leads to bandwidth contention and latency issues, making it difficult to meet the needs of multi-role collaborative work.
A wireless local area network is built using WIFI technology, image data transmission is achieved based on the UDP protocol, and multiple receiving ends are managed through a dynamic packet control method, including defining packet status flags and using timers to adjust packets and optimize bandwidth utilization.
It enables multi-receiver image transmission in an environment without third-party devices, improves bandwidth utilization, supports various hardware and operating systems, and ensures efficient transmission and real-time response of critical image information.
Smart Images

Figure CN121309732A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image transmission technology, and in particular to a dynamic management and control method for a self-organizing network single-transmitter-multiple-receiver wireless image transmission system. Background Technology
[0002] Wireless image transmission systems have significant application value in scenarios such as field exploration, rescue and disaster relief, and on-site reconnaissance. These systems typically need to achieve self-organizing network communication without relying on third-party network equipment and transmit images acquired at the front end back to multiple receiving terminals in real time.
[0003] In related technologies, there are already some wireless image transmission system implementations, such as OpenHD and EZ-WiFiBroadcast. However, these are usually based on embedded hardware platforms such as Raspberry Pi, coupled with customized system images and dedicated peripherals to achieve image transmission between the sending and receiving ends. However, there are some drawbacks: for example, the system hardware only supports Raspberry Pi hosts, with strict restrictions on the types of network cards, cameras, and other devices; the software uses customized system images, which are difficult to port and redevelop, resulting in poor versatility; and although theoretically supporting multiple receivers, due to network bandwidth limitations, it can only stably support 2 to 3 receivers in practice. When the number of receivers increases, each receiver will compete for the limited bandwidth, resulting in severe image transmission delays, which cannot meet the needs of multi-role collaborative work in field missions.
[0004] Therefore, it is necessary to provide a wireless image transmission management method that can build a network independently in scenarios without third-party equipment, effectively manage multiple receivers to improve bandwidth utilization, and has strong versatility. Summary of the Invention
[0005] The purpose of this invention is to provide a dynamic management and control method for ad hoc network single-transmitter multiple-receiver wireless image transmission systems, so as to solve the problems existing in the prior art.
[0006] To achieve the above objectives, this invention provides a dynamic management and control method for ad hoc single-transmitter multiple-receiver wireless image transmission systems, comprising the following steps: S1: Use WIFI technology to build a wireless local area network, with the transmitting end acting as a WIFI hotspot, and the receiving end searching for and connecting to the hotspot to join the local area network. S2: Image data transmission between the sending and receiving ends is implemented based on the UDP protocol; S3: Dynamic group control is used to manage the permissions of multiple receiving ends in order to improve the utilization of image data under limited network bandwidth; The dynamic group control includes the following process: Calculate the system receiver tolerance based on the total bandwidth of the wireless network card and the bandwidth required for a single image transmission path; establish an effective receiver list (ARL), add receivers that have joined the local area network and passed authentication to the list, and remove receivers from the list when they go offline; define the group status flag (group_flag) of the receiver, with values of 0, 1, 2, and 3, representing no group, assigned to group 1, assigned to group 2, and assigned to group 3, respectively; set the initial value of the group status flag of newly added receivers to the effective receiver list (ARL) to 0; perform packet control operations on receivers in groups 1, 2, and 3 respectively.
[0007] Furthermore, the group control operation of Group 1 includes: dividing the effective area of the WIFI signal centered on the transmitting end into multiple grids, the number of grids not exceeding the spatial coverage tolerance, and the upper limit of the spatial coverage tolerance in the system receiving end tolerance is 20%; triggering adjustment periodically through a timer, during adjustment, setting the group status flag of the receiving end in Group 1 to 0, recording the start time of its failure to obtain an image, and removing it from Group 1; obtaining the position of the effective receiving end in each grid according to GPS, calculating the geometric center of all receiving ends in each grid, adding the receiving end closest to the geometric center to Group 1, setting its group status flag to 1, and clearing its start time of failure to obtain an image.
[0008] Furthermore, the group control operation of Group 2 includes: the upper limit of the time coverage tolerance in the system receiver tolerance is 60%; when the timer triggers the adjustment, the group status flag of the receiver in Group 2 is set to 0, the start time of its failure to obtain an image is recorded, and it is removed from Group 2; the receivers with the group status flag of 0 in the list of valid receivers are filtered, the duration of their failure to obtain image reception permission is calculated, several receivers with the longest duration are selected and added to Group 2, their group status flag is set to 2, and the start time is cleared.
[0009] Furthermore, the group control operation of Group 3 includes: the upper limit of the proportion of real-time application tolerance in the system receiver tolerance is 20%; a real-time application queue matching the real-time application tolerance is established at the sender; when the timer triggers the adjustment, if an application is received from the receiver, its group status flag is checked first, and only applications with a group status flag of 0 are processed; if the queue is not full, the receiver is added to the tail of the queue, its group status flag is set to 3, and the start time is cleared; if the queue is full, the receiver at the head of the queue is removed according to the first-in-first-out principle, its group status flag is set to 0 and the start time is recorded, and then the new requesting receiver is added to the tail of the queue, its group status flag is set to 3, and the start time is cleared.
[0010] Furthermore, when establishing the aforementioned wireless local area network, the hardware configurations of the transmitting and receiving ends are as follows: The transmitting end includes a host, a USB wireless network card, an antenna, and a camera; the receiving end includes a host, a USB wireless network card, an antenna, a display, and a GPS module; the USB wireless network card operates at a frequency of 5.0 GHz, the antenna operates at the same frequency as the USB wireless network card, and the antenna is set perpendicular to the ground.
[0011] Furthermore, the software configuration for building the wireless local area network includes: installing an operating system, either Windows or Linux, on the hosts of the transmitting and receiving ends; developing software programs based on the Qt development framework and the OpenCV computer vision library, wherein OpenCV is used to implement the functions of camera activation / deactivation, image capture, image compression, image decompression, and image display; and installing a USB wireless network card driver on the hosts so that the hosts can recognize the wireless network card.
[0012] Furthermore, the software operations of the sending end include: creating a WIFI hotspot with a name and password; Start the camera and timer; in the slot function triggered by the timer, capture image data using OpenCV and store it in the buffer, and compress the image data; set up a UDP socket and select unicast, broadcast or multicast mode to send the compressed image data according to the transmission requirements.
[0013] Furthermore, the software operations of the receiving end include: searching for the WIFI hotspot created by the sending end and connecting by entering the password; setting up a UDP socket and binding the corresponding IP address and port number according to the transmission mode of the sending end; in the slot function of the UDP socket, adjusting the datagram size according to the size of the data to be processed, receiving the data and decompressing the data to obtain the original image data, and displaying the image on the display using OpenCV.
[0014] Furthermore, when transmitting image data based on the UDP protocol, the configuration requirements for different transmission modes are as follows: In unicast mode, the destination IP address and destination port number of the receiving end need to be specified; in broadcast mode, the port number needs to be specified, and all receiving ends bound to the specified port number within the local area network can receive data; in multicast mode, the multicast IP address and multicast port number need to be specified, and only receiving ends that have joined the multicast IP address and bound to the specified multicast port number can receive data.
[0015] Furthermore, image data transmission between the sending and receiving ends can be compressed before transmission. The specific steps are as follows: at the sending end, intra-frame predictive coding is performed on the captured image data to eliminate spatial redundancy; discrete cosine transform and quantization are performed on the prediction residuals to reduce the amount of data; entropy coding is performed on the quantized coefficients to generate a compressed bitstream; at the receiving end, entropy decoding, inverse quantization, and inverse discrete cosine transform are performed on the received compressed bitstream to reconstruct the image data.
[0016] This invention provides a dynamic management and control method for ad hoc single-transmitter multiple-receiver wireless image transmission systems, which has the following beneficial effects: 1. By configuring the sending end as a WIFI hotspot, the receiving end can directly connect to the hotspot to form a local area network. It does not rely on third-party network equipment such as routers and base stations, and is suitable for image transmission tasks in environments without public network coverage, such as in the wild or after disasters.
[0017] 2. Based on the UDP protocol, it supports three transmission modes: unicast, broadcast, and multicast. By constructing an effective receiver list (ARL) and group status flags, and combining three group strategies—spatial coverage, time rotation, and real-time request—it achieves dynamic permission allocation and bandwidth scheduling for multiple receivers, significantly improving the utilization efficiency of image data.
[0018] 3. It adopts a modular hardware design, supports various types of hosts, wireless network cards, cameras and monitors, is compatible with Windows and Linux operating systems, and is based on Qt and OpenCV for software development, which facilitates function customization and secondary development, and has good cross-platform portability and scenario adaptability.
[0019] 4. By setting spatial coverage tolerance, temporal coverage tolerance, and real-time request tolerance, and combining them with a timer triggering mechanism to dynamically adjust the receiving end groups, the system can balance spatial coverage integrity, temporal fairness, and real-time response capability under limited bandwidth conditions, ensuring that key image information is efficiently transmitted to the required terminals. Attached Figure Description
[0020] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 The present invention provides a flowchart of a dynamic management and control method for a self-organizing network single-transmitter-multiple-receiver wireless image transmission system. Detailed Implementation
[0021] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0022] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0023] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0024] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0025] This embodiment provides a dynamic management method for a self-organizing network single-transmitter-multiple-receiver wireless image transmission system, including the following steps: S1: A wireless local area network (WLAN) is established using WIFI technology, with the transmitting end acting as a WIFI hotspot, and the receiving end searching for and connecting to the hotspot to join the WLAN; S2: Image data transmission between the transmitting end and the receiving end is implemented based on the UDP protocol; S3: Access control is implemented for multiple receiving ends through dynamic packet management to improve image data utilization under limited network bandwidth; wherein, the dynamic packet management includes the following process: based on the total bandwidth of the wireless network card and the requirements of a single image transmission path... The system calculates the bandwidth and receiver tolerance; establishes an effective receiver list (ARL), adding receivers that have joined the local area network and passed authentication to the list, and removing receivers from the list when they go offline; defines the group status flag (group_flag) of the receiver, with values of 0, 1, 2, and 3, representing no group, assigned to group 1, assigned to group 2, and assigned to group 3, respectively; the initial value of the group status flag of newly added receivers to the effective receiver list (ARL) is set to 0; and packet control operations are performed on receivers in groups 1, 2, and 3 respectively.
[0026] See Figure 1 As can be seen, the first step is to execute step S1, which uses WIFI technology to establish a wireless local area network. The hardware configuration for the transmitting end, such as a drone, is as follows: an embedded computer is used as the host, equipped with a 5.0GHz USB wireless network card. A high-gain antenna matching the wireless network card's frequency is inserted into the network card slot and placed perpendicular to the drone's body. A 4K high-definition camera is connected via a USB interface. The hardware configuration for the receiving end is as follows: the command center receiver uses a general-purpose computer, equipped with the same model 5.0GHz USB wireless network card, a 27-inch HDMI monitor, and a USB GPS module; the receivers for frontline rescue team members and logistical supplies both use embedded computers, equipped with the same 5.0GHz USB wireless network card, a 7-inch portable HDMI monitor, and a USB GPS module. All receiver antennas are placed perpendicular to the ground to ensure signal quality.
[0027] In terms of software configuration, both the sending and receiving hosts are running Linux Ubuntu 22.04. The program is developed using the Qt 6.2.4 framework and the OpenCV 4.8.0 computer vision library. After installing the corresponding Linux driver for the USB wireless network card, the sending end uses the "create_ap" tool to create a 5.0GHz encrypted Wi-Fi hotspot named "Fire-Rescue-Hotspot" with the password "Rescue@2024". Each receiving end searches for this hotspot using the system's "Network Management" function, enters the password, and joins the wireless LAN after successful connection, completing the self-organizing network setup in step S1.
[0028] Next, step S2 is executed to transmit image data based on the UDP protocol. After the sending software starts, it first initializes the 4K camera using OpenCV's "VideoCapture" class, setting the capture resolution to 3840×2160 and the frame rate to 25fps, while creating a timer with a timing period of 40ms. In the timer slot function, the "read()" method is called to capture a single frame image and store it in the memory buffer. The image is then compressed into JPEG format using OpenCV's "imencode()" function. Subsequently, a UDP socket is created, multicast mode is selected for transmission, the multicast IP address is set to "239.1.1.1" and the multicast port number is set to "9999", and the compressed JPEG image data is sent to the multicast address through the socket. After the receiving software starts, it creates a UDP socket and binds it to the multicast IP address "239.1.1.1", multicast port number "9999", and local wireless network card name (such as "wlan0") set by the sending end. In the UDP socket slot function, according to the size of the JPEG data to be received (about 300KB), the "setsockopt()" function is called to adjust the datagram buffer size to 400KB to avoid data loss. After receiving the data, it decompresses it into the original 4K image using the "imdecode()" function of OpenCV, and then converts it into the "QPixmap" format supported by Qt. The image is then displayed on the monitor in real time, achieving stable transmission of image data and completing step S2.
[0029] Finally, step S3 is executed to manage access permissions for multiple receivers through dynamic group control. First, the system receiver tolerance is calculated: the actual transmission rate of the 5.0GHz USB wireless network card used by the transmitter is approximately 300Mbps, and the bandwidth required for a single image transmission path is "single frame compressed image size × frame rate", that is, 300KB × 25fps = 7.5MB / s. Therefore, the system receiver tolerance = 37.5MB / s ÷ 7.5MB / s = 10, meaning the system can stably support a maximum of 10 receivers simultaneously. Subsequently, an ARL (Authorized Receiving List) is established: Every 6 seconds, the sending end sends a "legitimacy verification packet" to the receivers connected to the hotspot. Upon receiving the packet, the receiver returns a "verification response packet" containing its own IP address (e.g., the command center receiver's IP is 192.168.5.100, the frontline rescue receiver's IP is 192.168.5.101-104, and the logistics receiver's IP is 192.168.5.105-106) and GPS location information. After verifying that the IP address in the response packet belongs to the 192.168.5.0 / 24 network segment, the sending end adds this receiver information to the ARL. If a receiver fails to return a response packet three times consecutively, it is removed from the ARL. Initially, the ARL contains 9 legitimate receivers. Next, a group status flag (group_flag) is defined: For all newly added receivers to the ARL, the initial value of group_flag is set to 0 (no group), with a value of 1 corresponding to group 1, 2 to group 2, and 3 to group 3.
[0030] It is easy to understand that this method is designed for field seismic exploration missions in remote mountainous areas without any third-party network infrastructure. It requires the use of drones equipped with imaging equipment to acquire images of the topography and geological fractures in the exploration area, and then transmit them back to the ground command center's fixed receiving end, three groups of mobile exploration team members (each group consisting of 2-3 people) and one logistics support receiving end, for a total of eight receiving ends. This method enables real-time image transmission with one transmit and multiple receive ends, and avoids image delay caused by receiving ends competing for bandwidth.
[0031] Specifically, the group control operation of Group 1 includes: dividing the effective WIFI signal area centered on the transmitting end into multiple grids, the number of grids not exceeding the spatial coverage tolerance, and the upper limit of the spatial coverage tolerance in the system receiving end tolerance is 20%; triggering adjustment periodically through a timer, during adjustment, setting the group status flag of the receiving end in Group 1 to 0, recording the start time of its failure to obtain an image, and removing it from Group 1; obtaining the position of the effective receiving end in each grid according to GPS, calculating the geometric center of all receiving ends in each grid, adding the receiving end closest to the geometric center to Group 1, setting its group status flag to 1, and clearing its start time of failure to obtain an image.
[0032] The group control operation of Group 2 includes: the upper limit of the time coverage tolerance in the system receiver tolerance is 60%; when the timer triggers the adjustment, the group status flag of the receiver in Group 2 is set to 0, the start time of its failure to obtain the image is recorded, and it is removed from Group 2; the receivers with the group status flag of 0 in the list of valid receivers are filtered, the duration of their failure to obtain the image receiving permission is calculated, and several receivers with the longest duration are selected to be added to Group 2, their group status flag is set to 2, and the start time is cleared.
[0033] Group 3's group control operations include: the upper limit of the real-time application tolerance in the system's receiving end tolerance is 20%; a real-time application queue matching the real-time application tolerance is established at the sending end; when the timer triggers the adjustment, if an application is received from the receiving end, its group status flag is checked first, and only applications with a group status flag of 0 are processed; if the queue is not full, the receiving end is added to the tail of the queue, its group status flag is set to 3, and the start time is cleared; if the queue is full, the receiving end at the head of the queue is removed according to the first-in-first-out principle, its group status flag is set to 0 and the start time is recorded, and then the new requesting receiving end is added to the tail of the queue, its group status flag is set to 3, and the start time is cleared.
[0034] Therefore, Group 1 adopts spatial coverage control, with a tolerance of 20% of the system receiver's tolerance, i.e., 2. Assuming the real-time GPS location of the UAV transmitter is 28.0000°N, 113.0000°E, the effective WIFI coverage area with a radius of approximately 1.2 kilometers is divided into two grids. Grid 1 ranges from "28.0000°N - 28.0060°N, 113.0000°E - 113.0060°E", and Grid 2 ranges from "28.0000°N - 28.0060°N, 113.0060°E - 113.0120°E". Adjustments are triggered by a timer with a 12-second interval: During adjustment, the group_flag of the original receivers in group 1 is first set to 0, their "start time for not obtaining an image" is recorded, and they are removed from group 1; then, the positions of the ARL receivers in each grid are obtained through GPS, and the geometric center of the receivers (100, 101) in grid 1 is calculated to be 28.0030°N, 113.0030°E. Receiver 100, which is closer to the center, is added to group 1, its group_flag is set to 1, and its start time is cleared; the geometric center of the receivers (102, 103) in grid 2 is calculated to be 28.0030°N, 113.0090°E. Receiver 103, which is closer to the center, is added to group 1, its group_flag is set to 1, and its start time is cleared, ensuring that each grid has at least one receiver that has obtained an image.
[0035] Group 2 uses a time-based rotation management system, with a tolerance of 60% of the system's receiver tolerance, i.e., 6 receivers. The timer is synchronized with Group 1: During adjustment, the `group_flag` of existing receivers in Group 2 is first set to 0, their "start time for not obtaining image" is recorded, and they are removed from Group 2. Seven receivers with `group_flag` of 0 are selected from the ARL: 101, 102, 104, 105, 106, 107, and 108. The "duration of not obtaining image reception permission" for each receiver is calculated, and the first six (101, 102, 104, 105, 106, and 107) are selected by sorting their IP addresses from smallest to largest and added to Group 2. Their `group_flag` is set to 2, and their start time is cleared to ensure that all receivers that have not yet obtained image access receive image permissions in a time-sharing manner.
[0036] Group 3 employs real-time request control, with a tolerance limit of 20% of the system receiver's tolerance, i.e., 2 requests. A real-time request queue of length 2 is established at the sending end: when the timer triggers the adjustment, if an image reception request is received from the receiver, its group_flag is checked first—only requests from receivers with group_flag set to 0 are processed. Assuming that during the adjustment period, receiver 108 has group_flag=0, and logistics support sends a request to "view the image of the material delivery area," the queue is not full at this time, so 108 is added to the end of the queue, group_flag is set to 3, and the start time is reset to zero; subsequently, receiver 109 comes online and has joined ARL, group_flag=0, and a reinforcement rescue team member sends a request, the queue is still not full (1 person), so 109 is added to the end of the queue, group_flag is set to 3, and the start time is reset to zero; if receiver 110 comes online later, group_flag=0, and sends another request, the queue is full, then according to the first-in-first-out principle, the group_flag of the head receiver 108 is set to 0, its start time is recorded, and it is removed from the queue, and then 110 is added to the end of the queue, group_flag is set to 3, and the start time is reset to zero, ensuring that emergency needs are responded to in a timely manner.
[0037] It is easy to understand that through the above steps, in the forest fire rescue scenario, multiple receiving ends can achieve orderly image acquisition through dynamic group management, the image transmission delay is controllable, there is no lag problem caused by bandwidth contention, and the collaborative work needs of the command center, front-line rescue and logistics supply can be met, which can effectively improve the utilization rate of image data under limited bandwidth.
[0038] Specifically, when setting up the aforementioned wireless local area network, the hardware configurations of the transmitting and receiving ends are as follows: The transmitting end includes a host, a USB wireless network card, an antenna, and a camera; the receiving end includes a host, a USB wireless network card, an antenna, a display, and a GPS module; the USB wireless network card operates at a frequency of 5.0 GHz, the antenna operates at the same frequency as the USB wireless network card, and the antenna is set perpendicular to the ground.
[0039] The software configuration for building the wireless local area network includes: installing an operating system, either Windows or Linux, on the hosts of the transmitting and receiving ends; developing software programs based on the Qt development framework and the OpenCV computer vision library, wherein OpenCV is used to implement the functions of camera activation / deactivation, image capture, image compression, image decompression, and image display; and installing a USB wireless network card driver on the hosts so that the hosts can recognize the wireless network card.
[0040] Specifically, the software operations at the sending end include: creating a Wi-Fi hotspot with a name and password; Start the camera and timer; in the slot function triggered by the timer, capture image data using OpenCV and store it in the buffer, and compress the image data; set up a UDP socket and select unicast, broadcast or multicast mode to send the compressed image data according to the transmission requirements.
[0041] The software operations of the receiving end include: searching for the WIFI hotspot created by the sending end and connecting by entering the password; setting up a UDP socket and binding the corresponding IP address and port number according to the transmission mode of the sending end; in the slot function of the UDP socket, adjusting the data packet size according to the size of the data to be processed, receiving the data and decompressing the data to obtain the original image data, and displaying the image on the display using OpenCV.
[0042] Therefore, after starting the receiving software, it automatically calls the Linux system's "nmcli" network management command to scan for surrounding Wi-Fi signals. The software interface displays the search results in real time. The sending Wi-Fi hotspot is set according to section 4.2.4 of the manual, named "Geo-Exploration-Hotspot," and encrypted using WPA2-PSK. After the user selects the "Geo-Exploration-Hotspot" hotspot in the software interface, a password input box pops up. The user enters the preset password "Geo@2024." The software encapsulates the password into a network connection request and executes the connection operation using the command "nmcli dev wifi connect "Geo-Exploration-Hotspot" password "Geo@2024"". After a successful connection, the software interface displays "Joined the local area network, IP address: 192.168.3.102," and records this IP address for subsequent UDP socket configuration.
[0043] Specifically, the configuration requirements for different transmission modes when transmitting image data based on the UDP protocol are as follows: In unicast mode, the destination IP address and destination port number of the receiving end need to be specified; in broadcast mode, the port number needs to be specified, and all receiving ends bound to the specified port number within the local area network can receive data; in multicast mode, the multicast IP address and multicast port number need to be specified, and only receiving ends that have joined the multicast IP address and bound to the specified multicast port number can receive data.
[0044] Therefore, when the software starts, it determines the current transmission mode by reading the "transmission mode configuration file" pre-stored on the sending end. For example, if the configuration file is marked "Transmission mode: Multicast, Multicast IP: 239.2.2.2, Port number: 8888", the software triggers the socket configuration process in multicast mode; if it is marked "Transmission mode: Unicast, Destination IP: 192.168.3.101, Port number: 8888", the unicast mode configuration process is triggered; and if it is marked "Transmission mode: Broadcast, Port number: 8888", the broadcast mode configuration process is triggered. In unicast mode: a socket is created by calling Qt's "QUdpSocket" class, and the receiving end's local IP address (192.168.3.102) and the agreed port number (8888) are bound using the function "bind(QHostAddress("192.168.3.102"),8888)", ensuring that only unicast data from the sending end pointing to that IP and port is received. Broadcast mode: After creating a QUdpSocket object, the "bind(QHostAddress::AnyIPv4,8888)" function is used to bind all local IPv4 addresses to the agreed port number (8888), enabling the receiving end to receive all broadcast data sent to that port within the local area network, which meets the requirement in the claim that "all receiving ends bound to that port number within the local area network can receive data".
[0045] Multicast mode: After creating a QUdpSocket object, first bind the multicast IP address (239.2.2.2) and port number (8888) using the function "bind(QHostAddress("239.2.2.2"),8888)", then call the function "joinMulticastGroup(QHostAddress("239.2.2.2"),QNetworkInterface::interfaceFromName("wlan0"))" to add the receiving wireless network card (interface name "wlan0") to the multicast group.
[0046] The software uses Qt's signal and slot mechanism to associate the UDP socket's "readyRead()" signal with a custom "onDataReceived()" slot function. The slot function processes the data according to the following steps: Data packet size adjustment and data reception: First, the "bytesAvailable()" function is called to obtain the total number of bytes of data to be received, for example, if the size of the data to be received is detected to be 200KB; then the "setReadBufferSize(200*1024)" function is called to adjust the socket read buffer size to 200KB; finally, all data is read through the "readAll()" function and stored in the "recvData" cache variable of type "QByteArray".
[0047] Data decompression and original image restoration: The OpenCV "imdecode()" function is called to process the cached data. The specific code logic is as follows: "recvData" is converted to "cv::Mat" supported by OpenCV: "cv::imdecode(cv::Mat(1,recvData.size(),CV_8UC1,recvData.data()),cv::IMREAD_COLOR)" function decompresses the JPEG compressed data to obtain the original RGB image with a resolution of 1920×1080.
[0048] Image display: The original image is displayed in a pre-created "image display window" using the "imshow()" function of OpenCV; at the same time, the "cv::waitKey(1)" function is called to ensure that the image is refreshed in real time, so as to realize the real-time visualization of the on-site image during the field exploration process.
[0049] In another preferred embodiment, image data transmission between the transmitting end and the receiving end can be compressed before transmission. The specific steps are as follows: at the transmitting end, intra-frame predictive coding is performed on the captured image data to eliminate image spatial redundancy; discrete cosine transform and quantization are performed on the prediction residual to reduce the amount of data; entropy coding is performed on the quantized coefficients to generate a compressed bitstream; at the receiving end, entropy decoding, inverse quantization and inverse discrete cosine transform are performed on the received compressed bitstream to reconstruct the image data.
[0050] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A dynamic management and control method for a self-organizing network single-transmitter multiple-receiver wireless image transmission system, characterized in that, Includes the following steps: S1: Use WIFI technology to build a wireless local area network, with the transmitting end acting as a WIFI hotspot, and the receiving end searching for and connecting to the hotspot to join the local area network. S2: Image data transmission between the sending and receiving ends is implemented based on the UDP protocol; S3: Dynamic group control is used to manage the permissions of multiple receiving ends in order to improve the utilization of image data under limited network bandwidth; The dynamic group control includes the following process: Calculate the system receiver tolerance based on the total bandwidth of the wireless network card and the bandwidth required for a single image transmission path; Establish a valid receiver list (ARL), add receivers that have joined the local area network and passed the verification to the list, and remove receivers from the list when they go offline. Define the group status flag bit group_flag of the receiver. The value of the group status flag bit includes 0, 1, 2 and 3, which represent not grouped, assigned to group 1, assigned to group 2 and assigned to group 3 respectively. The initial value of the group status flag bit of the receiver newly added to the list of valid receivers ARL is set to 0. Perform group control operations on the receiving ends of Group 1, Group 2 and Group 3 respectively.
2. The dynamic management and control method for a self-organizing network single-transmitter multiple-receiver wireless image transmission system according to claim 1, characterized in that, The group control operations for Group 1 include: The effective area of the WIFI signal centered on the transmitting end is divided into multiple grids, the number of grids does not exceed the spatial coverage tolerance, and the proportion of the spatial coverage tolerance in the system receiving end tolerance is up to 20%; The adjustment is triggered periodically by a timer. During the adjustment, the group status flag of the receiver in group 1 is set to 0, the start time of its failure to obtain an image is recorded, and it is removed from group 1. The location of the valid receiver in each grid is obtained based on GPS. The geometric center of all receivers in each grid is calculated. The receiver closest to the geometric center is added to group 1, and its group status flag is set to 1. At the same time, the start time of its failure to obtain an image is cleared.
3. The dynamic management and control method for a self-organizing network single-transmitter multiple-receiver wireless image transmission system according to claim 1, characterized in that, The group control operations for Group 2 include: The maximum proportion of time coverage tolerance in the system receiver tolerance is 60%. When the timer triggers the adjustment, the group status flag of the receiver in group 2 is set to 0, the start time when it has not acquired an image is recorded, and it is removed from group 2. Filter the receivers in the list of valid receivers whose group status flag is 0, calculate the duration for which they have not obtained image reception permission, select several receivers with the longest duration and add them to group 2, set their group status flag to 2, and clear the start time.
4. The dynamic management and control method for a self-organizing network single-transmitter multiple-receiver wireless image transmission system according to claim 1, characterized in that, Group 3 group control operations include: The maximum proportion of real-time application tolerance in the system's receiving tolerance is 20%. At the sending end, a real-time application queue matching the real-time application tolerance is established; when the timer triggers the adjustment, if an application is received from the receiving end, its packet status flag is checked first, and only applications with a packet status flag of 0 are processed. If the queue is not full, the receiving end is added to the tail of the queue, its group status flag is set to 3, and the start time is cleared. If the queue is full, remove the head receiver according to the first-in-first-out principle, set its group status flag to 0 and record the start time, then add the newly requested receiver to the tail of the queue, set its group status flag to 3 and clear the start time.
5. The dynamic management and control method for a self-organizing network single-transmitter multiple-receiver wireless image transmission system according to claim 1, characterized in that, When setting up the aforementioned wireless local area network, the hardware configurations of the transmitting and receiving ends are as follows: The transmitting end includes a host, a USB wireless network card, an antenna, and a camera; The receiving end includes a host, a USB wireless network card, an antenna, a display, and a GPS module; The USB wireless network card operates at a frequency of 5.0 GHz, and the antenna operates at the same frequency as the USB wireless network card, with the antenna positioned perpendicular to the ground.
6. The dynamic management and control method for a self-organizing network single-transmitter multiple-receiver wireless image transmission system according to claim 1, characterized in that, The software configuration for building the wireless local area network includes: An operating system, either Windows or Linux, is installed on the hosts at both the sending and receiving ends. The software program is developed based on the Qt development framework and the OpenCV computer vision library. The OpenCV is used to implement the functions of camera opening and closing, image capture, image compression, image decompression and image display. Install the USB wireless network card driver on the host so that the host can recognize the wireless network card.
7. The dynamic management and control method for a self-organizing network single-transmitter multiple-receiver wireless image transmission system according to claim 6, characterized in that, The software operations at the sending end include: Create a Wi-Fi hotspot with a name and password; Start the camera and timer; In the slot function triggered by the timer, image data is captured using OpenCV and stored in the buffer, and the image data is compressed. Configure a UDP socket and select unicast, broadcast, or multicast mode to send compressed image data according to transmission requirements.
8. The dynamic management and control method for a self-organizing network single-transmitter multiple-receiver wireless image transmission system according to claim 6, characterized in that, The software operations at the receiving end include: Search for the Wi-Fi hotspot created by the sender and connect by entering the password; Configure a UDP socket and bind the corresponding IP address and port number according to the transmission mode of the sending end; In the slot function of the UDP socket, the packet size is adjusted according to the size of the data to be processed, the data is received and decompressed to obtain the original image data, and the image is displayed on the monitor using OpenCV.
9. The dynamic management and control method for a self-organizing network single-transmitter multiple-receiver wireless image transmission system according to claim 1, characterized in that, When transmitting image data using the UDP protocol, the configuration requirements for different transmission modes are as follows: In unicast mode, the destination IP address and destination port number of the receiving end must be specified; In broadcast mode, a port number needs to be specified, and all receiving ends bound to the specified port number within the local area network can receive data; In multicast mode, a multicast IP address and a multicast port number must be specified. Only receivers that have joined the multicast IP address and bound to the multicast port number can receive data.
10. The dynamic management and control method for a self-organizing network single-transmitter multiple-receiver wireless image transmission system according to claim 1, characterized in that, Image data can be compressed before transmission between the sending and receiving ends. The specific steps are as follows: At the transmitting end, intra-frame predictive coding is performed on the captured image data to eliminate spatial redundancy in the image. Discrete cosine transform and quantization are performed on the prediction residuals to reduce the amount of data. The quantized coefficients are entropy encoded to generate a compressed bitstream; At the receiving end, the received compressed bitstream is subjected to entropy decoding, inverse quantization, and inverse discrete cosine transform to reconstruct the image data.