A reliable method and system for acquiring mineral videos using mobile devices
By configuring the same anycast service IP address and gateway router caching mechanism for mobile devices, the problem of unstable video data transmission when mobile devices switch gateways in the mining environment is solved, realizing uninterrupted and reliable acquisition of video data, and improving video quality and system reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG JINGLIFANG DIGITAL TECHNOLOGY GROUP CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-06-02
AI Technical Summary
In mining environments, video data transmission from mobile devices is easily interrupted when switching gateways, resulting in data packet loss. Existing technologies lack effective mechanisms to ensure uninterrupted and reliable acquisition of high-volume, real-time video data.
Each mobile device is configured with the same anycast service IP address. The gateway router establishes a record list, announces connection information via multicast, and sets up a cache on the gateway router to coordinate caching and communication, ensuring the reliability of data transmission.
It enables uninterrupted and reliable acquisition of video data in gateway switching scenarios, reduces the frame drop rate of video streams, improves video quality and overall system reliability, and is suitable for mobile devices in mining environments.
Smart Images

Figure CN122138156A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of video transmission technology, and in particular relates to a reliable method and system for acquiring mineral videos on mobile devices. Background Technology
[0002] In modern smart mines, mobile devices such as robots, autonomous transport vehicles, and AR glasses are widely used for inspection, monitoring, and operations. These mobile devices continuously collect live video streams through their onboard high-definition cameras and transmit the video data back to the backend analysis system via wireless network.
[0003] However, due to the vast and complex environment of mining sites, mobile devices inevitably need to switch between multiple wireless access points (i.e., gateways) during movement. In traditional TCP / IP protocols, gateway switching causes transmission connection interruptions, requiring the re-establishment of connections, during which data packets in transmission are highly susceptible to loss. Although some protocols support retransmission mechanisms, retransmission requests can typically only be sent to the gateway with the last communication (i.e., the original gateway). Once the mobile device has connected to a new gateway, retransmission requests sent to the original gateway will not receive a response, resulting in continuous frame drops, stuttering, and pixelation in the video stream. This is a fatal flaw for scenarios requiring real-time, high-quality video for security monitoring or AI analysis.
[0004] Therefore, existing technologies lack an effective mechanism to ensure uninterrupted and reliable acquisition of high-volume, real-time video data in gateway switching scenarios. Summary of the Invention
[0005] The purpose of this application is to provide a reliable method and system for acquiring mineral videos from mobile devices, so as to overcome the problem of unstable video data transmission from mobile devices in mining environments.
[0006] To achieve the above objectives, the technical solution of this application is as follows:
[0007] A reliable method for acquiring mineral video from a mobile device, wherein the mobile device accesses a network via a wireless access point, the wireless access point being connected to a gateway router, and the reliable method for acquiring mineral video from the mobile device includes:
[0008] Configure the same anycast service IP address for each mobile device. After the mobile device connects to the wireless access point, it sends a device information report message, reporting its own identification number and IP address.
[0009] After receiving the message, the gateway router connected to the wireless access point creates a record list including the mobile device's identifier, IP address, and MAC address, and announces the mobile device's connection information to the network.
[0010] When a client requests a video stream from a mobile device, the destination address of the request message is the gateway router address of the mobile device, and it also carries the mobile device's identification number and IP address. After receiving the request message, the gateway router of the mobile device finds the corresponding MAC address based on the mobile device's identification number and IP address, and then sends it to the mobile device.
[0011] When a mobile device switches its connected wireless access point while moving, the second gateway router after the switch will announce the mobile device's connection information to the network. After receiving the announcement from the second gateway router, the first gateway router before the switch will confirm whether the mobile device has left. If it is confirmed that it has left, it will delete the record list corresponding to the mobile device and announce the cancellation of the mobile device's connection information to the network.
[0012] Preferably, the reliable mineral video acquisition method for the mobile device further includes:
[0013] Gateway routers set up caches for data transmission from mobile devices;
[0014] The device information report message sent by the mobile device after connecting to the wireless access point also includes the IP address of the first gateway router before the switch;
[0015] After receiving the message, the second gateway router connected to the wireless access point also creates a record list that includes the IP address of the first gateway router before the switch.
[0016] When a mobile device transmits data, the transmitted data is cached in the cache set in the gateway router;
[0017] When the second gateway router receives a retransmission request, if the data in the retransmission request is not cached locally or is incomplete, it sends a retransmission request to the first gateway router recorded in the record list.
[0018] After receiving the retransmission request, the first gateway router sends the requested data from its cache to the second gateway router.
[0019] Preferably, the IP header option values of the request message are set to preset values.
[0020] Preferably, when caching the transmitted data in the cache set in the gateway router, if the cache space is full, when a new message arrives, the system returns to the memory start address of the cache, deletes the oldest data, and then stores it, and increments the record overwrite count by 1.
[0021] Preferably, when the second gateway router receives a retransmission request, it includes:
[0022] If the data requested for retransmission is not cached locally or is incomplete, and the number of rewrites is 0, then a retransmission request is sent to the first gateway router recorded in the record list.
[0023] Preferably, the reliable mineral video acquisition method for the mobile device further includes:
[0024] When a mobile device identifies the transmitted data as important, it marks the transmitted data as important.
[0025] After identifying important markers, the gateway router sets up a second cache for the transmitted data, in addition to the original cache.
[0026] Preferably, confirming whether the mobile device has left includes:
[0027] The first gateway router sends an ICMP ping request to the mobile device, carrying the mobile device's identification code;
[0028] After receiving an ICMP ping request, the mobile device verifies the identifier code. If it matches, it replies with an ICMP Reply message.
[0029] If the first gateway router does not receive an ICMP Reply message, it confirms that the mobile device has left.
[0030] This application also proposes a reliable mineral video acquisition system for mobile devices, which includes a mobile device, a client, and a gateway router. The mobile device, client, and gateway router are configured to perform the steps of the above method.
[0031] This application proposes a reliable method and system for acquiring mineral video from mobile devices. By configuring each mobile device with the same anycast service IP address, the gateway router establishes a record list including the mobile device's identification number, IP address, and MAC address, and announces the mobile device's connection information to the network. This enhances the reliability of video data transmission from mobile devices in the mining environment and provides an effective mechanism to ensure uninterrupted and reliable acquisition of high-volume, real-time video data even during gateway switching scenarios. This allows back-end command personnel to better see the situation on-site and conduct on-site command, and also facilitates back-end analysis equipment to better analyze abnormal situations on-site, avoiding the omission of abnormal risk events. Attached Figure Description
[0032] Figure 1 This is a flowchart of the reliable mineral video acquisition method for mobile devices in this application. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0034] Example 1: As Figure 1 As shown, a reliable method for acquiring mineral video from a mobile device is provided. The mobile device accesses the network via a wireless access point, which is connected to a gateway router. The method includes:
[0035] Step S1: Configure the same anycast service IP address for each mobile device. After the mobile device connects to the wireless access point, it sends a device information report message, reporting its own identification number and IP address.
[0036] In this embodiment, the mining farm has established a WIFI network, which is used to achieve full-area networking through various network devices (such as switches, routers) and wireless access points (APs). There are multiple (N) mobile devices in the mining farm. Each mobile device has a unique identifier code ID (Robot_1, Robot_2, ..., Robot_N). The mobile devices connect to the WIFI network through each AP (each gateway router is directly connected to one AP to provide WIFI access for the mobile devices. At this time, the gateway IP address of the mobile device is the interface IP address of the gateway router connected to the AP) to participate in network communication.
[0037] In this embodiment, all mobile devices are configured with the same anycast service IP address; that is, all mobile devices are configured with the same IP address (e.g., IP1). Anycast is a network addressing and routing method that allows the same IP address to be assigned to multiple nodes in different locations. Data packets are routed to one of the nodes based on the "nearest" distance measured by the routing protocol (e.g., fewest hops, lowest latency). It achieves distributed deployment and load balancing of services through shared addresses and can provide high availability and proximity access during task allocation based on network topology.
[0038] Mobile devices connect to wireless access points (APs), which in turn connect to a gateway router (also known as a gateway) in the network. It's important to note that the AP and gateway router can be two separate devices or the same network device; many APs now integrate gateway router functionality.
[0039] Once a mobile device connects to an access point (AP), it sends a device information report message via unicast, reporting its identification number (ID) and IP address.
[0040] Step S2: After receiving the message, the gateway router connected to the wireless access point establishes a record list including the mobile device identifier, IP address, and MAC address, and announces the mobile device connection information to the network.
[0041] After receiving the message, the gateway router creates a record table of "Mobile Device ID - Mobile Device IP Address - Mobile Device MAC Address". Therefore, even if multiple mobile devices with the same IP address are connected to the same access point (AP), the gateway router can distinguish ARP entries based on the mobile device ID.
[0042] When a gateway router discovers a mobile device connection, it automatically creates a dedicated 32-bit mask route (such as IP1 / 32) based on the anycast service IP address and introduces the OSPF dynamic protocol, which is then advertised by OSPF. OSPF can handle the same 32-bit route advertised by multiple gateways.
[0043] For example, when mobile device A connects to an access point (AP), mobile device A collects its local IP address and ID, and sends a device information report message to the gateway. This message includes the mobile device's ID, IP address, and MAC address. Upon receiving the message, the gateway router parses the content of the message, automatically generates a 32-bit mask for the mobile device, and saves it to its local record table, as shown below:
[0044] Table 1
[0045]
[0046] The downlink interfaces in Table 1 are the interfaces from the gateway router to the mobile device. If the AP and the gateway router are separate devices, then it is the interface from the gateway router to the AP.
[0047] After the gateway router saves the data, it sends the four items of data in the table—target IP, target ID, target MAC, and downlink interface—to the routing table. This allows the IP and ID to uniquely identify a target MAC and downlink interface. Even if multiple robots with the same IP address are connected to the same AP, the gateway router can distinguish ARP entries based on the mobile robot ID.
[0048] Simultaneously, in this embodiment, the gateway router also announces the connection information of the mobile device to the network. This information can be announced via multicast, mainly including key information such as the mobile device ID and the gateway router ID. With this configuration, when a client sends a network video request message to this IP (IP1), the client sets the destination address to the gateway router's address and includes the mobile device's IP and ID in the IP options. Upon receiving this, the gateway router performs MAC address encapsulation based on the mobile device ID and IP, and then sends it to the corresponding mobile device.
[0049] Specifically, the gateway router announces the mobile device's connection information to the network via multicast. The message includes key information such as the mobile device's ID, IP address, and the gateway router's IP address and ID. Upon receiving this message, other devices within the network (including other gateway routers and remote video-on-demand clients) also establish routing information locally, mapping the mobile device's IP address to the gateway address it belongs to.
[0050] Step S3: When a client requests a video stream from a mobile device, the destination address of the request message is the gateway router address of the mobile device, and it also carries the mobile device's identification number and IP address. After receiving the request message, the gateway router of the mobile device finds the corresponding MAC address based on the mobile device's identification number and IP address, and sends it to the mobile device.
[0051] In this embodiment, when a client sends a network video request message to the mobile device's IP address (IP1), the client sets the target address to the mobile device's gateway router address and includes the mobile device's IP address and ID in the IP option. Upon receiving the message, the gateway router performs MAC address encapsulation based on the mobile device's ID and IP address, and then forwards the message to the corresponding mobile device. If two mobile devices with the same IP address appear under the same gateway interface, the gateway router matches the corresponding ARP entry based on the mobile device's ID, performs MAC address encapsulation, and sends the packet to the mobile device with that ID.
[0052] Specifically, when a client needs to request video or other data from mobile device A, the client directly fills in the destination address of the message as the address of the gateway router, and sets the IP header option value to a preset value between 32 and 255 (not 68, but for example, 158). This embodiment uses the capabilities of the IP header option section to transmit IP and ID, but the IP header option values 0-31 are defined. 68 cannot be used because it represents a timestamp option. Setting a value such as 158 allows the gateway, which needs to process the options, to identify which messages require ID and IP analysis. The ID and IP of mobile device A are then filled in starting from the third byte of the option. Upon receiving the message, the corresponding gateway device finds that the destination address is itself and further analyzes the content of the IP header option section. If the option value is 158, it further analyzes to obtain the IP address and ID of the corresponding mobile device. The gateway router modifies the destination address in the IP header of the received IP packet to the IP address of the mobile device and removes the options part of the IP header. Based on the IP and ID of the mobile device, it finds the corresponding MAC address of the mobile device in the local routing table, encapsulates the corresponding link layer packet, and sends it to the target mobile device.
[0053] Based on the above technical solution, when two mobile devices with the same IP address appear under the same gateway interface, the gateway router's local IP routing table can be used to distinguish and select routes based on ID.
[0054] Step S4: When a mobile device switches its connected wireless access point during movement, the second gateway router after the switch will announce the mobile device's connection information to the network. After receiving the announcement from the second gateway router, the first gateway router before the switch will confirm whether the mobile device has left. If it is confirmed that it has left, it will delete the record list corresponding to the mobile device and announce the cancellation of the mobile device's connection information to the network.
[0055] During this process, because mobile devices are frequently in motion, the gateways they connect to constantly change. When a mobile device joins a new gateway (by connecting to a wireless access point via Wi-Fi) and leaves an old gateway, the old gateway doesn't immediately know of the device's departure because Wi-Fi connections require a certain amount of time for ARP entries to age. To ensure communication with the mobile device isn't disrupted by changes in the access gateway, the network connection status of the mobile device needs to be updated promptly. The new gateway immediately multicasts announcing the mobile device's joining, while the old gateway, upon receiving the announcement, confirms the departure of the original mobile device via a ping message (TTL set to 1). Then, it immediately deletes the original mobile device's ARP entry and its dedicated 32-bit mask route, and withdraws the route announcement via OSPF. This ensures timely clearing of the old gateway's information during the connection process. As the mobile device continues to move, the same method (new gateway multicast announcement + old gateway active clearing) is repeated during each gateway switch. This ensures that the network is promptly notified when the mobile device switches gateways, guaranteeing uninterrupted communication with the mobile device.
[0056] When a mobile device switches its gateway while moving, the gateway needs to handle the following: Because the mobile device is in motion, the wireless access point (AP) and gateway it connects to are constantly changing. When the mobile device switches gateways due to its own movement, the original gateway (hereinafter referred to as the old gateway) cannot immediately detect its offline status (Wi-Fi connections need to wait for ARP table entries to age), which may lead to communication disruptions between the requesting party and the mobile device on the network. In this situation, the newly connected gateway (hereinafter referred to as the new gateway) and the old gateway need to coordinate and perform the following actions synchronously:
[0057] First, from the perspective of the new gateway, when a mobile device accesses the new gateway during its movement, the mobile device also reports device information to the new gateway. After receiving the report, the new gateway saves it in the "Downlink Device Information and Routing Record Table" (see Table 1 for the format, but the content of the new gateway is shown), and sends it to the routing table and creates new ARP entries, etc., generates a dedicated route with a 32-bit mask and introduces the OSPF dynamic protocol, and finally sends a new device joining announcement message to the devices in the network through a multicast group (such as 239.10.0.1).
[0058] Secondly, from the perspective of the old network, when the old gateway receives the multicast announcement message, it learns that the mobile device has joined the new gateway, but it cannot confirm whether the mobile device has actually left (because the original ARP entry has not yet aged out and the heartbeat has not yet timed out). Therefore, the old gateway needs to immediately send an ICMP ping request to the mobile device (pinging the co-cast IP on the old gateway: 10.200.0.100), setting TTL=1 to ensure that the ping message is within the old gateway. At the same time, the target mobile device ID is moved to the beginning of the ICMP data and ends with a special character (such as "#"). When the mobile device receives the ICMP message, it first verifies the ID number. If the ID number matches, it replies with an ICMP Reply message. The old gateway confirms whether the mobile device has left based on the response to the ping message: if a response is received, it means that the mobile device is still within the coverage area of the old gateway (it may be a false alarm or a network attack message). At this time, the route is not deleted, and the gateway waits for the next multicast message or heartbeat timeout before processing. If no response is received, the old gateway confirms that the mobile device has left, immediately clears the ARP entry of the mobile device, deletes the corresponding 32-bit mask dedicated route, and withdraws the route advertisement through OSPF.
[0059] Thus, by using the method of "new gateway multicast announcement + old gateway active clearing", when a mobile device switches gateway connections, the connection status of the mobile device in the network can be updated in a timely manner and the entire network can be notified to update.
[0060] Example 2: When a mobile device switches its connected wireless access point while moving, it may cause frame drops, stuttering, and pixelation in the video transmission, and retransmission requests sent to the gateway before the switch will not receive a response. To address these issues, this example further extends the previous example.
[0061] This embodiment of a reliable method for acquiring mineral videos using a mobile device further includes:
[0062] Gateway routers set up caches for data transmission from mobile devices;
[0063] The device information report message sent by the mobile device after connecting to the wireless access point also includes the IP address of the first gateway router before the switch;
[0064] After receiving the message, the gateway router connected to the wireless access point will also create a record list that includes the IP address of the first gateway router before the switch.
[0065] When a mobile device transmits data, the transmitted data is cached in the cache set in the gateway router;
[0066] When the second gateway router receives a retransmission request, if the data in the retransmission request is not cached locally or is incomplete, it sends a retransmission request to the first gateway router recorded in the record list.
[0067] After receiving the retransmission request, the first gateway router sends the requested data from its cache to the second gateway router.
[0068] In this embodiment, the device information report message sent after the mobile device connects to the wireless access point also includes the IP address of the first gateway router before the switch. After receiving the message, the gateway router connected to the wireless access point establishes a record list that also includes the IP address of the first gateway router before the switch, that is, the IP address of the first gateway router is also included in Table 1.
[0069] In this embodiment, the gateway router sets up a cache for high-bandwidth data packets such as video transmitted by mobile devices. For example, a cache for storing 3 seconds of time data can be set up. A possible cache size is: (set cache period + 1 second) * bitstream size / 8 * 120%. Assuming the cache period is 3 seconds and the bitstream is 4Mb / s, then (3+1)s * 4Mb / s * 8bit / byte * 120% is requested. Multiplying by 120% is to reserve some space for redundancy.
[0070] When mobile device A needs to send a video stream externally for business purposes, it first obtains the stream ID from the video stream and assembles it into a "video stream sending report message" to send to the gateway router. The message content includes: mobile device ID, mobile device IP, StreamID, and five-tuple information (source IP, source PORT, destination IP, destination PORT, protocol type, etc.). After receiving the message, the gateway router parses out the relevant information and saves it locally.
[0071] The gateway router begins listening for data stream information using the 5-tuple and mobile device ID information. Once a data stream matching the corresponding 5-tuple and mobile device ID is detected, it forwards the data stream normally while simultaneously copying it and transferring all data above the IP layer of the original packet to a designated cache. If the designated cache space is full, when a new packet arrives, it returns to the cache's memory starting address, deletes the oldest data, and then stores it, incrementing the overwrite count by 1 (each time the data is overwritten to the memory starting address, the overwrite count is incremented by 1, indicating that the data has already been overwritten locally).
[0072] When the gateway router writes the first frame of the video stream into the buffer, it obtains the timestamp in the frame as the start timestamp and records it in the table. During each rewrite, it deletes the oldest existing frame group in the data block (considered as deleting the frame data contained in 1 second each time, or usually an IP frame group), and updates the start timestamp of the next frame in the table. When each IP frame group (or video per second) is completed in the buffer, it updates the end timestamp.
[0073] If the video stream is interrupted for any reason (due to the movement of the mobile device or the cessation of the service flow), the gateway router starts a timed aging mechanism. After the aging time (which can usually be the same as the buffer time or can be set to a longer time, such as 3 seconds) is reached, the memory space corresponding to the address of the data block is released directly, and the aging flag of the video stream storage information record table is set to "Y".
[0074] In summary, the gateway router maintains the following record table for video data caching:
[0075] Table 2
[0076]
[0077] This embodiment considers the scenario where a mobile device switches wireless access points. The gateway router connected before the switch is referred to as the first gateway router, and the gateway router after the switch is referred to as the second gateway router. Before the switch, the video sent by mobile device A is continuously cached in the first gateway router. If mobile device A moves and switches to the second gateway router, mobile device A also sends a "video stream transmission report message," which is processed by the second gateway router in the same way.
[0078] Furthermore, if the video stream continues throughout the process of mobile device A switching from the first gateway router to the second gateway router, then when switching to the second gateway router, it is necessary to re-report a "video stream sending report message" to the second gateway router. The message content includes: device ID (ID-A), device IP (IP-A), StreamID, and five-tuple information (source IP, source PORT, destination IP, destination PORT, protocol type), etc. After receiving the message, the second gateway router parses out the relevant information and saves it locally. At the same time, the second gateway router also begins to cache the video stream.
[0079] The gateway router monitors the forwarded video stream in real time for retransmission requests. Once a retransmission request is detected, it is intercepted, and information such as the Stream-ID, 5-tuple information, and start and end times of the retransmission message are analyzed. The address information of the data block is then retrieved from Table 2. There are three possible handling scenarios:
[0080] In the first scenario, complete data information can be obtained locally.
[0081] If the second gateway router finds that the start and end times of the retransmission requested in the retransmission request message are within the range of the start and end timestamps in Table 2, it will read the data block address information in the table and further read the message data that needs to be retransmitted, and send it to the target address.
[0082] The second scenario is that the local data is missing or incomplete.
[0083] When the second gateway router finds that the retransmission start and end times required in the retransmission request message are incomplete or do not exist in Table 2, it further sends the retransmission request to the previous gateway (the first gateway router).
[0084] Preferably, considering that the number of rewrites is recorded in Table 2, when the second gateway router receives a retransmission request in this embodiment, it includes: if the data in the retransmission request is not cached locally or is incomplete, and the number of rewrites is 0, then a retransmission request is sent to the first gateway router recorded in the record list.
[0085] It should be noted that a rewrite count of 0 indicates that no rewrite has been performed locally, meaning that the device has just been connected and the data from the previous gateway has not yet aged out, so cached data can be read from the previous gateway and retransmitted.
[0086] The record list of the second gateway router also includes the IP address of the first gateway router before the switch. The second gateway router starts to organize packets and sends a packet retransmission request to the first gateway router. Its content includes: retransmission flag, local IP, stream ID (StreamID-1), start time (time1), end time (time2), proxy query flag (1, indicating that it is an intermediate gateway and proxy query), and the IP of the requesting source gateway.
[0087] After receiving the retransmission request message, the first gateway router looks up the local video stream storage information record table based on the bitstream ID. If it finds data that meets the requirements, it reads the corresponding data and sends it to the second gateway router in chronological order.
[0088] If the second gateway router receives a message indicating that data was not found, it directly replies to the video client with the message that the corresponding data was not found. If the second gateway router receives a valid message from the first gateway router, it modifies the message header, replacing the destination address with the address of the video stream receiver, replacing the source address with the address of the mobile device, while keeping the sequence number, timestamp, and other information unchanged, and then sends a retransmission message to the video client.
[0089] The third scenario: Because mobile devices are frequently in motion and connect to the network wirelessly, considering network stability and potential anomalies, mobile devices may disappear from the network. This means that for a certain period, the mobile device may have left the old gateway but not yet joined the new gateway. In this case, because the old gateway's ARP aging process takes time, the requesting party must wait indefinitely. Therefore, when the mobile device "disappears" from the network, since the old gateway's ARP entries are still valid, it can still receive messages from the requesting party, but it can no longer forward the messages to the mobile device. Thus, the old gateway needs to immediately send a notification to the requesting party, instructing it to re-initiate the request after a random period of time, without waiting for a response from the mobile device.
[0090] Example 3: Based on the above scheme, add gateway key caching capability based on intelligent identification of mobile devices.
[0091] The reliable mineral video acquisition method for the mobile device further includes:
[0092] When a mobile device identifies the transmitted data as important, it marks the transmitted data as important.
[0093] After identifying important markers, the gateway router sets up a second cache for the transmitted data, in addition to the original cache.
[0094] Since mobile devices are inherently mobile devices or smart devices like AR glasses, they possess the ability to mark the importance of video frames. When the front end identifies a target or important scene, it marks the importance of the frame in the video stream. Taking RTP streams as an example, when important information is detected, the importance of the frame can be marked by setting the M bit in the RTP header or by adding an RTP extension header. The two methods are: 1) setting the 8th bit in the standard RTP header to mark the frame as important; 2) setting the X bit to indicate that the RTP has an extension header, and adding the extension header after the standard RTP header. The extension header can mark more parameters and priority levels.
[0095] After the gateway router receives the corresponding video stream, if it reads that the M bit has been set, it will apply for a larger space (for example, the storage space corresponding to 10 seconds is used as a unit; if the space of one unit is used up, a new unit space will be applied for again) in addition to the original cache space to cache the key video, and the storage-related data will also be saved to the video stream storage information record table.
[0096] When a retransmission request arrives, this table is also consulted to retransmit the data. At the same time, important data is given a longer aging period, such as 300 seconds or other aging times. The system continuously queries the video stream storage information record table. When the end timestamp of a cached data is older than the aging time, the data block address is released and the aging flag is set to "Y".
[0097] Example 4: This example also proposes a reliable mineral video acquisition system for mobile devices. The reliable mineral video acquisition system for mobile devices includes a mobile device, a client, and a gateway router. The mobile device, client, and gateway router are configured to execute the steps of the methods described in Examples 1-3 above.
[0098] This application proposes a reliable method and system for acquiring mineral video from mobile devices. By leveraging collaborative caching and communication between gateways, the source of retransmissions is expanded from a single gateway to the entire gateway group. This ensures that even after a gateway switch, the mobile device can still respond to retransmission requests for historical data, significantly reducing the frame drop rate of the video stream. It effectively avoids video stuttering, screen tearing, and pixelation caused by data packet loss, providing a stable, continuous, and high-quality video source for backend monitoring personnel or AI analysis algorithms, thus improving video quality and user experience. Furthermore, it can cover the most unstable and brief periods of disconnection during mobile network switching, further enhancing the overall reliability of the system.
[0099] Furthermore, this application is mainly implemented at the application layer and gateway level, without requiring large-scale modifications to the underlying TCP / IP or UDP protocol stack, resulting in low deployment costs and ease of implementation and promotion.
[0100] On another front, this application employs gateway caching, rather than mobile device caching, for retransmission. When packet loss occurs, it may be due to network issues on the mobile device, leading to a high probability of retransmission failure. When the mobile device's signal is weak, retransmitted data increases the channel load, potentially causing the loss of new real-time data. When multiple terminals have caching requests, gateway-side caching handles them better. Relying entirely on mobile device-side retransmission places greater pressure on both the mobile device and its bandwidth. Gateway caching has a simpler link, responds more promptly, and can analyze device network conditions in real time based on retransmission requests, facilitating better optimization suggestions.
[0101] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A reliable method for acquiring mineral video from a mobile device, characterized in that, The mobile device accesses the network via a wireless access point, which is connected to a gateway router. The reliable method for acquiring mineral video data from the mobile device includes: Configure the same anycast service IP address for each mobile device. After the mobile device connects to the wireless access point, it sends a device information report message, reporting its own identification number and IP address. After receiving the message, the gateway router connected to the wireless access point creates a record list including the mobile device's identifier, IP address, and MAC address, and announces the mobile device's connection information to the network. When a client requests a video stream from a mobile device, the destination address of the request message is the gateway router address of the mobile device, and it also carries the mobile device's identification number and IP address. After receiving the request message, the gateway router of the mobile device finds the corresponding MAC address based on the mobile device's identification number and IP address, and then sends it to the mobile device. When a mobile device switches its connected wireless access point while moving, the second gateway router after the switch will announce the mobile device's connection information to the network. After receiving the announcement from the second gateway router, the first gateway router before the switch will confirm whether the mobile device has left. If it is confirmed that it has left, it will delete the record list corresponding to the mobile device and announce the cancellation of the mobile device's connection information to the network.
2. The reliable mineral video acquisition method for mobile devices according to claim 1, characterized in that, The reliable mineral video acquisition method for the mobile device further includes: Gateway routers set up caches for data transmission from mobile devices; The device information report message sent by the mobile device after connecting to the wireless access point also includes the IP address of the first gateway router before the switch; After receiving the message, the second gateway router connected to the wireless access point also creates a record list that includes the IP address of the first gateway router before the switch. When a mobile device transmits data, the transmitted data is cached in the cache set in the gateway router; When the second gateway router receives a retransmission request, if the data in the retransmission request is not cached locally or is incomplete, it sends a retransmission request to the first gateway router recorded in the record list. After receiving the retransmission request, the first gateway router sends the requested data from its cache to the second gateway router.
3. The reliable mineral video acquisition method for mobile devices according to claim 1, characterized in that, The IP header option values of the request message are set to preset values.
4. The reliable mineral video acquisition method for mobile devices according to claim 2, characterized in that, When caching transmitted data in the cache set in the gateway router, if the cache space is full, when a new message arrives, the system returns to the starting address of the cache memory, deletes the oldest data, and then stores it, and increments the record overwrite count by 1.
5. The reliable mineral video acquisition method for mobile devices according to claim 4, characterized in that, When the second gateway router receives a retransmission request, it includes: If the data requested for retransmission is not cached locally or is incomplete, and the number of rewrites is 0, then a retransmission request is sent to the first gateway router recorded in the record list.
6. The reliable mineral video acquisition method for mobile devices according to claim 2, characterized in that, The reliable mineral video acquisition method for the mobile device further includes: When a mobile device identifies the transmitted data as important, it marks the transmitted data as important. After identifying important markers, the gateway router sets up a second cache for the transmitted data, in addition to the original cache.
7. The reliable mineral video acquisition method for mobile devices according to claim 1, characterized in that, The confirmation of whether the mobile device has left includes: The first gateway router sends an ICMP ping request to the mobile device, carrying the mobile device's identification code; After receiving an ICMP ping request, the mobile device verifies the identifier code. If it matches, it replies with an ICMP Reply message. If the first gateway router does not receive an ICMP Reply message, it confirms that the mobile device has left.
8. A reliable video acquisition system for minerals on a mobile device, characterized in that, The reliable mineral video acquisition system for the mobile device includes a mobile device, a client, and a gateway router. The mobile device, client, and gateway router are configured to perform the steps of the method described in claims 1 to 7.