Concentrator multi-task simultaneous execution method and device and medium

By dynamically adjusting the allocation of carrier meter reading channels in the concentrator, the problem of high-frequency tasks squeezing the carrier meter reading channels of ordinary tasks is solved, and the concurrent execution of high-frequency tasks and ordinary tasks is realized and the channel resources are optimized.

CN120128826APending Publication Date: 2025-06-10QINGDAO ITECHENE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510387637.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

In distributed photovoltaic acquisition scenarios, the execution of high-frequency tasks will lead to the carrier meter reading channel of ordinary tasks being squeezed, resulting in the problems of missing or suspended copying in ordinary tasks. At the same time, high-frequency tasks occupy a large amount of channel resources, causing waste.

Method used

A concentrator multi-task simultaneous execution method is proposed. By initializing the number of carrier meter reading channels to N, dynamically adjusting channel allocation according to the number of power meters under high-frequency tasks, ensuring that high-frequency tasks and ordinary tasks can be executed simultaneously, and optimizing the use of channel resources.

Benefits of technology

Concurrent execution of high-frequency tasks and ordinary tasks is realized, task blockage caused by unreasonable allocation of channel resources is avoided, data collection integrity is guaranteed to the maximum extent, and the use of channel resources is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120128826A_ABST
    Figure CN120128826A_ABST
Patent Text Reader

Abstract

The invention discloses a concentrator multi-task simultaneous execution method and device and a medium, and belongs to the technical field of electric power data acquisition. Aiming at the problems of resource waste and acquisition interruption caused by preempting a common task channel by a high-frequency task in the prior art, the invention provides a task scheduling thread: initializing N carrier channels, and allocating the whole channel to the common task when no high-frequency task exists; when multiple tasks are concurrent, channels are dynamically allocated based on the number of residual electricity meters of the high-frequency tasks, the high-frequency tasks occupy n channels (nlt, N) at most, and the common tasks at least reserve N-n channels. Double-task concurrency control is realized through a carrier meter reading thread; when the number of channels occupied by the tasks is less than the distribution amount, complementary reading is triggered to fill the channels; and when the occupancy reaches the upper limit, only receiving the message and pausing new meter reading. While the lowest channel resource of a common task is guaranteed, the channel utilization rate of a high-frequency task is dynamically optimized, the problems of meter reading lack and meter reading stop in a single-task meter reading mode of the current concentrator are solved, and the problem of waste of channel resources is also solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power data acquisition, and particularly to a method for a concentrator to execute multiple tasks simultaneously. Background Art

[0002] As the central management device and control device of a remote centralized meter reading system, the concentrator is issued with acquisition tasks and schemes by the master station, and the concentrator periodically acquires the electricity meter data at intervals of task execution. The concentrator's data acquisition method is carrier concurrent meter reading. Before the emergence of distributed photovoltaic, the minimum task period issued by the master station to the concentrator was 15 minutes. When performing carrier meter reading, only one task was executed by the concentrator. Even when there was a failure in the current task during acquisition, the normal meter reading of other electricity meters and tasks could still be guaranteed.

[0003] A photovoltaic area generally consists of only a few photovoltaic meters and hundreds of ordinary electricity meters. For the requirements of distributed photovoltaic acquisition, when the master station issues a high-frequency acquisition task (only for photovoltaic meter acquisition) to the concentrator, it often affects the execution of other ordinary tasks. In the case of carrier anomalies or electricity meter anomalies, the carrier meter reading will always wait for a timeout. At this time, the acquisition of electricity meters by ordinary tasks often has problems such as missing readings or suspended readings. In addition, when the number of photovoltaic meters is very small during the execution of the high-frequency acquisition task, but all carrier meter reading channels are occupied, it will cause waste of some channel resources. At this time, single-task meter reading by the concentrator can no longer meet the on-site high-frequency acquisition requirements. Summary of the Invention

[0004] To solve the problem that high-frequency tasks occupy the carrier meter reading channels of ordinary tasks, the present invention proposes a method for a concentrator to execute multiple tasks simultaneously, which is as follows: Initialize the carrier meter reading channels to N, where N is a positive integer; When there is no high-frequency task to be executed at the current time, allocate all carrier meter reading channels to ordinary meter reading tasks; When high-frequency tasks and ordinary tasks are executed simultaneously, allocate carrier meter reading channels to high-frequency tasks according to the number of electricity meters under the high-frequency tasks; When the electricity meter acquisition under the high-frequency task is completed, dynamically adjust the allocation of carrier meter reading channels according to the remaining number of electricity meters under the high-frequency task.

[0005] On the basis of the above solution, the maximum number of carrier meter reading channels allocated to the high-frequency acquisition task is n, where n is a positive integer less than N, and the minimum number of carrier meter reading channels allocated to the ordinary acquisition task is N - n, so as to ensure the minimum number of carrier meter reading channels that can be used by ordinary tasks.

[0006] Preferably, initialize 10 carrier meter reading channels. The maximum number of carrier meter reading channels allocated to high-frequency acquisition tasks is 5, and the minimum number of carrier meter reading channels allocated to ordinary acquisition tasks is 5. This allocation method can evenly distribute the channel resources for high-frequency acquisition tasks and ordinary acquisition tasks, preventing task blocking caused by unreasonable allocation of channel resources for high-frequency acquisition tasks or ordinary acquisition tasks.

[0007] Based on the above solution, to achieve the concurrent execution of high-frequency tasks and ordinary tasks, a carrier meter reading thread is designed to manage high-frequency tasks and ordinary tasks, as follows: For the execution process of ordinary tasks, when the required number of carrier channels for ordinary tasks is greater than or equal to the allocated number, the concentrator only receives the meter messages under ordinary tasks and stops initiating meter reading. When the number of used carrier channels is less than the allocated number, the concentrator re-initiates meter reading for the meters. For the execution process of high-frequency tasks, when the required number of carrier channels for high-frequency tasks is greater than or equal to the allocated number, the concentrator only receives the meter messages under high-frequency tasks and stops initiating meter reading. When the number of used carrier channels is less than the allocated number, the concentrator re-initiates meter reading for the meters.

[0008] Such a task execution strategy can ensure that the allocated channels are not idle, significantly reducing the waste of channel resources.

[0009] The second aspect of the present invention provides a concentrator multi-task simultaneous execution device, including: A device for initializing the carrier meter reading channels to N, where N is a positive integer; A device for allocating all carrier meter reading channels to ordinary meter reading tasks when there are no high-frequency tasks to be executed at the current time; A device for allocating carrier meter reading channels to high-frequency tasks according to the number of meters under high-frequency tasks when high-frequency tasks and ordinary tasks are executed simultaneously; A device for dynamically adjusting the allocation of carrier meter reading channels according to the remaining number of meters under high-frequency tasks when the meter collection under high-frequency tasks is completed.

[0010] The third aspect of the present invention provides a computer-readable storage medium, in which a runnable computer program is stored, and when the computer program runs, it can complete a concentrator multi-task simultaneous execution method as described above.

[0011] Compared with the prior art, the present invention has the following advantages: 1. High-frequency tasks can dynamically release channels, while ordinary tasks always retain the minimum number of channels. This "flexible allocation + hard reservation" mode allows for the peak demands of high-frequency tasks while preventing continuous squeezing of ordinary tasks, solving the resource preemption problem in the traditional single-task mode; 2. Through a dynamic adjustment mechanism, the channel allocation is optimized in real time according to the remaining electricity meters of high-frequency tasks, avoiding resource waste caused by fixed allocation; 3. The channel allocation parameters support dynamic configuration, which can adapt to different scales of photovoltaic grid-connected scenarios. Without modifying the core algorithm, the high-frequency acquisition density and the reliability of ordinary tasks can be balanced by adjusting the threshold, and it can adapt to most application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flowchart of the task scheduling thread.

[0013] Figure 2 It is a flowchart of the carrier reading thread. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0014] The following further describes the present solution in conjunction with specific embodiments.

[0015] The task scheduling thread is as Figure 1 shown. In this embodiment, the carrier reading channels are initialized to 10, that is, N = 10, and the number of carrier reading channels allocated to ordinary tasks is set to 5, and the number of carrier reading channels allocated to high-frequency tasks is set to 5.

[0016] In other embodiments, the carrier reading channels are initialized to any even number, the number of carrier reading channels allocated to ordinary tasks is set to half of the total number of carrier reading channels, and the number of carrier reading channels allocated to high-frequency tasks is set to half of the total number of carrier reading channels.

[0017] In other embodiments, the carrier reading channels are initialized to any odd number, the number of carrier reading channels allocated to ordinary tasks is set to the ceiling of half of the total number of carrier reading channels, and the remaining carrier reading channels are allocated to high-frequency tasks.

[0018] In other embodiments, the number of ordinary tasks and high-frequency tasks to be completed is automatically recognized, and the number of carrier reading channels allocated to ordinary tasks and the number of carrier reading channels allocated to high-frequency tasks are set according to the ratio of their respective task numbers.

[0019] In other embodiments, the number of carrier reading channels allocated to ordinary tasks is set to a number less than or equal to the total number of carrier reading channels, and the remaining carrier reading channels are allocated to high-frequency tasks.

[0020] When dynamically allocating and using carrier meter reading channels, first determine whether there is a high-frequency acquisition task. If not, allocate all carrier meter reading channels for ordinary tasks. If so, determine whether the high-frequency acquisition task is being executed. If not, allocate all carrier meter reading channels for ordinary tasks. If so, further determine the number of electricity meters controlled under the high-frequency acquisition task.

[0021] If the above-mentioned number of electricity meters is greater than or equal to 5 (the number of initially allocated carrier meter reading channels), set the number of carrier meter reading channels for high-frequency tasks to 5, and set the carrier meter reading channels for ordinary tasks to 5. If the above-mentioned number of electricity meters is less than 5, set the number of carrier channels for high-frequency tasks according to the number of electricity meters controlled by the high-frequency task, and the remaining carrier meter reading channels are allocated for ordinary tasks.

[0022] Loop the above dynamic allocation operation until all electricity meters are read.

[0023] In other embodiments, perform the dynamic allocation operation only once or a limited number of times.

[0024] In other embodiments, there is no limit to the dynamic allocation of carrier meter reading channels. It can be the dynamic allocation of tasks for other types of meter reading channels.

[0025] The carrier meter reading thread, as Figure 2 shown, first determines whether the number of carrier meter reading channels used for ordinary tasks is greater than the number of channels allocated for tasks. If so, for the meter reading actions under ordinary acquisition tasks, only receive the completed meter reading messages and stop initiating meter reading. If not, initiate meter reading for the electricity meters under ordinary tasks.

[0026] Then determine whether the number of carrier meter reading channels used for high-frequency tasks is greater than the number of channels allocated for tasks. If so, for the meter reading actions under high-frequency acquisition tasks, only receive the completed meter reading messages and stop initiating meter reading. If not, initiate meter reading for the electricity meters under high-frequency tasks.

[0027] Realize the use of channels by restricting meter reading actions.

[0028] In other embodiments, the order of the processes of the number of carrier meter reading channels used for ordinary tasks and high-frequency tasks can be interchanged.

[0029] Through the carrier meter reading thread, it can be ensured that all allocated channels are in a working state, optimizing the task execution strategy and the use of channels. In the case of simultaneous execution of high-frequency acquisition tasks and ordinary acquisition tasks, the concurrent execution of the two tasks is realized through the dynamic allocation of carrier meter reading channels, which not only ensures the acquisition of high-frequency data but also ensures the acquisition of ordinary data in the case of carrier anomalies or electricity meter anomalies, maximizing the guarantee of the integrity of data acquisition at the site when the high-frequency acquisition task is running.

[0030] The above are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

[0031] Although the specific implementation manners of the present invention are described above, it is not a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications or deformations that can be made without creative efforts based on the technical solutions of the present invention are still within the protection scope of the present invention.

Claims

1. A method for executing multiple tasks simultaneously in a concentrator, characterized in that: Dynamically allocate carrier meter reading channels through task scheduling threads, including the following processes: The number of carrier meter reading channels is initialized to N, where N is a positive integer; When there is no high-frequency task to be executed at the current time, all carrier meter reading channels are assigned to ordinary meter reading tasks; When high-frequency tasks and ordinary tasks are executed at the same time, the carrier meter reading channel is allocated to the high-frequency task according to the number of meters under the high-frequency task; When the data collection of an electric meter is completed under the high-frequency task, the allocation of the carrier meter reading channel is dynamically adjusted according to the number of remaining electric meters under the high-frequency task.

2. A method for executing multiple tasks simultaneously in a concentrator as claimed in claim 1, characterized in that: The number of carrier meter reading channels allocated to high-frequency collection tasks is at most n, where n is a positive integer less than N, and the number of carrier meter reading channels allocated to ordinary collection tasks is at least Nn.

3. A method for executing multiple tasks simultaneously in a concentrator as claimed in claim 2, characterized in that: The carrier meter reading thread concurrently executes high-frequency tasks and ordinary tasks according to the assigned carrier meter reading channel.

4. A method for executing multiple tasks simultaneously in a concentrator as claimed in claim 3, characterized in that: The execution process of the carrier meter reading thread for common tasks is: When the number of carrier channels required by the common task is greater than or equal to the number allocated, the concentrator only receives messages from meters in the common task and stops initiating meter reading; When the number of carrier channels used is less than the allocated number, the concentrator re-initiates meter reading for the electric meter.

5. A method for executing multiple tasks simultaneously in a concentrator as claimed in claim 3, characterized in that: The execution process of the carrier meter reading thread for high-frequency tasks is: When the number of carrier channels required by the high-frequency task is greater than or equal to the allocated number, the concentrator only receives messages from meters in the high-frequency task and stops initiating meter reading; When the number of carrier channels used is less than the allocated number, the concentrator re-initiates meter reading for the electric meter.

6. A concentrator multi-task simultaneous execution device, characterized in that: include: A device for initializing the number of carrier meter reading channels to N, where N is a positive integer; A device for allocating all carrier meter reading channels to ordinary meter reading tasks when there is no high-frequency task to be performed at the current time; A device for allocating carrier meter reading channels to high-frequency tasks according to the number of electric meters under the high-frequency tasks when the high-frequency tasks and the ordinary tasks are executed simultaneously; A device for dynamically adjusting the allocation of carrier meter reading channels according to the number of remaining meters under the high-frequency task when the collection of meters under the high-frequency task is completed.

7. A concentrator multi-task simultaneous execution device as claimed in claim 6, characterized in that: The maximum number of carrier meter reading channels allocated to high-frequency collection tasks is n, where n is a positive integer less than N. The minimum number of carrier meter reading channels allocated to ordinary collection tasks is Nn. The carrier meter reading thread executes high-frequency tasks and ordinary tasks concurrently according to the allocated carrier meter reading channels.

8. A concentrator multi-task simultaneous execution device as claimed in claim 7, characterized in that: The execution process of the carrier meter reading thread for common tasks is: When the number of carrier channels required by the common task is greater than or equal to the number allocated, the concentrator only receives messages from meters in the common task and stops initiating meter reading; When the number of carrier channels used is less than the allocated number, the concentrator re-initiates meter reading for the electric meter.

9. A concentrator multi-task simultaneous execution device as claimed in claim 7, characterized in that: The execution process of the carrier meter reading thread for high-frequency tasks is: When the number of carrier channels required by the high-frequency task is greater than or equal to the allocated number, the concentrator only receives messages from meters in the high-frequency task and stops initiating meter reading; When the number of carrier channels used is less than the allocated number, the concentrator re-initiates meter reading for the electric meter.

10. A computer-readable storage medium, characterized in that: An executable computer program is stored, and when the computer program is run, a concentrator multi-task simultaneous execution method as described in any one of claims 1 to 5 is executed.