A method and system for controlling radar multi-type file upload

CN122824733APending Publication Date: 2026-09-25ZHUHAI GUANGHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611130401.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0005]针对上述现有技术的缺陷,本发明提供一种控制雷达多类型文件上传的方法及系统,旨在解决现有技术中雷达数据上传方案因缺乏多类型文件分级管理、动态流量控制及智能队列切换机制,而无法在弱网环境下同时兼顾核心数据实时性、全量数据完整性、网络资源高效利用和传输稳定性的技术问题

Benefits of technology

[0015]基于上述,夜间时段的有益效果为在当日22:00至次日6:00这一网络质量通常较好、通信信道相对空闲的时间窗口内,将总上传带宽上限调高至当前网络最大可用带宽的90%,充分利用了该时段带宽资源充裕且竞争较小的特点,实现了对低优先级大容量原始数据的高效批量回传,显著提高了全天候网络资源的整体利用效率;白天时段的有益效果为在当日6:00至22:00这一网络通常负载较高、带宽波动较频繁的时间窗口内,将总上传带宽上限降低至当前网络最大可用带宽的50%,主动为网络突发拥塞和正常波动预留了充裕的缓冲空间,有效降低了因过度占用带宽而引发的高丢包率和高重传率,保障了高优先级核心数据在该时段内的稳定、连续上传。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122824733A_ABST
    Figure CN122824733A_ABST
Patent Text Reader

Abstract

The application provides a kind of method and system for controlling radar multi-type file upload, method includes: starting upload service and parsing local configuration file;Start historical data file upload service scanning and performing integrity check on storage file;Start folder real-time monitoring service to listen to the write completion event of new generated file;The radar file to be uploaded is stored in the corresponding priority queue according to priority, new file is automatically classified to the corresponding queue, and the same queue is sorted in ascending order according to creation time;Start hierarchical upload queue scheduler, its scheduling logic includes breakpoint resume transmission check, priority scheduling, adaptive flow control and automatic queue switching;Continuously execute monitoring and cyclically execute upload process until each queue is empty and radar stops working.The application realizes the ordered, stable and complete upload of radar multi-type files in weak network environment through hierarchical queue management, adaptive flow control and automatic queue switching.The application relates to the technical field of radar data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of radar data transmission technology, and in particular to a method and system for controlling the uploading of multiple types of radar files. Background Technology

[0002] With the widespread application of laser wind-measuring radar in wind farm scheduling, meteorological disaster early warning, and wind field monitoring in complex terrain, efficient transmission of radar monitoring data has become a crucial link in ensuring the normal operation of these services. Currently, wind-measuring radars are typically deployed in remote areas such as mountainous regions, deserts, and offshore platforms, primarily relying on 4G mobile communication networks for data transmission. Limited by base station coverage and channel quality, unstable network signals and large bandwidth fluctuations are common constraints. Existing radar data upload solutions mostly employ simple, single-type file transfer mechanisms, such as supporting only the upload of ten-minute average statistical data. They lack unified upload control capabilities for large-volume raw monitoring data such as radial data, wind spectrum data, and second-level real-time data, and a systematic solution encompassing hierarchical management of multiple file types, transmission priority control, and network adaptive scheduling has not yet been developed.

[0003] Due to a lack of ability to differentiate the importance of data services and dynamically perceive network conditions, existing technologies face several difficult-to-balance technical dilemmas in actual operation. If all bandwidth is used to ensure the real-time uploading of core statistical data, massive amounts of raw data will accumulate for a long time or even be permanently lost due to insufficient storage space, resulting in a lack of basic data support for backend in-depth wind field characteristic analysis. If all data is uploaded completely, core data will suffer severe transmission delays due to the large-scale squeezing of bandwidth resources, failing to meet the timeliness requirements of real-time scheduling and disaster early warning. At the same time, adopting a fixed full-bandwidth upload strategy around the clock will cause extremely high packet loss and retransmission rates during daytime network congestion, which will reduce the overall transmission efficiency. On the other hand, setting a conservative fixed low bandwidth threshold will result in a large amount of idle bandwidth resources during nighttime network off-peak hours. In addition, traditional multi-priority schemes generally adopt "absolute preemption" scheduling. Once high-priority tasks continue to be generated, low-priority tasks will never get a transmission opportunity, forming a "starvation effect" and causing low-priority raw data to be missing for a long time. The aforementioned contradictions lack effective means of reconciliation under the existing single-type upload framework, making it difficult for the radar data upload system to meet the actual engineering requirements in terms of adaptability, stability, and resource utilization.

[0004] Therefore, the inventors urgently need a method and system for controlling the uploading of multiple types of radar files, which can perform hierarchical queue management of data files of different business importance, dynamically adjust the upload traffic according to the real-time network quality, and realize intelligent switching between priority queues, so as to balance the real-time performance of core data, the integrity of all data and the efficient use of network resources in weak network environments, and fundamentally solve the multi-target conflict problem existing in the prior art. Summary of the Invention

[0005] To address the shortcomings of the existing technologies, this invention provides a method and system for controlling the uploading of multiple types of radar files. The aim is to solve the technical problem that existing radar data uploading schemes lack hierarchical management of multiple file types, dynamic flow control, and intelligent queue switching mechanisms, thus failing to simultaneously ensure the real-time performance of core data, the integrity of all data, efficient utilization of network resources, and transmission stability in weak network environments.

[0006] To achieve the above objectives, the technical solution adopted by this invention is: a method for controlling the uploading of multiple types of files by a radar, comprising the following steps: S1: Start the radar data upload service program and complete system initialization; S2: Read and parse the local configuration file to obtain the storage directory, upload priority, and upload server address of the radar file to be uploaded; S3: Start the historical data file upload service according to the storage directory, scan the existing files in the storage directory that are already stored in the radar file to be uploaded, and perform file integrity verification; S4: Start the folder real-time monitoring service and listen for the write completion event of the newly generated monitoring data file in the radar file to be uploaded; S5: Store each radar file to be uploaded into a corresponding priority queue according to the upload priority. The priority queue includes a high priority queue and a low priority queue. Automatically classify the newly generated monitoring data file into the corresponding priority queue according to the upload priority. S6: Within the same priority queue, sort the radar files to be uploaded in ascending order according to their creation time. S7: Start the hierarchical upload queue scheduler to execute the upload task. The scheduling logic of the hierarchical upload queue scheduler includes breakpoint resume verification, priority scheduling, adaptive flow control and automatic queue switching. The priority scheduling prioritizes the execution of upload tasks in the high-priority queue. The adaptive flow control dynamically adjusts the total upload bandwidth limit according to the current network status and executes the upload task under the constraint of the total upload bandwidth limit. After the radar file to be uploaded is completed, the radar file to be uploaded is removed from the corresponding priority queue. S8: Continue to perform the monitoring in step S4, and repeat steps S5 to S7 until all priority queues are empty and the radar has stopped working.

[0007] Based on the above, the beneficial effect of a method for controlling the uploading of multiple types of radar files is that it solves the technical problem in existing radar data uploading schemes that lack hierarchical management of multiple file types, dynamic flow control, and intelligent queue switching mechanisms, thus failing to simultaneously ensure the real-time performance of core data, the integrity of all data, efficient utilization of network resources, and transmission stability in weak network environments; this is mainly reflected in: 1. This invention achieves multi-level classification management of data of different business importance and orderly arrangement within the same queue by storing each radar file to be uploaded into a corresponding high-priority queue and a low-priority queue according to its upload priority, automatically classifying newly generated monitoring data files into the corresponding priority queue according to the upload priority, and sorting each radar file to be uploaded in ascending order according to its creation time within the same priority queue. This enables priority scheduling of network resources for core data, ensures real-time uploading of core statistical data in weak network environments, and establishes a management foundation for orderly waiting and subsequent transmission of low-priority raw data. 2. This invention uses adaptive flow control to dynamically adjust the total upload bandwidth limit based on the current network status and execute upload tasks under this limit constraint. When network quality deteriorates, the available bandwidth of low-priority queues is compressed to ensure the bandwidth of high-priority queues. When network quality recovers, the bandwidth of high-priority queues is restored first. This achieves dynamic matching between upload traffic and real-time network quality, avoiding the dual drawbacks of fixed bandwidth strategies, such as high packet loss and high retransmission during network congestion and bandwidth idleness during network downtime. This improves transmission stability while fully enhancing the utilization efficiency of network resources. 3. The present invention achieves orderly flow and conditional preemption between priority queues through the automatic queue switching described in step S7. When there are no tasks in the high priority queue, the upload is switched to the low priority queue. When a new high priority file is added during the transmission of a low priority file, the upload waits until the current low priority file is completed before switching back to the high priority queue. This avoids the starvation effect caused by the continuous generation of high priority tasks, which prevents low priority data from having a long time to obtain a transmission opportunity. It also ensures that new high priority tasks can be executed in a timely manner after the current low priority file is completed. 4. This invention, through the coordinated linkage of the aforementioned hierarchical queue management, adaptive flow control, and automatic queue switching, dynamically senses the network status and adjusts the total bandwidth limit and queue scheduling weight accordingly. It prioritizes ensuring that high-priority core data obtains stable bandwidth resources, while utilizing the idle time of high-priority queues to transmit low-priority raw data in an orderly manner. Furthermore, within each queue, data is uploaded sequentially according to the file creation time. Thus, even in a weak network environment, this invention simultaneously achieves priority real-time uploading of core business data, complete and orderly backhaul of all types of data, efficient allocation of network bandwidth resources in the time and priority dimensions, and stable and controllable transmission process. It comprehensively solves the technical problem in existing technologies that cannot simultaneously achieve the above multiple objectives.

[0008] Furthermore, in step S2, the local configuration file is a JSON format configuration file, and the local configuration file also stores data types and file naming rules.

[0009] Based on the above, the benefits of local configuration files include: centrally storing various core upload parameters in a single configuration file, providing a unified source of parameters for subsequent historical file scanning, real-time folder monitoring, file priority classification, and upload task scheduling; and enabling one-time acquisition and global sharing of configuration information required by each functional module during system initialization. The benefits of JSON format configuration files include: organizing various upload parameters using a lightweight structured data exchange format; this format has good hierarchical clarity and cross-platform parsability, allowing the system to easily add, delete, or adjust various configuration parameters during radar deployment or remote maintenance, achieving flexible adaptation to different radar sites, data directories, and upload strategies without recompiling or modifying program code; and the benefits of data type... To identify the business data category of each radar file to be uploaded, the system can accurately determine whether a file should be placed in a high-priority queue or a low-priority queue when scanning existing files or detecting the generation of a new file. This also provides a category basis for adjusting the time slice length of files within the same queue, achieving precise classification management and differentiated scheduling of files with different business attributes. The beneficial effect of the file naming rules is that they define the naming structure of various types of radar monitoring data files, enabling the system to accurately identify and match the corresponding type of file to be uploaded in the storage directory according to the rules. At the same time, when determining the completion of the upload, the naming rules can identify the generation status of the next stage of new files of the same type, providing a reliable identification basis for accurate determination of file transmission progress and time-series management of files within the queue.

[0010] Furthermore, the real-time folder monitoring service described in step S4 is implemented based on the inotify mechanism of the Linux system or the FileSystemWatcher mechanism of the Windows system.

[0011] Based on the above, the beneficial effects of the folder real-time monitoring service are: continuous monitoring of the radar data file storage directory; capturing the event immediately after the radar generates a new monitoring data file and completes local writing; providing a real-time trigger signal for the automatic classification and queue addition of subsequent new files; and realizing the system's transformation from passively scanning existing files to actively sensing new files, avoiding the resource consumption and response delay caused by periodic scanning. The beneficial effects of the Linux system's inotify mechanism are: providing kernel event-based file system monitoring capabilities in the Linux operating system environment; by registering specific events such as file creation, writing, and closing; and returning the file path and event type to the monitoring service the instant a new radar data file is generated and written to disk, achieving low-latency, low-overhead real-time capture of newly added data files on the commonly used Linux industrial control computer platform for field wind measurement radar. The beneficial effects of the Windows system's FileSystemWatcher mechanism are: providing system-level file change notification-based directory monitoring capabilities in the Windows operating system environment; by monitoring file generation and change operations in a specified directory; and triggering the corresponding response event the moment a new data file is written, achieving real-time and reliable sensing of newly added radar monitoring data in Windows platform deployment scenarios.

[0012] Furthermore, the breakpoint resume verification in step S7 specifically involves: sending a query request to the upload server address to obtain the historical uploaded byte count of the radar file to be uploaded on the server; comparing the historical uploaded byte count with the local complete file byte count of the radar file to be uploaded; if the two are consistent, it is determined that the radar file to be uploaded has been completely uploaded and the radar file to be uploaded is skipped; if they are inconsistent, the breakpoint resume is started from the position corresponding to the historical uploaded byte count.

[0013] Based on the above, the beneficial effects of breakpoint resume verification are: proactively initiating a progress query for the file to be uploaded to the server before the upload task starts, and comparing the amount of data received by the server with the local complete file data, thus achieving accurate prediction of the upload status of each file, effectively avoiding bandwidth waste and time loss caused by the same file being uploaded repeatedly due to system restarts, network interruptions, or repeated scheduling; the beneficial effect of the query request is that by sending an upload progress query command for a specific file to the upload server address, the length of bytes of that file already stored on the server is obtained, providing accurate remote status data for subsequent progress comparison decisions and determination of the resume start position, realizing effective communication and information synchronization between the system and the server regarding file transfer progress; the beneficial effect of the historical uploaded bytes count is that it records the amount of data that the radar file to be uploaded has been received and successfully stored on the server, and by using this value as a direct basis for determining the file transfer progress. The system can clearly distinguish whether a file has not yet been transmitted, has been partially transmitted, or has been completely transmitted, providing a reliable quantitative reference for accurately determining whether to skip a file or resume transmission. The beneficial effect of the local complete file byte count is that it provides the total amount of complete data of the radar file to be uploaded in the local storage device, serving as a standard benchmark for comparison with the historical uploaded byte count on the server. This allows the system to accurately calculate the remaining data to be transmitted for the current file and provides an objective and unique criterion for determining whether the file has reached a complete state. The beneficial effect of breakpoint resumption is that when it is determined that the file has not been completely uploaded, the remaining untransmitted data can be sent directly from the position corresponding to the historical uploaded byte count recorded on the server, without retransmitting the successfully uploaded data. This achieves seamless recovery at the point of incomplete transmission interruption, significantly reducing the repeated transmission of invalid data and improving the upload efficiency and data integrity assurance capabilities of large-capacity radar files in weak network environments.

[0014] Furthermore, the adaptive traffic control in step S7 specifically includes: adjusting the total upload bandwidth limit to 90% of the current maximum available network bandwidth during the nighttime period, which is from 22:00 on the current day to 6:00 on the next day; adjusting the total upload bandwidth limit to 50% of the current maximum available network bandwidth during the daytime period, which is from 6:00 on the current day to 22:00; the adaptive traffic control in step S7 also includes compressing the available bandwidth of the low-priority queue to ensure the bandwidth of the high-priority queue when the network quality deteriorates, and prioritizing the restoration of the available bandwidth of the high-priority queue when the network quality recovers.

[0015] Based on the above, the beneficial effects of nighttime are as follows: during the period from 22:00 on the same day to 6:00 on the next day, when network quality is usually better and communication channels are relatively idle, the total upload bandwidth limit is increased to 90% of the current maximum available network bandwidth. This fully utilizes the abundant bandwidth resources and low competition during this period, enabling efficient batch transmission of low-priority, large-capacity raw data and significantly improving the overall utilization efficiency of network resources around the clock. The beneficial effects of daytime are as follows: during the period from 6:00 to 22:00 on the same day, when network load is usually higher and bandwidth fluctuations are more frequent, the total upload bandwidth limit is reduced to 50% of the current maximum available network bandwidth. This proactively reserves ample buffer space for sudden network congestion and normal fluctuations, effectively reducing high packet loss and high retransmission rates caused by excessive bandwidth usage, and ensuring the stable and continuous upload of high-priority core data during this period.

[0016] Furthermore, the adaptive traffic control in step S7 also includes real-time monitoring of the network packet loss rate. When the detected network packet loss rate exceeds 5%, the total upload bandwidth limit is automatically reduced by 10%, and when the detected network packet loss rate is less than 1%, the total upload bandwidth limit is automatically increased by 5%.

[0017] Based on the above, the beneficial effects of real-time monitoring of network packet loss rate are to continuously perceive changes in the proportion of data packets lost during the current network transmission process at the radar site, providing real-time network quality feedback signals for the dynamic adjustment of the total upload bandwidth limit, and realizing timely and quantitative perception of network congestion and channel quality fluctuations. The beneficial effect of automatically reducing the total upload bandwidth limit by 10% when the network packet loss rate exceeds 5% is to proactively reduce the data transmission rate when the packet loss rate reaches the preset deterioration threshold, thereby alleviating network congestion by reducing the amount of data injected per unit time, reducing data retransmission and transmission timeouts caused by excessive bandwidth occupation, and realizing proactive intervention to stabilize the transmission process in the early stage of network quality degradation. The beneficial effect of automatically increasing the total upload bandwidth limit by 5% when the network packet loss rate is below 1% is to moderately increase bandwidth occupation when the packet loss rate drops to the preset good threshold, making full use of the current idle network transmission capacity to accelerate file transmission, while avoiding new congestion caused by sudden bandwidth increases by gradually increasing the bandwidth in small steps, thus achieving a safe and gradual improvement in overall upload efficiency under the premise that network conditions permit.

[0018] Furthermore, each radar file to be uploaded in the high-priority queue includes a ten-minute average data file and a device status data file, and each radar file to be uploaded in the low-priority queue includes a radial data file, a wind spectrum data file, and a second-level real-time data file; the automatic queue switching in step S7 includes: when there is no task in the high-priority queue, switching to the low-priority queue to perform the upload task, and switching back to the high-priority queue after the radar file to be uploaded in the current low-priority queue has been transmitted; when a new high-priority radar file to be uploaded is added during the transmission of the low-priority radar file to be uploaded, waiting for the radar file to be uploaded in the current low-priority queue to be transmitted before switching back to the high-priority queue.

[0019] Based on the above, the beneficial effects of the ten-minute average data file are that it incorporates the statistical average monitoring data generated by the radar every ten minutes into a high-priority queue. This type of file, as core business data relied upon for wind farm scheduling and weather warnings, obtains stable bandwidth resources thanks to the priority scheduling authority of the high-priority queue, enabling real-time and reliable transmission of core statistical results. The beneficial effects of the equipment status data file are that it incorporates status monitoring files reflecting the health status and operating conditions of radar equipment into a high-priority queue. This type of file plays a crucial role in remote operation and maintenance of radars in remote areas and rapid response to equipment failures. High-priority transmission ensures that equipment managers can obtain the latest equipment operating information in a timely manner, achieving high-quality transmission of equipment status monitoring data. The timely upload of radial data files, wind spectrum data files, and second-level real-time data files has the advantage of unifying these three types of large-capacity raw data files into a low-priority queue. Although the cumulative data volume of these three types of files can reach hundreds of megabytes per day, the timeliness requirements are relatively relaxed. By using the low-priority queue to perform upload tasks in an orderly manner during network idle periods using the remaining bandwidth, it not only avoids the bandwidth interference of the large-capacity raw data on the real-time transmission of core statistical data, but also solves the problem of long-term backlog or even permanent loss of this type of data in traditional solutions. This preserves the complete source of raw data for the backend in-depth wind field characteristic analysis and realizes the final complete aggregation of all types of monitoring data in the long-term operation process.

[0020] Furthermore, in step S7, the upload tasks of each radar file to be uploaded are executed alternately using a time-slice polling mechanism within the same priority queue. The time slice length corresponding to each radar file to be uploaded is dynamically adjusted according to the data type and the current network status.

[0021] Based on the above, the beneficial effect of the time-slice polling mechanism is that it allocates time slots for alternating upload tasks to each radar file to be uploaded within the same priority queue. Multiple files within the same priority queue take turns to obtain transmission opportunities according to time slices, avoiding the situation where a single large file monopolizes queue resources for a long time, causing other files of the same priority to be unable to start uploading in a long time. This achieves orderly round-robin scheduling among files within the same priority queue. The beneficial effect of the time slice length is that the time slice length of each queue is dynamically adjusted according to the data type and network status, enabling the system to flexibly allocate transmission resources for radar files with different business characteristics and real-time changing communication conditions. This achieves dynamic adaptation of the upload task scheduling strategy within the same priority queue to file characteristics and network environment.

[0022] Furthermore, the condition for determining the completion of the upload of the radar file to be uploaded in step S7 is: the uploaded size of the radar file to be uploaded is equal to the number of bytes of the local complete file of the radar file to be uploaded.

[0023] Based on the above, the beneficial effect of the upload completion judgment condition is that the equality between the uploaded size of the radar file to be uploaded and the number of bytes of the local complete file is used as the primary quantitative basis for judging whether the file transmission is complete. When a new file of the same type has been generated in the next stage, it is confirmed that the current file can be marked as complete. Among them, the uploaded size records the amount of data that the file has received and stored on the server at the current moment. By comparing this value with the number of bytes of the local complete file in real time, the remaining amount of data to be uploaded and the transmission completion progress of the current file can be accurately known. This judgment condition provides the system with a clear and directly verifiable upload completion judgment standard, so that the operation of removing the file from the queue and switching to the next file has objective triggering conditions, ensuring the precise control of the file status flow in the upload process and the accurate tracking of the transmission status of each file.

[0024] Furthermore, the present invention also provides a system for controlling the uploading of multiple types of files by a radar, including a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the method for controlling the uploading of multiple types of files by a radar.

[0025] To make the above-mentioned features of the present invention and the objectives to be achieved clearer, the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. Attached Figure Description

[0026] Figure 1 : This is a flowchart of the present invention. Detailed Implementation

[0027] join Figure 1 As shown, This invention discloses a method for controlling the uploading of multiple types of files by a radar, comprising the following steps: S1: Start the radar data upload service program and complete system initialization; S2: Read and parse the local configuration file to obtain the storage directory, upload priority, and upload server address of the radar file to be uploaded; S3: Start the historical data file upload service according to the storage directory, scan the existing files in the storage directory that are already stored in the radar file to be uploaded, and perform file integrity verification; S4: Start the folder real-time monitoring service and listen for the write completion event of the newly generated monitoring data file in the radar file to be uploaded; S5: Store each radar file to be uploaded into a corresponding priority queue according to the upload priority. The priority queue includes a high priority queue and a low priority queue. Automatically classify the newly generated monitoring data file into the corresponding priority queue according to the upload priority. S6: Within the same priority queue, sort the radar files to be uploaded in ascending order according to their creation time. S7: Start the hierarchical upload queue scheduler to execute the upload task. The scheduling logic of the hierarchical upload queue scheduler includes breakpoint resume verification, priority scheduling, adaptive flow control and automatic queue switching. The priority scheduling prioritizes the execution of upload tasks in the high-priority queue. The adaptive flow control dynamically adjusts the total upload bandwidth limit according to the current network status and executes the upload task under the constraint of the total upload bandwidth limit. After the radar file to be uploaded is completed, the radar file to be uploaded is removed from the corresponding priority queue. S8: Continue to perform the monitoring in step S4, and repeat steps S5 to S7 until all priority queues are empty and the radar has stopped working.

[0028] In step S2 of this embodiment, the local configuration file is a JSON format configuration file, and the local configuration file also stores data types and file naming rules.

[0029] In this embodiment, the JSON format configuration file uses a structured data exchange format to organize the storage directory, upload priority, upload server address, data type, and file naming rules, so that different radar sites and different data directories can be adapted by adjusting the local configuration file without recompiling or modifying the program code.

[0030] In this embodiment, the real-time folder monitoring service in step S4 is implemented based on the inotify mechanism of the Linux system or the FileSystemWatcher mechanism of the Windows system.

[0031] In this embodiment, the folder real-time monitoring service captures events and returns the file path immediately when a newly generated monitoring data file is generated and completed local writing, providing a real-time trigger signal for automatically classifying the newly generated monitoring data file into the corresponding priority queue.

[0032] In step S7 of this embodiment, the breakpoint resume verification specifically involves: sending a query request to the upload server address to obtain the historical uploaded byte count of the radar file to be uploaded on the server; comparing the historical uploaded byte count with the local complete file byte count of the radar file to be uploaded; if the two are consistent, it is determined that the radar file to be uploaded has been completely uploaded and the radar file to be uploaded is skipped; if they are inconsistent, the breakpoint resume is started from the position corresponding to the historical uploaded byte count.

[0033] In this embodiment, the query request is an HTTP HEAD request. By sending an upload progress query instruction for the radar file to be uploaded to the upload server address, the byte length information of the radar file to be uploaded stored on the server is obtained. The historical uploaded byte count is used as the basis for determining the transmission progress of the radar file to be uploaded. The local complete file byte count is a standard reference value compared with the historical uploaded byte count, and is used to calculate the remaining amount of data to be uploaded in the radar file to be uploaded.

[0034] In step S7 of this embodiment, the adaptive traffic control specifically includes: adjusting the total upload bandwidth limit to 90% of the current maximum available network bandwidth during the nighttime period, which is from 22:00 on the current day to 6:00 on the next day; and adjusting the total upload bandwidth limit to 50% of the current maximum available network bandwidth during the daytime period, which is from 6:00 on the current day to 22:00. The adaptive traffic control in step S7 also includes compressing the available bandwidth of the low-priority queue to ensure the bandwidth of the high-priority queue when the network quality deteriorates, and prioritizing the restoration of the available bandwidth of the high-priority queue when the network quality recovers.

[0035] In this embodiment, the nighttime period is a window of relatively good network quality and relatively idle communication channels. The upper limit of the total upload bandwidth is increased to utilize the bandwidth resources of the nighttime period to upload large-capacity radar files waiting to be uploaded in the low-priority queue. The daytime period is a window of high network load and frequent bandwidth fluctuations. The upper limit of the total upload bandwidth is reduced to reserve buffer space for sudden network congestion and fluctuations.

[0036] In step S7 of this embodiment, the adaptive traffic control further includes real-time monitoring of the network packet loss rate. When the monitored network packet loss rate exceeds 5%, the total upload bandwidth limit is automatically reduced by 10%. When the monitored network packet loss rate is less than 1%, the total upload bandwidth limit is automatically increased by 5%.

[0037] In this embodiment, real-time monitoring of network packet loss rate provides a real-time network quality feedback signal for the dynamic adjustment of the total upload bandwidth limit. When the network packet loss rate exceeds 5%, the total upload bandwidth limit is reduced to alleviate network congestion. When the network packet loss rate is below 1%, the total upload bandwidth limit is increased to improve upload efficiency.

[0038] In this embodiment, each radar file to be uploaded in the high-priority queue includes a ten-minute average data file and a device status data file, while each radar file to be uploaded in the low-priority queue includes a radial data file, a wind spectrum data file, and a second-level real-time data file.

[0039] In this embodiment, the ten-minute average data file is a radar statistical data file generated every ten minutes, with a single file size of less than 1MB. The device status data file is a status file reflecting the operating conditions of the radar device. The radial data file, wind spectrum data file, and second-level real-time data file are data files that are appended and written every second.

[0040] In step S7 of this embodiment, the upload tasks of each radar file to be uploaded are executed alternately in the same priority queue using a time-slice polling mechanism. The time slice length corresponding to each radar file to be uploaded is dynamically adjusted according to the data type and the current network status.

[0041] In this embodiment, the time-slice polling mechanism allocates time slices for alternating upload tasks to each radar file to be uploaded within the same priority queue, so as to avoid a single file monopolizing queue resources for a long time; the time slice length is dynamically adjusted according to the data type and the current network status.

[0042] In step S7 of this embodiment, the condition for determining the completion of the upload of the radar file to be uploaded is: the size of the radar file to be uploaded is equal to the number of bytes of the local complete file of the radar file to be uploaded.

[0043] In this embodiment, the upload completion determination further includes: when the uploaded size of the radar file to be uploaded is equal to the number of bytes of the local complete file, and a new data file of the same type for the next stage has been generated, the current file upload is determined to be complete, and the process automatically switches to the next file to perform the upload task; the uploaded size is the amount of data that the radar file to be uploaded has received and stored on the server side, and the remaining amount of data to be uploaded in the radar file to be uploaded is obtained by comparing the uploaded size with the number of bytes of the local complete file.

[0044] In this embodiment, the present invention also discloses a system for controlling the uploading of multiple types of files by a radar, including a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the method for controlling the uploading of multiple types of files by a radar.

[0045] In this embodiment, the system is deployed in the local industrial control computer of the radar site, and the processor executes the computer program stored in the memory in sequence, performing steps S1 to S8.

[0046] The above description is merely the optimal embodiment of the present invention and is not intended to limit the present invention. Any modifications or substitutions made by those skilled in the art without departing from the essence and scope of protection of the present invention should also be within the scope of protection of the present invention.

Claims

1. A method for controlling the uploading of multiple types of files by a radar, characterized in that, Includes the following steps: S1: Start the radar data upload service program and complete system initialization; S2: Read and parse the local configuration file to obtain the storage directory, upload priority, and upload server address of the radar file to be uploaded; S3: Start the historical data file upload service according to the storage directory, scan the existing files in the storage directory that are already stored in the radar file to be uploaded, and perform file integrity verification; S4: Start the folder real-time monitoring service and listen for the write completion event of the newly generated monitoring data file in the radar file to be uploaded; S5: Store each radar file to be uploaded into a corresponding priority queue according to the upload priority. The priority queue includes a high priority queue and a low priority queue. Automatically classify the newly generated monitoring data file into the corresponding priority queue according to the upload priority. S6: Within the same priority queue, sort the radar files to be uploaded in ascending order according to their creation time. S7: Start the hierarchical upload queue scheduler to execute the upload task. The scheduling logic of the hierarchical upload queue scheduler includes breakpoint resume verification, priority scheduling, adaptive flow control and automatic queue switching. The priority scheduling prioritizes the execution of upload tasks in the high-priority queue. The adaptive flow control dynamically adjusts the total upload bandwidth limit according to the current network status and executes upload tasks under the constraint of the total upload bandwidth limit. After the radar file to be uploaded is completed while the upload task is being executed, the radar file to be uploaded is removed from the corresponding priority queue. S8: Continue to perform the monitoring in step S4, and repeat steps S5 to S7 until all priority queues are empty and the radar has stopped working.

2. The method for controlling the uploading of multiple types of files by a radar according to claim 1, characterized in that, In step S2, the local configuration file is a JSON format configuration file, and the local configuration file also stores data types and file naming rules.

3. The method for controlling the uploading of multiple types of files by a radar according to claim 1, characterized in that, The real-time folder monitoring service described in step S4 is implemented based on the inotify mechanism of the Linux system or the FileSystemWatcher mechanism of the Windows system.

4. The method for controlling the uploading of multiple types of files by a radar according to claim 1, characterized in that, The breakpoint resume verification in step S7 specifically involves: sending a query request to the upload server address to obtain the historical uploaded byte count of the radar file to be uploaded on the server; comparing the historical uploaded byte count with the local complete file byte count of the radar file to be uploaded; if they match, it is determined that the radar file to be uploaded has been completely uploaded and the radar file to be uploaded is skipped; if they do not match, the breakpoint resume is started from the position corresponding to the historical uploaded byte count.

5. The method for controlling the uploading of multiple types of files by a radar according to claim 1, characterized in that, The adaptive traffic control in step S7 specifically includes: adjusting the total upload bandwidth limit to 90% of the current maximum available network bandwidth during the nighttime period, which is from 22:00 on the current day to 6:00 on the next day; and adjusting the total upload bandwidth limit to 50% of the current maximum available network bandwidth during the daytime period, which is from 6:00 on the current day to 22:

00. The adaptive traffic control in step S7 also includes compressing the available bandwidth of the low-priority queue to ensure the bandwidth of the high-priority queue when the network quality deteriorates, and prioritizing the restoration of the available bandwidth of the high-priority queue when the network quality recovers.

6. The method for controlling the uploading of multiple types of files by a radar according to claim 1, characterized in that, The adaptive traffic control in step S7 also includes real-time monitoring of network packet loss rate. When the detected network packet loss rate exceeds 5%, the total upload bandwidth limit is automatically reduced by 10%. When the detected network packet loss rate is less than 1%, the total upload bandwidth limit is automatically increased by 5%.

7. The method for controlling the uploading of multiple types of files by a radar according to claim 1, characterized in that, Each radar file to be uploaded in the high-priority queue includes a ten-minute average data file and a device status data file, while each radar file to be uploaded in the low-priority queue includes a radial data file, a wind spectrum data file, and a second-level real-time data file. The automatic queue switching in step S7 includes: when the high-priority queue has no tasks, switching to the low-priority queue to perform the upload task, and switching back to the high-priority queue after the radar file to be uploaded in the current low-priority queue has been transmitted. When a new high-priority radar file is added during the transmission of a low-priority radar file to be uploaded, the system waits for the transmission of the radar file in the current low-priority queue to be completed before switching back to the high-priority queue.

8. The method for controlling the uploading of multiple types of files by a radar according to claim 2, characterized in that, In step S7, the upload tasks of each radar file to be uploaded are executed alternately using a time-slice polling mechanism within the same priority queue. The time slice length corresponding to each radar file to be uploaded is dynamically adjusted according to the data type and the current network status.

9. The method for controlling the uploading of multiple types of files by a radar according to claim 1, characterized in that, The condition for determining the completion of the upload of the radar file to be uploaded in step S7 is: the size of the radar file to be uploaded is equal to the number of bytes of the local complete file of the radar file to be uploaded.

10. A system for controlling the uploading of multiple types of files by radar, comprising a memory and a processor, characterized in that, When the processor executes the computer program stored in the memory, it implements the method as described in any one of claims 1-9.