A data collection method and system for type II concentrator photovoltaic power generation meter
By implementing task priority management and supplementary acquisition strategies on the Type II concentrator, the problem of inconsistent collection frequency and success rate is solved, timely collection of photovoltaic power generation data and high success rate are achieved, and operation and installation costs are reduced.
Patent Information
- Application Number
- CN202210801403.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-07-08
AI Technical Summary
When collecting photovoltaic power generation data, the existing Type II concentrator cannot configure the collection cycle according to different meter types or collection data items, resulting in inconsistent collection frequency and success rate, affecting real-time monitoring and ordinary residential user energy meter data collection, and increasing operating costs. and installation costs.
By implementing task priority management and supplementary acquisition strategies on the existing Type II concentrator, hierarchical collection is performed based on the priority of the energy meter data items, and supplementary acquisition is performed when idle, ensuring timely collection and success rate of photovoltaic power generation data. .
Without adding a Type II concentrator, it achieves timely collection of photovoltaic power generation data and a high success rate, reduces operating and installation costs, and avoids potential failure points and maintenance costs of additional equipment.
Smart Images

Figure CN115396750B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power consumption information collection systems, and in particular to a data collection method and system for a type II concentrator photovoltaic power generation meter. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] In traditional fossil energy power generation, the power generation side can be precisely controlled according to the power demand of the user side. However, for photovoltaic power generation, since it adopts a distributed mode, the locations are mostly on roofs, mountains, fields and other places. Each point is a micro "power plant", and photovoltaic power generation is highly dependent on the weather. The randomness and volatility of power generation are relatively large. In order to accurately control the power generation, it is necessary to monitor the power generation data of each power generation node in real time.
[0004] Currently, most of the photovoltaic power generation data information is collected and reported with the help of concentrators in the electricity consumption information collection system (divided into Type I concentrators and Type II concentrators according to differences in appearance and function).
[0005] For Type II concentrators (hereinafter referred to as "Type II concentrators") that use the 1376.1 communication protocol, since they were initially designed based on the collection of electricity consumption data information from ordinary residential users, there are significant differences in the frequency and success rate of data collection compared to photovoltaic power generation data information collection. Generally, residential users collect data on an "hour" or "day" basis, and the success rate of data collection is generally counted on a "day" basis, as long as the data can be successfully reported within 1 day. Photovoltaic power generation data is generally collected on a "minute" basis, and the success rate is also counted on a "minute" basis.
[0006] In order to be compatible with the minute-level collection of photovoltaic power generation data, it is necessary to increase the data collection density, from the original collection based on "hours" or "days" to the collection based on "minutes". Since the Type II concentrator does not have the function of configuring the collection cycle according to different meter types or different collection data items, once the collection cycle is adjusted to minute-level collection, the original collection of ordinary residential user electricity meter data will also be changed to minute-level collection.
[0007] Since the Type II concentrator needs to collect a lot of data from ordinary residential users' electric energy meters, including voltage, current, power, electric energy indication, daily frozen electric energy, etc., it takes a long time to complete the data collection of a single electric energy meter. If a Type II concentrator collects too many electric energy meters at the same time, it may take dozens of minutes to complete a round of collection for all electric energy meters. At this time, if the collection density is hastily increased and the collection cycle is shortened in order to be compatible with the collection of photovoltaic data, it will affect the original data collection of ordinary residential users' electric energy meters.
[0008] In summary, the problems and defects of the existing Type II concentrators in collecting photovoltaic power generation data are as follows:
[0009] Because it does not have the function of configuring the collection cycle according to different meter types or different collection data items; when the collection cycle is too long, the real-time monitoring of photovoltaic power generation data cannot be achieved. Once data missing occurs, it will affect the dispatching decision of the entire power grid; when the collection cycle is set too small, it will affect the collection of data information of existing ordinary residential users' electricity meters, and have an adverse impact on the line loss analysis, power quality detection and other businesses of the marketing system.
[0010] A new Type II concentrator can be installed separately to distinguish between the data collection of ordinary residential users' electricity meters and the photovoltaic power generation data information collection. The newly installed Type II concentrator is only responsible for the collection of photovoltaic power generation data; however, this solution will increase costs, including the purchase cost, construction and installation cost, and subsequent maintenance cost of the new Type II concentrator. Summary of the invention
[0011] In order to solve the above problems, the present invention proposes a data collection method and system for a type II concentrator photovoltaic power generation meter, which achieves the desired function without adding an additional type II concentrator, reduces the operating cost of photovoltaic power generation and the installation cost of the type II concentrator.
[0012] In order to achieve the above object, the present invention adopts the following technical solution:
[0013] In a first aspect, the present invention provides a method for collecting data from a type II concentrator photovoltaic power generation meter, comprising:
[0014] Obtain data information of tasks actively reported by the Type II concentrator and data information of tasks that can be collected, and determine the priority of each task. The running state of each task includes at least ready state, running state and blocked state;
[0015] If there is no task currently running, the first ready task is switched to the running state as the initial task to be executed, and if there is no blocked task, the initial task to be executed is used as the task to be executed; if there is a blocked task, the task to be executed is determined according to the priority of the first blocked task and the initial task to be executed;
[0016] If there is a task currently running, the initial task to be executed is determined according to the priority of the first ready task and the currently running task, and if there is no blocked task, the initial task to be executed is used as the task to be executed; if there is a blocked task, the task to be executed is determined according to the priority of the first blocked task and the initial task to be executed;
[0017] If there is no ready task and no currently running task, the first blocked task is used as the task to be executed; if there is no ready task and there is currently a running task, the task to be executed is determined according to the priority of the first blocked task and the currently running task;
[0018] The electric energy meter data is collected for the task to be executed, the validity of the collected electric energy meter data items and the electric energy meter serial numbers is judged, and the electric energy meter serial numbers that failed to be collected are determined until the node traversal is completed. After the traversal is completed, the electric energy meter serial numbers that failed to be collected are re-collected.
[0019] As an optional implementation, the data information includes a reporting / collecting cycle, a reported / collected data item content, a reported / collected electric energy meter serial number and a reported / collected data type.
[0020] As an optional implementation method, after assigning node numbers to various tasks according to their priorities, a collection archive linked list is constructed.
[0021] As an optional implementation, the priority determination process includes: determining based on the collection period, the smaller the value of the collection period, the higher the priority; if the collection periods are equal, determining based on the collection type, the smaller the value of the collection type, the higher the priority; if the values of the collection types are also equal, determining based on the subscript of the task's position when acquiring data information, the smaller the subscript value, the higher the priority.
[0022] As an optional implementation, switching the running state of a task in an idle state includes:
[0023] Get the current running time and idle tasks, extract the collection period and last execution time corresponding to the idle tasks, and perform rounding operation based on the current running time and collection period to obtain the result value;
[0024] For tasks whose last execution time is not equal to the corresponding result value, the result value corresponding to the task is assigned to the last execution time, and the running state is switched to the ready state.
[0025] As an optional implementation, the process of determining the initial task to be executed according to the priority of the first ready task and the currently running task includes:
[0026] Compare the node number of the currently running task with the node number of the first ready task;
[0027] If the former is smaller than the latter, the priority of the currently running task is higher than the priority of the first ready task. At this time, the running status of the two tasks remains unchanged, and the currently running task is used as the initial task to be executed;
[0028] If the former is greater than the latter, the priority of the first ready task is higher than the priority of the currently running task. At this time, the running state of the currently running task is switched to the blocked state, the running state of the first ready task is switched to the running state, and the first ready task is used as the initial task to be executed;
[0029] Among them, the node serial number is: after determining the priority of each task, assign a node serial number to each task according to the priority.
[0030] As an optional implementation, the process of determining the task to be executed according to the priority of the first blocked task and the initial task to be executed, or determining the task to be executed according to the priority of the first blocked task and the currently running task includes:
[0031] Compare the node number of the currently running task / initial task to be executed with the node number of the first blocked task;
[0032] If the former is smaller than the latter, the priority of the currently running task / initial task to be executed is higher than the priority of the first blocked task. At this time, the running status of the two tasks remains unchanged, and the currently running task / initial task to be executed is used as the task to be executed.
[0033] If the former is greater than the latter, the priority of the first blocked task is higher than the priority of the currently running task / initial task to be executed. At this time, the running state of the currently running task / initial task to be executed is switched to the blocked state, the running state of the first blocked task is switched to the running state, and the first blocked task is used as the task to be executed;
[0034] Among them, the node serial number is: after determining the priority of each task, assign a node serial number to each task according to the priority.
[0035] As an optional implementation method, the process of collecting electric energy meter data and determining the validity of the task to be executed includes:
[0036] For each data item of each electric energy meter in the task to be executed, the serial number of the electric energy meter that failed to be collected is stored in the supplementary collection file link list, and the operation state is switched to the suspended state;
[0037] The validity is judged based on the maximum number of collected data items and the maximum number of collected electric energy meters.
[0038] As an optional implementation method, the supplementary mining process includes:
[0039] The running state of the task where the number of the electric energy meter that failed to collect data belongs is suspended;
[0040] If there is no supplementary collection task currently, the first suspended task is switched to the supplementary collection state for supplementary collection; if there is a supplementary collection task currently, the supplementary collection operation of the current task is continued.
[0041] As an optional implementation method, the validity of the supplementary electric energy meter data item content and the electric energy meter serial number is judged until all tasks are completed, and the running state of the corresponding task is changed to an idle state.
[0042] In a second aspect, the present invention provides a type II concentrator photovoltaic power generation meter data acquisition system, comprising:
[0043] The acquisition module is configured to acquire data information of tasks actively reported by the type II concentrator and data information of tasks that can be collected, and determine the priority of each task, and the running state of each task at least includes a ready state, a running state, and a blocked state;
[0044] The first priority determination module is configured to switch the first ready state task to the running state as the initial task to be executed if there is no currently running task, and to use the initial task to be executed as the task to be executed if there is no blocked state task; if there is a blocked state task, determine the task to be executed according to the priority of the first blocked state task and the initial task to be executed;
[0045] The second priority determination module is configured to determine the initial task to be executed according to the priorities of the first ready task and the currently running task if there is currently a running task, and to use the initial task to be executed as the task to be executed if there is no blocked task; if there is a blocked task, determine the task to be executed according to the priorities of the first blocked task and the initial task to be executed;
[0046] The third priority determination module is configured to, if there is no ready task and no currently running task, use the first blocked task as the task to be executed; if there is no ready task and there is currently a running task, determine the task to be executed according to the priority of the first blocked task and the currently running task;
[0047] The collection and supplementary collection module is configured to collect the electric energy meter data for the task to be executed, to judge the validity of the collected electric energy meter data item content and the electric energy meter serial number, and to determine the electric energy meter serial number that failed to be collected until the node traversal is completed, and after the traversal is completed, to supplement the collection of the electric energy meter serial number that failed to be collected.
[0048] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in the first aspect is performed.
[0049] In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer instructions, wherein when the computer instructions are executed by a processor, the method described in the first aspect is performed.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] The present invention proposes a method and system for collecting data of a type II concentrator photovoltaic power generation meter, which realizes the desired function without adding an additional type II concentrator, and reduces the operating cost of photovoltaic power generation and the installation cost of the type II concentrator.
[0052] The present invention proposes a method and system for collecting data of photovoltaic power generation electric energy meters using a type II concentrator. In terms of reducing the operating cost of photovoltaic power generation, the present invention solves the problem of needing to configure different collection cycles when collecting photovoltaic power generation data and electric energy meter data of ordinary residential users, and the problem of affecting photovoltaic data collection when too many electric energy meters of ordinary residential users are collected, by performing software upgrades on the original type II concentrators currently in operation on site.
[0053] The present invention proposes a method and system for collecting data of a type II concentrator photovoltaic power generation meter. By dividing the collection priority, a high priority can interrupt a low priority mode to ensure the timeliness of photovoltaic data collection; by adding a supplementary collection strategy, the collection success rate is improved. This avoids the mode of adding an additional type II concentrator to achieve photovoltaic data collection, reduces the purchase cost of the type II concentrator, and reduces the subsequent operation and maintenance cost, because each additional collection device adds a potential failure point.
[0054] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0056] Figure 1 is a flow chart of electric energy meter data collection provided by Embodiment 1 of the present invention;
[0057] Figure 2 This is a flow chart of supplementary data collection of electric energy meters provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0058] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0059] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0060] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0061] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0062] Example 1
[0063] This embodiment provides a method for collecting data of photovoltaic power generation meters of type II concentrators based on the 1376.1 communication protocol. The basic idea is: when collecting data of electric energy meters, according to the reporting cycle of the active reporting task set in the type II concentrator, the content of the reported data item, the reported electric energy meter serial number and the data information of the reported data type, and the data information of the collectible task, a collection cycle and priority are allocated to each collected data item of each electric energy meter. When collecting data of the electric energy meters subsequently, hierarchical collection is performed according to the collection cycle and priority, and the collected data items with high priority can interrupt the collected data items with low priority at any time. For some electric energy meter serial numbers that are not successfully collected during the collection process, they can be temporarily suspended. When idle, the electric energy meter serial numbers that are not successfully collected are collected again to improve the success rate.
[0064] The steps include:
[0065] Obtain data information of tasks actively reported by the Type II concentrator and data information of tasks that can be collected, and determine the priority of each task. The running state of each task includes at least ready state, running state and blocked state;
[0066] If there is no task currently running, the first ready task is switched to the running state as the initial task to be executed, and if there is no blocked task, the initial task to be executed is used as the task to be executed; if there is a blocked task, the task to be executed is determined according to the priority of the first blocked task and the initial task to be executed;
[0067] If there is a task currently running, the initial task to be executed is determined according to the priority of the first ready task and the currently running task, and if there is no blocked task, the initial task to be executed is used as the task to be executed; if there is a blocked task, the task to be executed is determined according to the priority of the first blocked task and the initial task to be executed;
[0068] If there is no ready task and no currently running task, the first blocked task is used as the task to be executed; if there is no ready task and there is currently a running task, the task to be executed is determined according to the priority of the first blocked task and the currently running task;
[0069] The electric energy meter data is collected for the task to be executed, the validity of the collected electric energy meter data items and the electric energy meter serial numbers is judged, and the electric energy meter serial numbers that failed to be collected are determined until the node traversal is completed. After the traversal is completed, the electric energy meter serial numbers that failed to be collected are re-collected.
[0070] The specific implementation process mainly includes two processes: electricity meter data collection and electricity meter data supplementary collection. The following is a detailed description of these two processes.
[0071] Step 1: Electricity meter data collection: Figure 1 As shown, according to the actively reported tasks and the default collectible tasks in the background, a collection archive list is constructed and prioritized; data collection starts from high priority, and the successfully collected tasks are changed to idle state. If there are electric energy meters that have not been successfully collected, the task is suspended so that the task can be recollected after all tasks have been traversed and completed.
[0072] Specifically include:
[0073] Step 1-1: Division of task priorities and construction of collection files;
[0074] Although the Type II concentrator for uploading communication based on the 1376.1 protocol does not have the function of setting different collection cycles according to the type of electric energy meter and the content of collected data, when actively reporting the electric energy meter data, different reporting cycles can be set according to the type of electric energy meter and the content of the collected electric energy meter data items; therefore, when the Type II concentrator collects electric energy meter data, different collection priorities and collection cycles can be divided according to the reporting cycle, reported data item content, reported electric energy meter sequence number and reported data type in the active reporting task, so as to perform classified collection; the specific process is as follows:
[0075] Step 1-1-1, define a structure, including:
[0076] typedef struct
[0077] {
[0078] UINT8 ucRunStatus;
[0079] UINT32 udwNodeID;
[0080] UINT32 udwCollType;
[0081] UITN32 udwPrd;
[0082] UINT32 udwLastActTime;
[0083] UINT32 udwMeterID[N];
[0084] UINT32 udwMeterIDIndex;
[0085] UINT32 udwMeterNO[M];
[0086] UINT32 udwRemeterNO[M];
[0087] UINT32 udwMeterNOIndex;
[0088] }ST_COLL_DATA_INFO;
[0089] Among them, ucRunStatus is the running status, and its value can be divided into 0 (idle state), 1 (ready state), 2 (running state), 3 (suspended state), 4 (blocked state), 5 (supplementary acquisition state); udwNodeID is the node serial number; udwCollType is the acquisition type; udwPrd is the acquisition cycle; udwLastActTime is the last execution time; udwMeterID[N] is the collected electric energy meter data item content, where the value of N is the maximum number of data acquisition contents theoretically supported by the II type concentrator; udwM eterIDIndex is the index pointer of the array udwMeterID[N] of the collected energy meter data content; udwMeterNO[M] is the serial number of the energy meter to be collected, where the value of M is the maximum number of energy meters that the Type II concentrator can support for collection; udwMeterNOIndex is the index pointer of the array udwMeterNO[M] of the collected energy meter numbers; udwReMeterNO[M] is the serial number of the energy meter that needs to be recollected, where the value of M is the maximum number of energy meters that the Type II concentrator can support for collection.
[0090] Step 1-1-2, use the structure ST_COLL_DATA_INFO defined in step 1-1-1 to define an array stCollDataInfo[P] to store all the information related to the electric energy meter that needs to be collected, where P is the maximum number of collection files supported by the type II concentrator, and the P value is equal to the sum of the number of active reporting tasks supported by the type II concentrator and the number of data types that need to be collected by the type II concentrator background by default. Then go to step 1-1-3.
[0091] For example, a Type II concentrator supports a maximum of 20 active reporting tasks, and the data collection background supports three types of data collection by default (such as ordinary electricity meter event collection, electricity meter level 1 event collection, and electricity meter level 2 event collection), then the value of P is 23.
[0092] Step 1-1-3, obtain the data information of the active reporting task configured in the type II concentrator, including the reporting period, the content of the reported data item, the reported electric energy meter sequence number and the current task reporting data type, and then store the active reporting tasks in the array stCollDataInfo[P] in sequence, and each task corresponds to an element in the array stCollDataInfo[P];
[0093] Then, the data information of the default collectable tasks in the background is obtained, including the collection period, the content of the collected data items, the serial number of the collected electric energy meter and the collected data type, and they are also stored in the array stCollDataInfo[P] in sequence; then go to step 1-1-4.
[0094] Step 1-1-4, create the energy meter data collection archive linked list CollMeterInfoList, and hang the elements in the array stCollDataInfo[P] into the collection archive linked list CollMeterInfoList in sequence according to the collection priority;
[0095] The process of determining the collection priority includes: determining according to the collection period udwPrd, the smaller the value of the collection period udwPrd, the higher the priority; if the collection period udwPrd values of multiple elements are equal, determining according to the collection type udwCollType of each element, the smaller the value of the collection type udwCollType, the higher the priority; if the values of the collection type udwCollType are also equal, determining according to the subscript of the array stCollDataInfo[P], the smaller the subscript value, the higher the priority.
[0096] For example, the udwPr value of the 0th element stCollDataInfo[0] in the array stCollDataInfo[P] is 60, and the udwPr value of the 1st element stCollDataInfo[1] is 30, which means that the priority of stCollDataInfo[1] is higher than that of stCollDataInfo[0]. Therefore, stCollDataInfo[1] is first added to the linked list CollMeterInfoList.
[0097] If the udwPr value of stCollDataInfo[0] is equal to that of stCollDataInfo[1], which is 60, then analyze the udwCollType values of stCollDataInfo[0] and stCollDataInfo[1]. Assuming that the udwCollType value of stCollDataInfo[1] is smaller than that of stCollDataInfo[0], it is determined that the priority of stCollDataInfo[1] is higher than that of stCollDataInfo[0]. Therefore, stCollDataInfo[1] is preferentially added to the linked list CollMeterInfoList.
[0098] If the udwCollType value of stCollDataInfo[1] is equal to the udwCollType value of stCollDataInfo[0], since the array subscript of the element stCollDataInfo[0] is 0 and the array subscript of the element stCollDataInfo[1] is 1, the priority of stCollDataInfo[0] is higher than that of stCollDataInfo[1], and the element stCollDataInfo[0] will be hung in the linked list CollMeterInfoList first.
[0099] At the same time, according to the order in which each element in stCollDataInfo[N] is hung into CollMeterInfoList, that is, the priority order, each element is assigned a node number udwNodeID; for example, stCollDataInfo[0] is the third element hung into the linked list CollMeterInfoList, so the udwNodeID value in stCollDataInfo[0] is 2 (the udwNodeID value of the first hung array element is 0). Then go to step 1-2.
[0100] Step 1-2: Perform hierarchical collection of electric energy meter data according to the priority and operation status of each task in the collection file link list. The specific process is as follows:
[0101] Step 1-2-1, create the energy meter data collection archive supplementary collection link list ReCollMeterInfoList. Use the structure variable ST_COLL_DATA_INFO to define a currently running task pointer *pCollMeterInfo and assign it an initial value of 0.
[0102] Initialize part of the content of each node in the electricity meter data collection archive linked list CollMeterInfoList as follows: the running status ucRunStatus is assigned a value of 1 (ready state); the last execution time udwLastActTime is assigned a value of 0; the index value udwMeterIDIndex is assigned a value of 0; the index value udwMeterNOIndex is assigned a value of 0; then go to step 1-2-2.
[0103] Step 1-2-2, switch the running status of each task node in the electric energy meter data collection archive link list CollMeterInfoList; the specific process is as follows:
[0104] Step 1-2-2-1. In the linked list CollMeterInfoList, determine whether the value of the running status ucRunStatus of each task node is 0 (idle state); if none of them is 0 (idle state), go to step 1-2-3; otherwise, there is an idle state, go to step 1-2-2-2.
[0105] Step 1-2-2-2, obtain the current running time Time and all task nodes with ucRunStatus value of 0 (idle state) in CollMeterInfoList, and extract the corresponding collection period udwPrd and the last execution time udwLastActTime according to the obtained task nodes; perform rounding operation on Time and udwPrd to obtain the result value udwCurActTime, that is, udwCurActTime = Time / udwPrd. Then go to step 1-2-2-3.
[0106] Step 1-2-2-3, determine whether the udwCurActTime and udwLastActTime values of all task nodes in the linked list CollMeterInfoList are equal; if the udwLastActTime values of all task nodes in the linked list CollMeterInfoList and their corresponding udwCurActTime values are equal, then go to step 1-2-3; if there are unequal task nodes, assign the udwCurActTime of the task node to udwLastActTime so that the two data values of the task node are equal, and then change the value of ucRunStatus of the task node to 1 (ready state), and then go to step 1-2-3.
[0107] Step 1-2-3, search the linked list CollMeterInfoList for the first task node whose ucRunStatus value is 1 (ready state); if it does not exist, go to step 1-2-4.
[0108] If it exists, determine whether the value of the pointer pCollMeterInfo of the currently running collection task is 0. If it is 0, the pointer pCollMeterInfo is empty, and there is no task currently running. Point the pointer pCollMeterInfo to the first task node in the linked list CollMeterInfoList with a ucRunStatus value of 1 (ready state), and change the ucRunStatus value of the task node to 2 (running state); then go to step 1-2-4.
[0109] If the pointer pCollMeterInfo is not 0 and there is a task currently running, compare the udwNodeID value of the task node pointed to by the pointer pCollMeterInfo with the udwNodeID value of the first task node with ucRunStatus value of 1 (ready state) in the linked list CollMeterInfoList; if the udwNodeID value of the task node pointed to by the pointer pCollMeterInfo is less than the udwNodeID value of the first task node with ucRunStatus value of 1 (ready state) in the linked list CollMeterInfoList, the task node pointed to by the pointer pCollMeterInfo has a higher priority and directly proceeds to step 1-2-4;
[0110] Otherwise, the first task node with a ucRunStatus value of 1 (ready state) in the linked list CollMeterInfoList has a high priority. At this time, the ucRunStatus value of the task node pointed to by the pointer pCollMeterInfo is modified to 4 (blocked state), and then the pointer pCollMeterInfo is re-pointed to the first task node with a ucRunStatus value of 1 (ready state) in the linked list CollMeterInfoList, and the ucRunStatus value of the task node is changed to 2 (running state), and then enter step 1-2-4.
[0111] Step 1-2-4, search for the first task node with a ucRunStatus value of 4 (blocked state) in the linked list CollMeterInfoList; if it does not exist, go to step 1-2-5.
[0112] If it exists, determine whether the value of the pointer pCollMeterInfo of the currently running collection task is 0. If it is 0, the pointer pCollMeterInfo is considered to be empty, and there is no task currently running. The pointer pCollMeterInfo points to the first task node with a ucRunStatus value of 4 (blocked state) in the linked list CollMeterInfoList, and at the same time change the ucRunStatus value of the task node to 2 (running state); then go to step 1-2-5.
[0113] If the pointer pCollMeterInfo is not 0 and there is a task currently running, compare the udwNodeID value of the task node pointed to by the pointer pCollMeterInfo with the udwNodeID value of the first task node in the linked list CollMeterInfoList whose ucRunStatus value is 4 (blocked state); if the udwNodeID value of the task node pointed to by the pointer pCollMeterInfo is smaller than the udwNodeID value of the first task node in the linked list CollMeterInfoList whose ucRunStatus value is 4 (blocked state), the task node pointed to by the pointer pCollMeterInfo has a higher priority and directly proceeds to step 1-2-5.
[0114] Otherwise, the first task node with a ucRunStatus value of 4 (blocking state) in the linked list CollMeterInfoList has a high priority. At this time, the ucRunStatus value of the task node pointed to by the pointer pCollMeterInfo is modified to 4 (blocking state), and then the pointer pCollMeterInfo is re-pointed to the first task node with a ucRunStatus value of 4 (blocking state) in the linked list CollMeterInfoList, and the ucRunStatus value of the task node is changed to 2 (running state), and then enter step 1-2-5.
[0115] Step 1-2-5, determine whether the pointer pCollMeterInfo is 0. If it is 0, it is determined that the current linked list CollMeterInfoList does not have a task node that meets the collection conditions, and enter the supplementary collection stage of step 2.
[0116] If it is not 0, then according to the udwMeterNOIndex value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo, take out a meter number from udwMeterNO[M], and then according to the udwMeterIDIndex value, take out an electric energy meter data item to be collected from udwMeterID[N], organize the meter reading frame to communicate with the corresponding electric energy meter, and obtain the electric energy meter data.
[0117] If the acquisition fails, store the current failed meter number in the supplementary collection file list, increase the udwMeterNOIndex value by 1, re-acquire the next meter number that needs to be collected, set the udwMeterIDIndex value to 0, and then go to step 1-2-6.
[0118] If the acquisition is successful, the acquired electric energy meter data is stored in the external storage unit, and the udwMeterIDIndex value is increased by 1, and then go to step 1-2-6.
[0119] Step 1-2-6, determine whether the udwMeterIDIndex value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo is valid. The valid standard is that the udwMeterIDIndex value is less than the number of elements in udwMeterID[N];
[0120] If valid, proceed to step 1-2-7;
[0121] If invalid, add 1 to the udwMeterNOIndex value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo to obtain the next electric energy meter serial number, and set the udwMeterIDIndex value to 0, and then go to step 1-2-7.
[0122] Step 1-2-7, determine whether the udwMeterNOIndex value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo is valid. The valid standard is that the udwMeterNOIndex value is less than the number of elements in udwMeterNO[M]. For example, there are 30 electric energy meter numbers that need to be collected in udwMeterNO[M]. If the value of udwMeterNOIndex is less than 30, it is considered valid, otherwise it is considered invalid.
[0123] If valid, proceed to step 1-2-2;
[0124] If invalid, judge the udwReMeterNO[M] value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo; if all element values in the array are invalid (the data value 0xFFFFFFFF can be set as an invalid value), it can be determined that all data items of all electric energy meters in the current task node have been collected, and change the ucRunStatus value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo to 0 (idle state), and then change the value of the pointer pCollMeterInfo to 0, and then enter step 1-2-2.
[0125] If the udwReMeterNO[M] value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo contains a valid data value, it is considered that the task node has an electric energy meter number that needs to be resampled, and the ucRunStatus value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo is changed to 3 (suspended state), and then the value of the pointer pCollMeterInfo is changed to 0, and then step 1-2-2 is entered.
[0126] Step 2: After all task nodes are traversed, according to the sequence number of the electric energy meter that failed to collect data, the supplementary collection operation is performed in the idle interval of the normal collection of electric energy meter data to improve the success rate of data collection of the electric energy meter; Figure 2 As shown, the suspended task is searched, and the electric energy meters are collected one by one, and the collected data is stored until the collection of all electric energy meters is completed, and then the running state of the task is changed to the idle state.
[0127] The specific process is as follows:
[0128] Step 2-1: In the linked list CollMeterInfoList, determine whether the task node whose running status ucRunStatus is 0 (idle state) meets the ready state again, as follows:
[0129] Step 2-1-1, obtain the current running time Time and all task nodes whose ucRunStatus value is 0 (idle state) in the linked list CollMeterInfoList, and extract the corresponding collection period udwPrd and the last execution time udwLastActTime according to the obtained task nodes; perform rounding operation on Time and udwPrd to obtain the result value udwCurActTime, that is, udwCurActTime = Time / udwPrd; then go to step 2-1-2.
[0130] Step 2-1-2, determine whether the udwCurActTime and udwLastActTime values of all task nodes in the linked list CollMeterInfoList are equal; if the udwLastActTime values of all task nodes in the linked list CollMeterInfoList are equal to their corresponding udwCurActTime values, it is considered that there is no collection item that meets the collection conditions again, and go to step 2-2;
[0131] If there are unequal task nodes, assign the udwCurActTime of the task node to udwLastActTime to make the two data values of the node equal; then change the value of ucRunStatus of the node to 1 (ready state), and then go to step 1-2-2.
[0132] Step 2-2, search for the first task node with a ucRunStatus value of 3 (suspended state) in the linked list CollMeterInfoList; if it does not exist, go to step 1-2-2; if it exists, determine whether the value of the pointer pCollMeterInfo of the currently running collection task is 0. If it is 0, the pointer pCollMeterInfo is deemed to be empty, and the pointer pCollMeterInfo points to the first task node with a ucRunStatus value of 3 (suspended state) in the linked list CollMeterInfoList, and change the ucRunStatus value of the task node to 5 (supplementary collection state), and then go to step 2-3; if it is not 0, go directly to step 2-3.
[0133] Step 2-3, according to the udwMeterNOIndex value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo, take out an electric energy meter serial number from udwReMeterNO[M], and then according to the udwMeterIDIndex value, take out an electric energy meter data item to be collected from udwMeterID[N], organize the meter reading frame to communicate with the corresponding electric energy meter, and obtain the electric energy meter data;
[0134] If the acquisition fails, add 1 to the udwMeterNOIndex value, re-acquire the next meter number to be collected, and set the udwMeterIDIndex value to 0, and then go to step 2-4;
[0135] If the acquisition is successful, the acquired electric energy meter data is stored in the external storage unit, and the udwMeterIDIndex value is increased by 1, and then go to step 2-4.
[0136] Step 2-4, determine whether the udwMeterIDIndex value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo is valid. The valid standard is that the udwMeterIDIndex value is less than the number of elements in udwMeterID[N]. For example, there are 20 electric energy meter data items that need to be collected in udwMeterID[N]. If the value of udwMeterIDIndex is less than 20, it is considered valid, otherwise it is considered invalid.
[0137] If valid, proceed to step 2-5;
[0138] If invalid, add 1 to the udwMeterNOIndex value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo to obtain the next electric energy meter serial number value, and set the udwMeterIDIndex value to 0, and then go to step 2-5.
[0139] Step 2-5, determine whether the udwMeterNOIndex value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo is valid. The validity standard is that the udwMeterNOIndex value is less than the number of elements in udwReMeterNO[M]. For example, there are 30 electric energy meter numbers that need to be collected in udwReMeterNO[M]. If the value of udwMeterNOIndex is less than 30, it is considered valid, otherwise it is considered invalid.
[0140] If it is effective, you need to continue to collect more samples and go to step 2-1;
[0141] If invalid, determine that all data items of all electricity meters in the current task node have been collected, change the ucRunStatus value in the task node corresponding to the linked list CollMeterInfoList pointed to by the pointer pCollMeterInfo to 0 (idle state), and then change the value of the pointer pCollMeterInfo to 0, and then enter step 2-1.
[0142] Since the Type II concentrator is an electronic product, each electronic product has a certain service life. When the service life is reached, it needs to be replaced and scrapped. When the product is scrapped, electronic waste will be generated, polluting the ecological environment. In particular, some electronic components contain toxic substances. In order to decompose these components, it is necessary to find a special organization to deal with them, which will incur additional processing costs and increase energy consumption. So. The type II concentrator photovoltaic power meter data collection method and system proposed in this embodiment reduces the use of type II concentrators while ensuring on-site business needs, and indirectly reduces the above-mentioned damage to the environment and energy consumption.
[0143] Example 2
[0144] This embodiment provides a type II concentrator photovoltaic power generation meter data acquisition system, including:
[0145] The acquisition module is configured to acquire data information of tasks actively reported by the type II concentrator and data information of tasks that can be collected, and determine the priority of each task, and the running state of each task at least includes a ready state, a running state, and a blocked state;
[0146] The first priority determination module is configured to switch the first ready state task to the running state as the initial task to be executed if there is no currently running task, and to use the initial task to be executed as the task to be executed if there is no blocked state task; if there is a blocked state task, determine the task to be executed according to the priority of the first blocked state task and the initial task to be executed;
[0147] The second priority determination module is configured to determine the initial task to be executed according to the priorities of the first ready task and the currently running task if there is currently a running task, and to use the initial task to be executed as the task to be executed if there is no blocked task; if there is a blocked task, determine the task to be executed according to the priorities of the first blocked task and the initial task to be executed;
[0148] The third priority determination module is configured to, if there is no ready task and no currently running task, use the first blocked task as the task to be executed; if there is no ready task and there is currently a running task, determine the task to be executed according to the priority of the first blocked task and the currently running task;
[0149] The collection and supplementary collection module is configured to collect the electric energy meter data for the task to be executed, to judge the validity of the collected electric energy meter data item content and the electric energy meter serial number, and to determine the electric energy meter serial number that failed to be collected until the node traversal is completed, and after the traversal is completed, to supplement the collection of the electric energy meter serial number that failed to be collected.
[0150] It should be noted that the above modules correspond to the steps described in Example 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.
[0151] In further embodiments, there is also provided:
[0152] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in Embodiment 1 is performed. For the sake of brevity, it will not be described in detail here.
[0153] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0154] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0155] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the method described in Example 1 is completed.
[0156] The method in Example 1 can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it is not described in detail here.
[0157] Those skilled in the art will appreciate that the units, i.e., algorithm steps, of the various examples described in conjunction with this embodiment can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0158] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to 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 collecting data from a type II concentrator photovoltaic power generation meter, characterized in that: include: Obtain data information of tasks actively reported by the Type II concentrator and data information of tasks that can be collected, and determine the priority of each task. The running state of each task includes at least ready state, running state and blocked state; If there is no task currently running, the first ready task is switched to the running state as the initial task to be executed, and if there is no blocked task, the initial task to be executed is used as the task to be executed; if there is a blocked task, the task to be executed is determined according to the priority of the first blocked task and the initial task to be executed; If there is a task currently running, the initial task to be executed is determined according to the priority of the first ready task and the currently running task, and if there is no blocked task, the initial task to be executed is used as the task to be executed; if there is a blocked task, the task to be executed is determined according to the priority of the first blocked task and the initial task to be executed; If there is no ready task and no currently running task, the first blocked task is used as the task to be executed; if there is no ready task and there is currently a running task, the task to be executed is determined according to the priority of the first blocked task and the currently running task; The electric energy meter data is collected for the task to be executed, the validity of the collected electric energy meter data items and the electric energy meter serial numbers is judged, and the electric energy meter serial numbers that failed to be collected are determined until the node traversal is completed. After the traversal is completed, the electric energy meter serial numbers that failed to be collected are re-collected.
2. A method for collecting data from a type II concentrator photovoltaic power generation meter as claimed in claim 1, characterized in that: The data information includes the reporting / collection cycle, the content of the reported / collected data item, the reported / collected electric energy meter serial number and the reported / collected data type; Or, after assigning node numbers to each task according to priority, a collection archive linked list is constructed; Or, the priority determination process includes: determining according to the collection cycle, the smaller the value of the collection cycle, the higher the priority; if the collection cycles are equal, determining according to the collection type, the smaller the value of the collection type, the higher the priority; if the values of the collection types are also equal, determining according to the subscript of the position of the task when acquiring data information, the smaller the subscript value, the higher the priority; Or, switch the running state of the task in the idle state, including: Get the current running time and idle tasks, extract the collection period and last execution time corresponding to the idle tasks, and perform rounding operation based on the current running time and collection period to obtain the result value; For tasks whose last execution time is not equal to the corresponding result value, the result value corresponding to the task is assigned to the last execution time, and the running state is switched to the ready state.
3. A method for collecting data from a type II concentrator photovoltaic power generation meter as claimed in claim 1, characterized in that: The process of determining the initial task to be executed according to the priority of the first ready task and the currently running task includes: Compare the node number of the currently running task with the node number of the first ready task; If the former is smaller than the latter, the priority of the currently running task is higher than the priority of the first ready task. At this time, the running status of the two tasks remains unchanged, and the currently running task is used as the initial task to be executed; If the former is greater than the latter, the priority of the first ready task is higher than the priority of the currently running task. At this time, the running state of the currently running task is switched to the blocked state, the running state of the first ready task is switched to the running state, and the first ready task is used as the initial task to be executed; Among them, the node serial number is: after determining the priority of each task, assign a node serial number to each task according to the priority.
4. A method for collecting data from a type II concentrator photovoltaic power generation meter as claimed in claim 1, characterized in that: The process of determining the task to be executed according to the priority of the first blocked task and the initial task to be executed, or determining the task to be executed according to the priority of the first blocked task and the currently running task includes: Compare the node number of the currently running task / initial task to be executed with the node number of the first blocked task; If the former is smaller than the latter, the priority of the currently running task / initial task to be executed is higher than the priority of the first blocked task. At this time, the running status of the two tasks remains unchanged, and the currently running task / initial task to be executed is used as the task to be executed. If the former is greater than the latter, the priority of the first blocked task is higher than the priority of the currently running task / initial task to be executed. At this time, the running state of the currently running task / initial task to be executed is switched to the blocked state, the running state of the first blocked task is switched to the running state, and the first blocked task is used as the task to be executed; Among them, the node serial number is: after determining the priority of each task, assign a node serial number to each task according to the priority.
5. A method for collecting data from a type II concentrator photovoltaic power generation meter as claimed in claim 1, characterized in that: The process of collecting data from electric energy meters and judging the validity of tasks to be performed includes: For each data item of each electric energy meter in the task to be executed, the serial number of the electric energy meter that failed to be collected is stored in the supplementary collection file link list, and the operation state is switched to the suspended state; The validity is judged based on the maximum number of collected data items and the maximum number of collected electric energy meters.
6. A method for collecting data from a type II concentrator photovoltaic power generation meter as claimed in claim 1, characterized in that: The replenishment process includes: The running state of the task where the number of the electric energy meter that failed to collect data belongs is suspended; If there is no supplementary collection task currently, the first suspended task is switched to the supplementary collection state for supplementary collection; if there is a supplementary collection task currently, the supplementary collection operation of the current task is continued.
7. A method for collecting data from a type II concentrator photovoltaic power generation meter as claimed in claim 6, characterized in that: The validity of the supplementary electric energy meter data items and the electric energy meter serial numbers is judged until all tasks are completed, and the running state of the corresponding task is changed to idle state.
8. A type II concentrator photovoltaic power generation meter data acquisition system, characterized in that: include: The acquisition module is configured to acquire data information of tasks actively reported by the type II concentrator and data information of tasks that can be collected, and determine the priority of each task, and the running state of each task at least includes a ready state, a running state, and a blocked state; The first priority determination module is configured to switch the first ready state task to the running state as the initial task to be executed if there is no currently running task, and to use the initial task to be executed as the task to be executed if there is no blocked state task; if there is a blocked state task, determine the task to be executed according to the priority of the first blocked state task and the initial task to be executed; The second priority determination module is configured to determine the initial task to be executed according to the priorities of the first ready task and the currently running task if there is currently a running task, and to use the initial task to be executed as the task to be executed if there is no blocked task; if there is a blocked task, determine the task to be executed according to the priorities of the first blocked task and the initial task to be executed; The third priority determination module is configured to, if there is no ready task and no currently running task, use the first blocked task as the task to be executed; if there is no ready task and there is currently a running task, determine the task to be executed according to the priority of the first blocked task and the currently running task; The collection and supplementary collection module is configured to collect the electric energy meter data for the task to be executed, to judge the validity of the collected electric energy meter data item content and the electric energy meter serial number, and to determine the electric energy meter serial number that failed to be collected until the node traversal is completed, and after the traversal is completed, to supplement the collection of the electric energy meter serial number that failed to be collected.
9. An electronic device, characterized in that: The method comprises a memory and a processor and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method according to any one of claims 1 to 7 is completed.
10. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the method described in any one of claims 1 to 7.
