High-frequency acquisition method and system suitable for intelligent terminal
By performing the acquisition task according to priority and performing data integrity checks on the smart terminal, the problem of low-priority acquisition tasks cannot be executed or incompletely performed under power line carrier communication interference is solved, and the success rate and integrity of data acquisition are achieved.
Patent Information
- Application Number
- CN202510257556.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-05-13
AI Technical Summary
When there is interference in power line carrier communication, the low-priority 15min acquisition task may not be performed or incompletely, resulting in the impact of the success rate and integrity of data acquisition.
By implementing the high-frequency acquisition method on the smart terminal, each acquisition task is executed according to the set priority, and data integrity is checked after the task is completed. If the data is incomplete, start the reprint task to use the spare time to reprint, and abort other collection tasks after the reprint task is started to perform the reprint task.
When communication interference exists, the success rate and integrity of data acquisition are ensured, the needs of traditional and emerging business data acquisition are met, and the problem of low-priority tasks being unable to be executed or incompletely performed due to interference is avoided.
Smart Images

Figure CN119996871A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a high-frequency acquisition method and system suitable for an intelligent terminal, belonging to the technical field of automation instruments. Background Art
[0002] With the rapid construction and development of power systems and the widespread application of HPLC high-speed modules, in response to different operating environments, such as the increase in emerging energy areas such as photovoltaics, energy storage, and charging piles, the curve data cycle collected by the electric energy meter has been increased to a collection frequency of 1min / 5min on the basis of the traditional 15min collection cycle. According to the priority of the task defined inside the smart terminal, the smaller the collection frequency interval, the higher the priority. Therefore, the priority of the 1min / 5min collection task is higher than that of the 15min collection task.
[0003] However, in actual field operation, power line carrier communication is usually interfered. If the interval between data transmission and reception is too long, the execution of low-priority tasks will be affected. For example, if the power line carrier communication is normal, the execution of the 1-minute curve collection task takes 10 seconds, the execution of the 5-minute curve collection task takes 2 minutes, and the execution of the 15-minute curve collection task takes 5 minutes. In this way, each collection task can be completed in the corresponding cycle; when there is interference in the power line carrier communication, each minute curve collection task will be extended to a certain extent, because the priority of the 1-minute and 5-minute curve collection tasks is higher than that of the 15-minute curve collection task. Under the premise of ensuring the high-priority task, this will cause the low-priority 15-minute collection task to fail to execute or be completed. Summary of the invention
[0004] The purpose of the present invention is to provide a high-frequency acquisition method and system suitable for intelligent terminals, so as to solve the problem in the prior art that when a high-priority task is completed, a low-priority task cannot be executed or cannot be completed due to the influence of an interference signal.
[0005] To achieve the above object, the solution of the present invention includes: The present invention provides a high-frequency acquisition method applicable to a smart terminal, the method comprising the following steps: If the collection task includes at least two minute curve collection tasks with different collection frequencies, each minute curve collection task is executed according to the set priority. When each minute curve collection task completes data collection within the corresponding collection cycle, it is determined whether the data collected by each minute curve collection task in the previous collection cycle is complete. If the collected data is incomplete, the supplementary copying task of the corresponding minute curve collection task is started. After the supplementary copying task is started, if there is a minute curve collection task, the supplementary copying task is terminated and the minute curve collection task is executed.
[0006] Furthermore, when there are more than one supplementary copying tasks corresponding to the task of collecting minute curves, each supplementary copying task is executed according to the priority set for each task of collecting minute curves.
[0007] Furthermore, the priority of each task of collecting minute curves is determined according to its corresponding collection frequency. The higher the collection frequency, the higher the priority of the corresponding task of collecting minute curves.
[0008] Furthermore, if the collection task is not a task for collecting minute curves, the task is loaded normally into the task variable.
[0009] Furthermore, if a higher priority minute curve collection task comes in during the execution of a lower priority minute curve collection task, the lower priority minute curve collection task is paused to execute the higher priority minute curve collection task, and the lower priority minute curve collection task is continued to be executed after the higher priority minute curve collection task is completed.
[0010] The present invention also provides a high-frequency acquisition system applicable to a smart terminal, comprising a processor, wherein the processor is used to execute a computer program to implement the steps of any one of the above high-frequency acquisition methods applicable to a smart terminal.
[0011] The beneficial effects of the present invention are as follows: as an improved invention, when the collection task includes at least two collection minute curve tasks with different collection frequencies, the method executes each collection task according to the set priority; when each collection task is completed normally and there is spare time, it is checked whether the data collected by the previous collection minute curve task is complete; if the data is incomplete, a supplementary copying task corresponding to the failed copying task is added and started, and the failed copying task is supplemented in the spare time; after the supplementary copying task is started, if there is a collection minute curve task, the supplementary copying task is terminated and the collection minute curve task is executed; under the premise of not affecting the normal collection task, the success rate and integrity of data collection are guaranteed, which not only meets the requirements of traditional collection, but also meets the needs of emerging business data collection, and solves the problem that when the high priority task is completed, the low priority task cannot be executed or cannot be completed due to the influence of interference signals. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a task reconstruction flowchart; Figure 2 It is a flow chart of the collection task execution. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail in a clear and complete manner in conjunction with the accompanying drawings and embodiments.
[0014] The idea of the present invention is that, if the collection task includes different minute curve collection tasks, each collection task is executed according to the set priority. When each minute curve collection task is completed normally and there is free time, it is checked whether the data collected by the previous minute curve collection task is complete. If the data is incomplete, a supplementary copying task corresponding to the failed copying task is added and started, and the task with incomplete data collection is supplemented. After the supplementary copying task is started, if there is a minute curve collection task, the supplementary copying task is terminated and the minute curve collection task is executed.
[0015] Method Example: The intelligent terminal collection tasks include parameter-triggered tasks, real-time tasks issued by the master station, and periodic collection tasks configured by the master station. This method embodiment is proposed based on the periodic collection tasks configured by the master station, such as Figure 1As shown in the task reconstruction flowchart, after the task parameters are changed, if the collection task includes at least two collection minute curve tasks with different collection frequencies (for example, the present embodiment is aimed at the collection task of the smart meter, and its collection minute curve task includes 1min collection task, 5min collection task and 15min collection task), each minute collection task is executed according to the set priority (for example, the priority of the 1min collection task is higher than the priority of the 5min collection task, and the priority of the 5min collection task is higher than the priority of the 15min collection task); in the case of a good collection environment, if each collection minute curve completes data collection within the corresponding collection cycle and there is free time after the lowest priority task is executed, it is determined whether the data collected by each collection task in the previous collection cycle is complete. If not, the corresponding collection task supplementary copy task is constructed and started; otherwise, the task is loaded normally into the task variable. For example, it takes 10 seconds to complete a 1min collection task, 2 minutes to complete a 5min collection task, and 5 minutes to complete a 15min collection task. There will be 50 seconds of free time after the 1min collection task in the current cycle is completed, and there will be 250 seconds of free time every 5 minutes. The 250 seconds of free time is enough for the normal completion of the 5min task, and there will be 130 seconds of free time every 5 minutes, so there will be 390 seconds of free time every 15 minutes, which is enough for the normal completion of the 15min task, and there will be 90 seconds of free time every 15 minutes. At this time, it can be determined whether there is incomplete collection data in the previous collection cycle that needs to be supplemented. The current 15min collection task is not fully collected due to interference in the power line carrier communication, so a supplementary copy task of the previous 15min collection task will be generated, and the supplementary copy task will be completed using the remaining 90 seconds of free time. If the collection data of the previous collection cycle are complete, there is no need to construct a new supplementary copy task. It should be noted that if there are two 15-minute collection tasks at different times, the make-up task is executed according to the priority of the two collection tasks at different times. For example, if the priority of the later 15 minutes is high, the priority of the make-up task is also high.
[0016] Therefore, the present invention can ensure the success rate and integrity of data collection when communication interference occurs, and meet the requirements of long-period collection tasks (such as traditional 15-minute collection). The intelligent terminal uses the idle time after the task ends to check the periodic tasks that have been executed. If there are collection tasks that fail to read, such as 15-minute collection tasks, a corresponding supplementary reading task is generated.
[0017] When there are multiple supplementary copying tasks, they need to be sorted according to the task priority set by the master station, that is, the priority of the supplementary copying task is consistent with the priority of the original task. As shown in Table 1, if the curve task IDs of the current periodic collection task are 1 to 3, which are 1min collection task, 5min collection task and 15min collection task, and the task priorities are 1 to 3, then the supplementary copying tasks generated by the internal integration of the intelligent terminal correspond to 1 to 3, and the priority of the supplementary copying task is consistent with the priority of the original task, which is also 1 to 3. If the curve task ID is 1, which corresponds to the 1min collection task, the task priority corresponds to 1, which represents a high priority task, and the corresponding supplementary copying task is 1, and the priority of the supplementary copying task is consistent with the priority of the original task, which is also 1.
[0018] Table 1 Curve task ID Curve Task Priority Make-up copy task Priority of copying tasks 1 1 1 1 2 2 2 2 3 3 3 3 ... ... ... The basic principle of the execution of the supplementary copy task is to execute the normal collection task first. If there is free time after the normal collection task is completed, the supplementary copy task will be executed. The supplementary copy task will be executed according to the corresponding original task cycle. If there are multiple supplementary copy tasks corresponding to different collection tasks, the priority of these multiple supplementary copy tasks is consistent with the priority of the original task. The supplementary copy cycle is configurable, and the cycle of supplementary copy data is greater than the collection cycle. Each collection minute curve task is executed according to the priority, and the high priority task is executed first. After the high priority task is executed, the lower priority task is executed. If a higher priority collection minute curve task comes in during the execution of the lower priority collection minute curve task, the lower priority collection minute curve task will be suspended to execute the higher priority collection minute curve task, and the lower priority collection minute curve task will continue to be executed after the higher priority collection minute curve task is completed. If the current time is 10:15, the 1-minute collection task will be executed first. After the 1-minute collection task is completed, the 5-minute collection task will be executed. If the 5-minute collection task has not been completed by 10:16, the 5-minute collection task will be terminated and a new 1-minute collection task will be executed. After the 1-minute collection task is completed, the unfinished 5-minute collection task will continue to be executed.
[0019] Specifically, the collection task execution flow chart is as follows: Figure 2As shown, check whether all tasks including the copying task need to be started. If the copying task needs to be started, insert the copying task into the task queue, and then traverse the tasks in the task list and find the optimal task; otherwise, directly traverse the tasks in the task list and find the optimal task. If the optimal task found is the copying task, execute the copying task and monitor whether the task is completed. If the task is completed, delete the task from the task list; otherwise, continue to execute the copying task until the task is completed. If the optimal task found is not the copying task, determine whether the task queue is empty. If it is empty, the task ends; otherwise, determine whether there are other high-priority tasks (here is to determine whether there are new tasks inserted in the periodic check). If there are no other high-priority tasks, continue to traverse the tasks in the task list to find the optimal task; if there are other high-priority tasks, execute the high-priority task and queue the copying task. (When executing a high-priority task) determine whether there are other low-priority tasks currently being executed. If not, execute the optimal task and monitor whether the task is completed; if there are other priority tasks being executed, pause other tasks, switch to the optimal task execution and monitor whether the task is completed. If the task is completed, delete it from the task list; otherwise, continue to execute the task until it is completed.
[0020] System Example: The present invention provides a high-frequency acquisition system suitable for smart terminals, the system including a processor, the processor being used to execute computer program instructions to implement a high-frequency acquisition method suitable for smart terminals introduced in the method embodiment, the method has been introduced clearly enough in the method embodiment and will not be repeated here.
Claims
1. A high-frequency acquisition method suitable for intelligent terminals, characterized in that: The method comprises the following steps: If the collection task includes at least two minute curve collection tasks with different collection frequencies, each minute curve collection task is executed according to the set priority. When each minute curve collection task completes data collection within the corresponding collection cycle, it is determined whether the data collected by each minute curve collection task in the previous collection cycle is complete. If the collected data is incomplete, the supplementary copying task of the corresponding minute curve collection task is started. After the supplementary copying task is started, if there is a minute curve collection task, the supplementary copying task is terminated and the minute curve collection task is executed.
2. The high-frequency acquisition method applicable to intelligent terminals according to claim 1, characterized in that: When there are more than one supplementary copying tasks corresponding to the minute curve collection task, each supplementary copying task is executed according to the priority set for each minute curve collection task.
3. The high frequency acquisition method applicable to intelligent terminals according to claim 1 or 2, characterized in that: The priority of each minute curve collection task is determined according to its corresponding collection frequency. The higher the collection frequency, the higher the priority of the corresponding minute curve collection task.
4. The high-frequency acquisition method applicable to intelligent terminals according to claim 1, characterized in that: If the collection task is not a minute curve collection task, the task is loaded into the task variable normally.
5. The high frequency acquisition method applicable to intelligent terminals according to claim 1, characterized in that: If a higher priority minute curve collection task comes in during the execution of a lower priority minute curve collection task, the lower priority minute curve collection task will be paused to execute the higher priority minute curve collection task, and the lower priority minute curve collection task will continue to be executed after the higher priority minute curve collection task is completed.
6. A high-frequency acquisition system suitable for an intelligent terminal, comprising a processor, characterized in that: The processor is used to execute a computer program to implement the steps of a high-frequency acquisition method suitable for a smart terminal as described in any one of claims 1 to 5.
Citation Information
Cited By
Complementary reading scheduling method for high-frequency acquisition task, intelligent fusion terminal and medium
CN122269173A