Method for efficiently switching tasks of concentrator, acquisition terminal and medium

Through the concentrator dynamically scheduling carrier channel resources, the rapid switching between high-frequency photovoltaic acquisition tasks and ordinary tasks is achieved, which solves the problem of high-priority tasks not being executed in a timely manner, and improves the integrity of data acquisition and system stability.

CN120475280APending Publication Date: 2025-08-12QINGDAO ITECHENE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510622500.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

When switching between high-frequency photovoltaic acquisition tasks and ordinary tasks, in the prior art, the carrier meter reading and task scheduling are not synchronized, resulting in high-priority tasks that cannot be executed in time, resulting in data collection being missed and even the entire station area being stopped.

Method used

By comparing the priority of the new task and the current task, if the new task has higher priority, it immediately stops sending the meter reading message of the current task, processes the received meter data and releases the carrier meter reading channel. The new task uses the released channel for copying and reading, and only the channels waiting for response are retained to achieve rapid switching and coordinated operation of the task.

Benefits of technology

It realizes rapid switching of high-priority tasks, improves the utilization efficiency of carrier channels, avoids the shutdown caused by individual abnormal meters, ensures the integrity and accuracy of data acquisition, and improves the stability and robustness of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120475280A_ABST
    Figure CN120475280A_ABST
Patent Text Reader

Abstract

The invention provides a method for efficiently switching tasks of a concentrator, an acquisition terminal and a medium, and the method comprises the following steps: the concentrator executes a current task, and obtains ammeter data through a carrier meter reading channel; if the new task arrives at the execution time, comparing the priority of the new task with the priority of the current task; if the priority of the new task is higher, executing the new task; executing the new task, stopping sending the meter reading message of the current task, processing the electric meter data received by the carrier meter reading channel, and releasing the carrier meter reading channel; and the new task utilizes the released carrier meter reading channel to read the electric meter. In the task switching process, the concentrator reserves the channels waiting for response and immediately releases the channels completing response processing to a new task for use, the dynamic resource scheduling mechanism remarkably improves the utilization efficiency of limited carrier channels, and rapid switching and coordinated operation between the tasks are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication technology, and in particular relates to a method for efficiently switching tasks of a concentrator, a collection terminal and a medium. Background Art

[0002] Due to the rapid growth of photovoltaic power generation nationwide in recent years, power grid companies have increasingly demanded high-frequency data collection for distributed photovoltaics to meet the new demands of large-scale distributed photovoltaic development and enhance their operational status awareness and regulation and control capabilities. This requires data collection from photovoltaic users every one or five minutes. These photovoltaic data collection tasks are typically given the highest priority to ensure timely access to photovoltaic data. Consequently, frequent switching occurs between high-frequency tasks and regular tasks. When a low-priority task is already executing, the arrival of a high-priority task interrupts it and switches to the high-priority task. However, due to the asynchrony between carrier meter reading and task scheduling, the currently executing meter reading task must complete all sent messages before switching to a new task, resulting in delayed execution of the high-priority task. Furthermore, the carrier meter reading wait timeout is typically 60 seconds. If a photovoltaic meter experiences an anomaly or responds to a timeout, the wait time for reading a single meter will be 60 seconds. Therefore, the one-minute task will continue to execute, preventing regular tasks from being executed, leading to meter reading suspension across the entire grid. Furthermore, if a regular meter is abnormal or responds with a timeout, switching to a 1-minute task will still require waiting for the timeout table, causing the 1-minute task to not execute in time and resulting in missed data collection. Therefore, the existing technology needs further improvement. Summary of the Invention

[0003] In order to solve the above problems in the prior art, the present invention provides a method for efficiently switching tasks of a concentrator, comprising the following steps: Step S1: The concentrator performs the current task and obtains meter data through the carrier meter reading channel; Step S2: If a new task is due for execution, compare the priority of the new task with the priority of the current task; Step S21: If the priority of the current task is higher, continue to execute the current task; Step S22: If the priority of the new task is higher, execute the new task; Step S3, executing the new task in step S22, stopping sending the meter reading message of the current task, processing the meter data received by the carrier meter reading channel, and releasing the carrier meter reading channel; The new task uses the released carrier meter reading channel to read the electricity meter.

[0004] On the basis of the above scheme, when the carrier meter reading channel switches to a high-priority task, the meter reading channel stops sending new messages for the current task and sends the received response messages to the concentrator; After releasing the meter reading channel, the meter reading channel is in an idle state and starts sending meter reading messages of the new task and receiving response messages from the target meter. Until all carrier meter reading channels execute the new task, the high priority task switching is completed.

[0005] Preferably, when the task is switched, the meter reading message of the current task has been sent to the target meter through the nth carrier meter reading channel. The target meter times out and does not reply. The nth carrier meter reading channel fails to receive the response message. The nth carrier meter reading channel is retained and the current task continues to be executed. The remaining released carrier meter reading channels execute new tasks.

[0006] On the other hand, if the target meter does not respond after the timeout, the nth carrier meter reading channel waits for the timeout waiting time of the target meter to end, and the concentrator sets the target meter to the failure table, and then releases the nth carrier meter reading channel, and the nth carrier meter reading channel is used to execute a new task.

[0007] Preferably, the step S2 further includes: if there are multiple new tasks due for execution, prioritizing the multiple new tasks, and determining whether the priority of the new task with the highest priority is greater than the priority of the current task.

[0008] On the basis of the above solution, the method further includes: When any meter reading channel receives meter reading data of a target meter, it searches for meter reading task information of the target meter; Determine whether the meter reading data is a current task or a new task to read the target electricity meter; If it is the meter reading data of the current task, the concentrator stores the meter reading data according to the current task information and releases the meter reading channel; The new task uses the meter reading channel to read the meter.

[0009] On the basis of the above scheme, as described.

[0010] In another aspect, the present invention provides a collection terminal, comprising: The first meter reading module is used to execute the current task and obtain meter data through the carrier meter reading channel; The task scheduling module compares the priority of the new task with the priority of the current task and selects the task with the highest priority; A second meter reading module, configured to execute the new task selected by the task scheduling module, wherein the second meter reading module includes a first execution module and a second execution module; The first execution module is used to stop sending the meter reading message of the current task, process the meter data received by the carrier meter reading channel, and release the carrier meter reading channel; The second execution module is used for the new task to read the electricity meter using the released carrier meter reading channel.

[0011] Preferably, the collection terminal further includes: A search module, when any meter reading channel receives meter reading data of a target meter, searches for the meter reading task information according to the target meter; A judgment module, used to judge whether the meter reading data is a current task or a new task to read the target meter; The storage module stores the meter reading data for the current task, and releases the meter reading channel according to the current task information.

[0012] Specifically, task switching is performed, and there are N carrier meter reading channels. After the task switching is completed, the N carrier meter reading channels all perform new tasks.

[0013] The present invention also provides a computer-readable storage medium having a computer program. When the computer program is executed by a processor, the steps of the method for efficiently switching tasks of a concentrator as described above are implemented.

[0014] Compared with the prior art, the present invention has the following beneficial effects: 1. The concentrator can quickly interrupt low-priority tasks and start high-priority tasks based on the task priority issued by the master station, significantly reducing task switching latency. During task switching, the concentrator only retains channels that are waiting for responses and immediately releases channels that have completed response processing for use by new tasks. This dynamic resource scheduling mechanism significantly improves the utilization efficiency of limited carrier channels and achieves seamless switching and coordinated operation between tasks. 2. When a meter experiences a communication anomaly or a response timeout, the concentrator can mark it as a failed meter and record the relevant information, while freeing up the channel resources for other tasks. This avoids the serious consequence of a single abnormal meter causing the entire area to "stop reading", improving the stability and robustness of the system. 3. For meter reading requests that have been sent but not received a response, the concentrator will continue to receive and process the returned meter reading data and store it correctly according to the task information; even during the task switching process, no valid data will be lost, ensuring the integrity and accuracy of the collected data. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 Flowchart of task switching for the concentrator of this application; Figure 2This is a specific flow chart of task switching for the concentrator in this application; Figure 3 This is the carrier channel execution flow chart when this application switches tasks. DETAILED DESCRIPTION

[0016] The invention will be further described below with reference to specific embodiments.

[0017] Currently, the requirements for photovoltaic meter data collection tasks are becoming increasingly higher. In order to ensure the collection of photovoltaic data, high-frequency tasks are added in addition to ordinary tasks to ensure high-frequency collection of photovoltaic data. Frequent switching between high-frequency tasks and ordinary tasks is performed. In order to prevent data omissions during task switching caused by timeout meters, the carrier meter reading channel is controlled during task switching to achieve rapid task switching and ensure the integrity of data collection.

[0018] Example 1 This embodiment provides a method for concentrator to efficiently switch tasks, such as Figure 1 and Figure 2 As shown, the method for switching tasks includes the following steps: Step S1: The concentrator performs the current task and obtains meter data through the carrier meter reading channel; The current task is the current task of the concentrator, which can be a regular collection task such as a daily freeze task, a 1-hour task, or a 15-minute task; The concentrator serves as the central management and control device of the remote centralized meter reading system. It stores various collection tasks issued by the master station. The concentrator sends meter reading request messages through multiple carrier meter reading channels and receives response data from the meter.

[0019] Step S2, the new task arrives at the execution time. The new task is the data to be read task of the concentrator at the current time, which usually has a higher priority, such as the 1-minute or 5-minute high-frequency data collection task of the photovoltaic meter; The various meter reading tasks in the concentrator are executed periodically, and there will inevitably be duplication of execution time. Therefore, resources need to be allocated according to the priority of the task cycle. Generally, the shorter the cycle, the higher the priority of the task.

[0020] Specifically, step S2 further includes: if there are multiple new tasks whose execution time arrives, sorting the multiple new tasks by priority, and selecting the new task with the highest priority, including comparing the priority of the task with the priority of the current task.

[0021] Compare the priority of the new task with the priority of the current task, including: Step S21: If the priority of the current task is greater than or equal to the priority of the new task, the reading tasks are executed in the order in which the tasks arrive, and the new task is executed after the current task is completed; Step S22: If the priority of the new task is greater than the priority of the current task, execute the new task; Generally speaking, photovoltaic high-frequency tasks have a higher priority. When ordinary tasks are executed, the arrival of high-frequency tasks will cause task switching. When existing tasks are executed, the currently executing meter reading task will not switch to the new task until all sent messages are received.

[0022] Step S3, executing the new task described in step S22: The concentrator stops sending new current task messages to the electric meter, processes the electric meter data corresponding to the meter reading request messages that have been sent but have not received a response, and releases the carrier meter reading channel after the processing is completed.

[0023] Therefore, when the priority of the new task is higher than that of the current task, a task switch occurs. The meter currently being read by the meter reading channel is no longer read, and only the received data of the meter reading channel is processed. After processing the received data of the carrier channel, the meter reading channel is released to the new task. When all the meter reading channels of the current task are released to the new task, the task switch is completed and the new task uses all the meter reading channels to read meters. When the carrier meter reading channel is switched to a higher priority task, the meter reading channel stops sending new messages from the current task and sends the received response messages to the concentrator.

[0024] This step ensures that the meter reading messages sent by the current task can process the received data, and the released meter reading channels can execute new tasks. This ensures that the new task can quickly switch to meter reading during high-frequency tasks, without having to wait until all the meter reading messages of the old task (i.e., the current task) are processed before switching to the new task. This maximizes the efficiency of meter reading and the integrity of data collection when high-frequency collection tasks are running on site.

[0025] The concentrator will use the released carrier meter reading channel to start executing a new task, sending a meter reading request to the target meter and receiving the meter reading data returned by it.

[0026] Specifically, the concentrator checks whether there is an idle meter reading channel. If so, the new task uses the meter reading channel to perform meter reading; if there is no idle channel, the release of the carrier meter reading channel described in step S3 is executed; After releasing the meter reading channel, the meter reading channel is in an idle state and starts sending meter reading messages of the new task and receiving response messages from the target meter. Until all carrier meter reading channels execute the new task, the high priority task switching is completed.

[0027] Preferably, the step S3 further includes: Step S31: When any meter reading channel receives meter reading data of a target meter, the concentrator searches for meter reading task information of the target meter; Step S32: Determine whether the meter reading data is a current task or a new task to read the target meter: If it is the meter reading data of the current task, the concentrator stores the meter reading data according to the current task information and releases the meter reading channel; the new task uses the meter reading channel to read the meter; If it is the meter reading data of a new task, the data will be stored according to the task information and the new task will continue to be executed; until all carrier meter reading channels execute the new task, the task switching is completed.

[0028] The concentrator accurately identifies and stores the data in the correct task data set, ensuring data integrity and accuracy. Even during task switching, the response data of all sent requests can be properly processed, avoiding data loss caused by task switching.

[0029] Example 2 If there is a meter timeout, the high-priority task will not be executed until the meter timeout of the current task ends, which will cause the high-priority task to not be executed in time.

[0030] On the basis of Example 1, Figure 3 As shown in the figure, if the meter times out and does not respond when switching tasks, the meter reading channel will continue to be reserved for the current task, and the remaining meter reading channels will be released for the new task to use.

[0031] On the one hand, when the task is switched, the meter reading message of the current task has been sent to the target meter through the nth carrier meter reading channel. The target meter times out and does not respond. The nth carrier meter reading channel fails to receive the response message. The nth carrier meter reading channel is retained and the current task continues to be executed. The remaining released carrier meter reading channels execute new tasks.

[0032] On the other hand, if the target meter does not respond after the timeout, the nth carrier meter reading channel waits for the timeout waiting time of the target meter to end, and the concentrator sets the target meter to the failure table, and then releases the nth carrier meter reading channel, and the nth carrier meter reading channel is used to execute a new task.

[0033] Through this method, even if the meter times out and does not respond during task switching, the remaining meter reading channels can be quickly switched to the new task for meter reading, thereby maximizing the utilization efficiency of the meter reading channels and ensuring the integrity of on-site meter reading data.

[0034] Example 3 In this embodiment, the concentrator has a total of 10 carrier meter reading channels. The steps for task switching are as follows: The current task uses 10 carrier meter reading channels for meter reading; When a task switches, the current task information is first backed up to the memory, and the current task no longer sends new meter reading messages; Load new task information and prepare for new task execution; When meter reading messages are returned from the 10 carrier meter reading channels, the returned meter reading messages are not the meter reading data executed by the new task. The meter reading messages are stored in the task information saved in the memory. Then the carrier meter reading channel is released to the new task, and the new task uses the channel to read the meter. If the current task has a timeout table, the channel will wait for the timeout waiting time of the timeout table to end, then set the timeout table to the failure table, and then release the meter reading channel to the new task for meter reading; After all data of the 10 carrier channels of the current task are received or the waiting timeout period ends, all 10 channels are released to the new task and the task switching is completed.

[0035] Based on the same technical concept, the present invention also provides a collection terminal capable of achieving rapid switching of high-priority tasks, including: The first meter reading module is used to execute the current task and obtain meter data through the carrier meter reading channel; The task scheduling module compares the priority of the new task with the priority of the current task and selects the task with the highest priority; Specifically, when the current task is not completed, the task scheduling module compares the priorities of all currently executed tasks and selects the task with the highest priority as the new task; A second meter reading module, configured to execute the new task selected by the task scheduling module, wherein the second meter reading module includes a first execution module and a second execution module; The first execution module is used to stop sending the meter reading message of the current task, process the meter data received by the carrier meter reading channel, and release the carrier meter reading channel; The second execution module is used for the new task to read the electricity meter using the released carrier meter reading channel.

[0036] The acquisition terminal also includes: A search module, when any meter reading channel receives meter reading data of a target meter, searches for the meter reading task information according to the target meter; A judgment module, used to judge whether the meter reading data is a current task or a new task to read the target meter; The storage module stores the meter reading data for the current task, and releases the meter reading channel according to the current task information.

[0037] Execute task switching, there are N carrier meter reading channels, and after the task switching is completed, the N carrier meter reading channels all execute new tasks.

[0038] The present invention also provides a computer-readable storage medium having a computer program. When the computer program is executed by a processor, the steps of the method for efficiently switching tasks of a concentrator as described above are implemented.

[0039] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

[0040] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

[0041] Although the above describes the specific implementation methods of the present invention, it does not limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A method for efficiently switching tasks of a concentrator, characterized in that: The following steps are involved: Step S1: The concentrator performs the current task and obtains meter data through the carrier meter reading channel; Step S2: If a new task is due for execution, compare the priority of the new task with the priority of the current task; Step S21: If the priority of the current task is higher, continue to execute the current task; Step S22: If the priority of the new task is higher, execute the new task; Step S3, executing the new task in step S22, stopping sending the meter reading message of the current task, processing the meter data received by the carrier meter reading channel, and releasing the carrier meter reading channel; The new task uses the released carrier meter reading channel to read the electricity meter.

2. The method for efficiently switching tasks of a concentrator according to claim 1, characterized in that: When the carrier meter reading channel switches to a high-priority task, the meter reading channel stops sending new messages for the current task and sends the received response messages to the concentrator; After releasing the meter reading channel, the meter reading channel is in an idle state and starts sending meter reading messages of the new task and receiving response messages from the target meter. Until all carrier meter reading channels execute the new task, the high priority task switching is completed.

3. The method for efficiently switching tasks of a concentrator according to claim 2, characterized in that: When the task is switched, the meter reading message of the current task has been sent to the target meter through the nth carrier meter reading channel. The target meter times out and does not respond. The nth carrier meter reading channel fails to receive the response message. The nth carrier meter reading channel is retained and the current task continues to be executed. The remaining released carrier meter reading channels execute new tasks.

4. The method for efficiently switching tasks of a concentrator according to claim 3, characterized in that: If the target meter times out and does not reply, the nth carrier meter reading channel waits for the timeout waiting time of the target meter to end, and the concentrator sets the target meter to a failure table, and then releases the nth carrier meter reading channel, and the nth carrier meter reading channel is used to execute a new task.

5. The method for efficiently switching tasks of a concentrator according to claim 2, characterized in that: The step S3 further includes: When any meter reading channel receives meter reading data of a target meter, it searches for meter reading task information of the target meter; Determine whether the meter reading data is a current task or a new task to read the target electricity meter; If it is the meter reading data of the current task, the concentrator stores the meter reading data according to the current task information and releases the meter reading channel; The new task uses the meter reading channel to read the meter.

6. The method for efficiently switching tasks of a concentrator according to claim 1, characterized in that: The step S2 further includes: if there are multiple new tasks that are due for execution, sorting the priorities of the multiple new tasks, and determining whether the priority of the new task with the highest priority is greater than the priority of the current task.

7. A collection terminal, characterized in that: include: The first meter reading module is used to execute the current task and obtain meter data through the carrier meter reading channel; The task scheduling module compares the priority of the new task with the priority of the current task and selects the task with the highest priority; A second meter reading module, configured to execute the new task selected by the task scheduling module, wherein the second meter reading module includes a first execution module and a second execution module; The first execution module is used to stop sending the meter reading message of the current task, process the meter data received by the carrier meter reading channel, and release the carrier meter reading channel; The second execution module is used for the new task to read the electricity meter using the released carrier meter reading channel.

8. The acquisition terminal according to claim 7, characterized in that: Also includes: A search module, when any meter reading channel receives meter reading data of a target meter, searches for the meter reading task information according to the target meter; A judgment module, used to judge whether the meter reading data is a current task or a new task to read the target meter; The storage module stores the meter reading data for the current task, and releases the meter reading channel according to the current task information.

9. The acquisition terminal according to claim 7, characterized in that: Execute task switching, there are N carrier meter reading channels, and after the task switching is completed, the N carrier meter reading channels all execute new tasks.

10. A computer-readable storage medium having a computer program, wherein the computer-readable storage medium implements the method for efficiently switching tasks of a concentrator according to any one of claims 1 to 6 when the computer program is executed by a processor.