A smart meter data scheduling method and device based on buffer zone
By introducing a buffer position rotation mechanism in smart meters, the resource occupation problem in smart meter data scheduling is solved, real-time priority reading of important data and instant collection of burst data are achieved, and the flexibility and efficiency of data collection are improved.
Patent Information
- Application Number
- CN202410974011.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-07-19
AI Technical Summary
When facing sudden data demands, the existing smart meter data scheduling strategy easily causes buffer resources to be occupied by fixed data items, resulting in the inability to obtain other important data in a timely manner and low collection efficiency.
A buffer-based smart meter data scheduling method is adopted, and the buffer position rotation mechanism is used to achieve real-time priority reading and flexible rotation update of important data, ensuring the instant collection of emergency data.
It realizes the flexible and rapid collection of smart meter data, which not only ensures the real-time priority reading of important data, but also replaces old data in time when the buffer pool is full, meeting diverse data needs.
Smart Images

Figure CN119011623B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart meters, and in particular to a smart meter data scheduling method and device based on a buffer zone. Background Art
[0002] With the construction of new power systems, low-voltage grids, as the last mile connecting loads and renewable energy, urgently need to improve the intelligence of their equipment. Consequently, smart meters are undergoing an upgrade from traditional electricity metering to edge intelligent devices. The volume and type of data generated by the new generation of meters will experience explosive growth. Current traditional centralized meter reading systems utilize fixed reading modes and collection queues. These new data collection methods require operators to configure the collection concentrator based on their experience. These systems do not support dynamic scheduling of data queues, making them unsuitable for the rich edge data generated by new meters.
[0003] The current smart meter scheduling strategy is based on access counts, which works well in scenarios where "the more frequently the data has been accessed, the more important it is and the more it should be collected next time." However, in other application scenarios, scheduling strategies based on access counts may lead to "starvation" because the limited data buffer pool space may be occupied by a few fixed data items for a long time. These data are constantly being accessed, so the access count continues to increase. As a result, other important data items with sudden demand cannot be directly obtained from the buffer. They must be collected immediately through the concentrator every time, resulting in low efficiency. Summary of the Invention
[0004] The present invention provides a smart meter data scheduling method and device based on a buffer zone, which not only realizes the real-time priority reading of important data, but also ensures the flexible rotation update of the buffer zone position to support the real-time collection requirements of burst data, thereby improving the flexibility of smart meter data collection.
[0005] In order to solve the above technical problems, the present invention provides a smart meter data scheduling method based on a buffer zone, comprising:
[0006] When a buffer position rotation signal is received, the buffer position rotation is started, and in the rotation area of the buffer, the rotation initial position and rotation order are obtained according to the rotation pointer;
[0007] Determine the rotation initial position as the current position to be measured, perform rotation judgment on the positions of each buffer zone in the rotation area according to the rotation sequence, and obtain a buffer zone replacement position;
[0008] Starting the concentrator and using the buffer to replace the position to obtain the data to be collected;
[0009] The rotation determination of the buffer positions in the rotation area according to the rotation order to obtain the buffer replacement position is specifically:
[0010] Determine whether the access bit value of the data corresponding to the current position to be tested is 0;
[0011] If the access bit value of the data corresponding to the current position to be tested is non-zero, the access bit value of the data corresponding to the current position to be tested is set to 0, and the next buffer position is determined as the current position to be tested according to the rotation sequence, and a rotation judgment is performed;
[0012] If the access bit value of the data corresponding to the current position to be tested is 0, it is determined that the current position to be tested is a buffer replacement position.
[0013] Furthermore, the triggering process of the buffer position rotation signal is specifically as follows:
[0014] When receiving the meter data acquisition signal, obtaining the data item name of each data to be collected by parsing the meter data acquisition signal;
[0015] According to the name of each data item to be collected, it is determined whether all the data to be collected can be obtained in the buffer zone; wherein the buffer zone includes a priority area and a rotation area;
[0016] When all the data to be collected can be obtained in the buffer, each data to be collected is obtained in the buffer according to the data item name of the data to be collected;
[0017] When there is data in the data to be collected that cannot be obtained from the buffer, determining whether there is an idle position in the buffer;
[0018] When there is an idle position in the buffer, the concentrator is started to collect the data to be collected in combination with the idle position in the buffer;
[0019] When there is no free position in the buffer, a buffer position rotation signal is sent.
[0020] Furthermore, when all the data to be collected can be obtained in the buffer, each data to be collected is obtained in the buffer according to the data item name of the data to be collected, specifically:
[0021] Obtain the corresponding data to be collected in the priority area of the buffer according to the data item name of each data to be collected;
[0022] According to the data item name of each data to be collected, the corresponding data to be collected is obtained in the rotation area of the buffer, and the access bit value of the data to be collected obtained in the rotation area is set to 1.
[0023] Furthermore, when there is an idle position in the buffer, the concentrator is started to collect the data to be collected in combination with the idle position in the buffer, specifically:
[0024] Get the location information of the free position of the buffer;
[0025] Writing the position information of the free position in the buffer into the storage position corresponding to the data to be collected;
[0026] The concentrator is started to collect the data to be collected, the collected data to be collected is stored in the free position of the buffer, and the access bit value of the collected data to be collected is set to 1.
[0027] Furthermore, the priority areas of the buffer zone are specifically:
[0028] According to the preset priority data list, the concentrator is started to collect the priority data in the priority data list in real time;
[0029] The collected priority data is stored in the priority area of the buffer, and the priority option of the priority data is set to 1.
[0030] Furthermore, the buffer position rotation is started, and in the rotation area of the buffer, the rotation initial position and rotation order are obtained according to the rotation pointer, specifically:
[0031] Determine whether the current buffer position rotation is the first rotation;
[0032] If the current buffer position rotation is the first rotation, the random generation function is used to generate the initial rotation position;
[0033] If the current buffer position rotation is not the first rotation, the position stored in the rotation pointer is incremented by 1 to serve as the initial position of the rotation; wherein the position stored in the rotation pointer is the end position of the previous rotation.
[0034] Furthermore, the starting concentrator uses the buffer to replace the position to obtain the data to be collected, specifically:
[0035] Get the location information of the buffer replacement position;
[0036] Clearing the storage location corresponding to the data at the replacement position in the buffer, and writing the location information of the replacement position in the buffer into the storage location corresponding to the data to be collected;
[0037] The buffer zone is used to replace the position, and the concentrator is started to collect the data to be collected, and the access bit value of the data to be collected obtained in the rotation area is set to 1.
[0038] The present invention provides a buffer-based smart meter data scheduling method. Upon receiving a meter data acquisition signal, the method acquires data to be acquired in the priority and rotation areas of the buffer. If data to be acquired exists that cannot be acquired in the buffer, the method immediately acquires data using the buffer's idle and replacement positions. The buffer replacement position is determined by initiating buffer position rotation and performing a rotation determination on each buffer position in the rotation area of the buffer. The rotation determination is based on the access bit value of the data stored in the buffer position. The present invention implements pre-buffering and priority acquisition of smart meter data, ensuring real-time priority reading of important data. Furthermore, when new burst data is required and the buffer pool is full, the method promptly finds a suitable buffer position to allow new data items to replace old data items. Flexible rotation and updating of buffer positions ensures flexible and rapid acquisition of smart meter data.
[0039] Accordingly, the present invention provides a smart meter data scheduling device based on a buffer zone, comprising: a rotation trigger module, a rotation judgment module and a data acquisition module;
[0040] The rotation trigger module is used to start the buffer position rotation when receiving the buffer position rotation signal, and obtain the rotation initial position and rotation order according to the rotation pointer in the rotation area of the buffer;
[0041] The rotation judgment module is used to determine the rotation initial position as the current position to be tested, and perform rotation judgment on the positions of each buffer in the rotation area according to the rotation sequence to obtain a buffer replacement position;
[0042] The data acquisition module is used to start the concentrator and use the buffer to replace the position to obtain the data to be collected;
[0043] Wherein, the data acquisition module includes an access bit value judgment unit, a first judgment result unit and a second judgment result unit;
[0044] The access bit value judgment unit is used to judge whether the access bit value of the data corresponding to the current position to be tested is 0;
[0045] The first judgment result unit is configured to set the access bit value of the data corresponding to the current position to be tested to 0 if the access bit value of the data corresponding to the current position to be tested is non-zero, determine the next buffer position as the current position to be tested according to the rotation sequence, and perform a rotation judgment;
[0046] The second judgment result unit is configured to determine that the current position to be tested is a buffer replacement position if the access bit value of the data corresponding to the current position to be tested is 0.
[0047] Furthermore, the triggering process of the buffer position rotation signal is specifically as follows:
[0048] When receiving the meter data acquisition signal, obtaining the data item name of each data to be collected by parsing the meter data acquisition signal;
[0049] According to the name of each data item to be collected, it is determined whether all the data to be collected can be obtained in the buffer zone; wherein the buffer zone includes a priority area and a rotation area;
[0050] When all the data to be collected can be obtained in the buffer, each data to be collected is obtained in the buffer according to the data item name of the data to be collected;
[0051] When there is data in the data to be collected that cannot be obtained from the buffer, determining whether there is an idle position in the buffer;
[0052] When there is an idle position in the buffer, the concentrator is started to collect the data to be collected in combination with the idle position in the buffer;
[0053] When there is no free position in the buffer, a buffer position rotation signal is sent.
[0054] Furthermore, the rotation triggering module includes a first rotation determining unit, a first position generating unit and a second position generating unit;
[0055] The judging unit is used to judge whether the current buffer zone position rotation is the first rotation;
[0056] The first position generating unit is configured to generate an initial position of the rotation using a random generation function if the current buffer position rotation is the first rotation;
[0057] The second position generating unit is configured to add 1 to the position stored in the rotation pointer as the initial position of the rotation if the current buffer position rotation is not the first rotation; wherein the position stored in the rotation pointer is the end position of the previous rotation.
[0058] The present invention provides a buffer-based smart meter data scheduling device. Based on the organic integration of modules, upon receiving a meter data acquisition signal, the device acquires data to be acquired in the priority area and rotation area of the buffer. If there is data to be acquired that cannot be acquired in the buffer, the device immediately acquires data using the buffer's idle position and buffer replacement position. The buffer replacement position is determined by initiating buffer position rotation and performing a rotation judgment on each buffer position in the buffer's rotation area. The object of the rotation judgment is the access bit value of the data stored in the buffer position. The present invention implements advance buffering and priority acquisition of smart meter data, ensuring real-time priority reading of important data. Furthermore, when new burst data is required and the buffer pool is full, the device promptly finds a suitable buffer position to allow new data items to replace old data items. Flexible rotation and updating of buffer positions ensures flexible and rapid acquisition of smart meter data. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 A flow chart of an embodiment of a buffer-based smart meter data scheduling method provided by the present invention;
[0060] Figure 2 A schematic structural diagram of an embodiment of a buffer zone provided by the present invention;
[0061] Figure 3 A schematic structural diagram of an embodiment of the buffer data provided by the present invention;
[0062] Figure 4 A schematic diagram of an embodiment of a buffer zone position rotation method provided by the present invention;
[0063] Figure 5 A flow chart of another embodiment of the buffer-based smart meter data scheduling method provided by the present invention;
[0064] Figure 6 This is a structural diagram of an embodiment of a buffer-based smart meter data scheduling device provided by the present invention. DETAILED DESCRIPTION
[0065] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0066] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0067] The following embodiments of the present invention are described in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.
[0068] Example 1
[0069] See also Figure 1 , is a flow chart of an embodiment of a buffer-based smart meter data scheduling method provided by the present invention. The method includes steps 101 to 103, each of which is specifically as follows:
[0070] Step 101: When a buffer position rotation signal is received, the buffer position rotation is started, and in the rotation area of the buffer, the rotation initial position and the rotation sequence are obtained according to the rotation pointer.
[0071] Furthermore, in the first embodiment of the present invention, the triggering process of the buffer position rotation signal is specifically as follows:
[0072] When receiving the meter data acquisition signal, obtaining the data item name of each data to be collected by parsing the meter data acquisition signal;
[0073] According to the name of each data item to be collected, it is determined whether all the data to be collected can be obtained in the buffer zone; wherein the buffer zone includes a priority area and a rotation area;
[0074] When all the data to be collected can be obtained in the buffer, each data to be collected is obtained in the buffer according to the data item name of the data to be collected;
[0075] When there is data in the data to be collected that cannot be obtained from the buffer, determining whether there is an idle position in the buffer;
[0076] When there is an idle position in the buffer, the concentrator is started to collect the data to be collected in combination with the idle position in the buffer;
[0077] When there is no free position in the buffer, a buffer position rotation signal is sent.
[0078] Furthermore, in the first embodiment of the present invention, when all the data to be collected can be obtained in the buffer, each data to be collected is obtained in the buffer according to the data item name of the data to be collected, specifically:
[0079] Obtain the corresponding data to be collected in the priority area of the buffer according to the data item name of each data to be collected;
[0080] According to the data item name of each data to be collected, the corresponding data to be collected is obtained in the rotation area of the buffer, and the access bit value of the data to be collected obtained in the rotation area is set to 1.
[0081] Furthermore, in the first embodiment of the present invention, when there is an idle position in the buffer, the concentrator is started to collect the data to be collected in combination with the idle position in the buffer, specifically:
[0082] Get the location information of the free position of the buffer;
[0083] Writing the position information of the free position in the buffer into the storage position corresponding to the data to be collected;
[0084] The concentrator is started to collect the data to be collected, the collected data to be collected is stored in the free position of the buffer, and the access bit value of the collected data to be collected is set to 1.
[0085] In the first embodiment of the present invention, see Figure 2 , is a schematic diagram of the structure of an embodiment of the buffer provided by the present invention, the buffer includes two parts: the priority area and the rotation area. The priority area is reserved for data with a priority option of 1, and the rotation area is reserved for data with frequent changes in collection requirements in different application scenarios. Figure 3 , is a structural diagram of an embodiment of the buffer data provided by the present invention. The buffer data stored in the buffer contains data information such as data item number, priority option, access bit and storage address.
[0086] Furthermore, in the first embodiment of the present invention, the priority areas of the buffer zone are specifically:
[0087] According to the preset priority data list, the concentrator is started to collect the priority data in the priority data list in real time;
[0088] The collected priority data is stored in the priority area of the buffer, and the priority option of the priority data is set to 1.
[0089] In the first embodiment of the present invention, the collected data of the electric meter contains data whose collection rate must be guaranteed every day, such as electricity consumption data. This type of data requires priority for local storage. Therefore, this type of data is stored in a priority area of the data buffer. By setting the priority option of this type of data to 1, it can be associated with the hit item of the data table. Since the number of locations in the priority area is limited and setting priority options for data is a relatively fixed action, priority data can be manually pre-set regularly based on important application scenarios. When the priority option of data is set to 1, the data is stored in the priority area of the buffer, and the buffer location of the priority area does not participate in the buffer location rotation. However, the collected data of the electric meter also contains another part of the data that is not collected on a fixed basis every day. Instead, it has flexible collection requirements based on different application scenarios, and many of them are sudden data requirements, such as the subsequent data collection and analysis requirements triggered by a sudden alarm. In this case, the collected data is stored in the rotation area of the buffer.
[0090] In a first embodiment of the present invention, when the master station initiates a new round of meter data collection for the concentrator, it analyzes the meter data collection signal to obtain the data item name of each data item to be collected and determines whether any data item to be collected is not present in the buffer, i.e., it was not collected and placed in the buffer during the previous idle time buffer data advance collection. If it is determined that all data can be collected through the buffer, the master station first obtains data from the priority area based on the data item name of each data item to be collected, and then obtains the corresponding data from the rotation area. After successful data acquisition, the access bit values of all the data items to be collected in the rotation area are set to 1. If it is determined that any data item to be collected cannot be collected through the buffer, it determines whether there is an idle position in the buffer at this time. If the idle position in the buffer is not full, the concentrator is activated for immediate collection, and the data item to be collected that could not be collected in the buffer is collected and placed in the idle position in the buffer, with the access bit value set to 1. If the idle position in the buffer pool is full, a buffer position rotation signal is issued to initiate data buffer position rotation.
[0091] Furthermore, in the first embodiment of the present invention, the buffer position rotation is enabled, and in the rotation area of the buffer, the rotation initial position and rotation order are obtained according to the rotation pointer, specifically:
[0092] Determine whether the current buffer position rotation is the first rotation;
[0093] If the current buffer position rotation is the first rotation, the random generation function is used to generate the initial rotation position;
[0094] If the current buffer position rotation is not the first rotation, the position stored in the rotation pointer is incremented by 1 to serve as the initial position of the rotation; wherein the position stored in the rotation pointer is the end position of the previous rotation.
[0095] In the first embodiment of the present invention, see Figure 4 , is a schematic diagram of an embodiment of the buffer position rotation method provided by the present invention. When performing buffer position rotation, the access bit, storage location, and rotation pointer need to cooperate with each other. When a buffer position rotation signal is received, it is determined whether the current buffer position rotation is the first rotation based on the value of the rotation pointer. If the value of the rotation pointer is 0, it is determined that this rotation is the first rotation. A value is generated within the address range of the buffer rotation area using a random generation function, and this value is used as the rotation initial position of this rotation. If the value of the rotation pointer is not 0, it is determined that this rotation is not the first rotation. At this time, the rotation pointer stores the end position of the previous rotation. Therefore, the value of the rotation pointer is increased by 1, and the next sequential position after the end position of the previous rotation is used as the rotation initial position of this rotation.
[0096] Step 102: Determine the rotation initial position as the current position to be measured, perform rotation judgment on the positions of each buffer in the rotation area according to the rotation sequence, and obtain a buffer replacement position.
[0097] Wherein, step 102 includes steps 201 to 203, specifically:
[0098] Step 201: Determine whether the access bit value of the data corresponding to the current position to be tested is 0.
[0099] Step 202: If the access bit value of the data corresponding to the current position to be tested is non-zero, the access bit value of the data corresponding to the current position to be tested is set to 0, and the next buffer position is determined as the current position to be tested according to the rotation sequence, and a rotation judgment is performed.
[0100] Step 203: If the access bit value of the data corresponding to the current position to be tested is 0, it is determined that the current position to be tested is a buffer replacement position.
[0101] In the first embodiment of the present invention, starting from the initial rotation position, the positions in the rotation area of the buffer are sequentially rotated and judged in accordance with the rotation order. Specifically, it is judged whether the access bit value of the data stored in the current position to be tested is 0. If it is not 0, it indicates that the data at this position has just been accessed by the master station during the previous round of acquisition. Therefore, the data at this position is not suitable for replacement. The access bit value of the data is set to 0, and then the rotation judgment is continued for the next buffer position in the rotation order. If the access bit value of the data stored in the current position to be tested is 0, it indicates that the data at this position has not been accessed by the master station during the previous round of acquisition. Therefore, the data at this position can be replaced and the position can be determined as the buffer replacement position.
[0102] Step 103: Start the concentrator and use the buffer to replace the position to obtain the data to be collected;
[0103] Furthermore, in the first embodiment of the present invention, the concentrator is started and the data to be collected is obtained by replacing the position in the buffer, specifically:
[0104] Get the location information of the buffer replacement position;
[0105] Clearing the storage location corresponding to the data at the replacement position in the buffer, and writing the location information of the replacement position in the buffer into the storage location corresponding to the data to be collected;
[0106] The buffer zone is used to replace the position, and the concentrator is started to collect the data to be collected, and the access bit value of the data to be collected obtained in the rotation area is set to 1.
[0107] In the first embodiment of the present invention, after the buffer replacement position is determined, centralized instant collection is started, and the position information of the buffer replacement position is filled in the "storage location" of the data to be collected, and at the same time, the "storage location" of the old data stored at this position is cleared, so that the data to be collected is stored in the buffer replacement position.
[0108] As an example of the first embodiment of the present invention, see Figure 5, a flow chart of another embodiment of the buffer-based smart meter data scheduling method provided by the present invention. When a new round of master station data collection is initiated, it is first determined whether all newly collected data items can be acquired in the buffer. If all can be acquired, the data is acquired in the buffer and the access position of the acquired data is set to 1. If there are new data items that cannot be acquired in the buffer, a determination is made regarding available buffer locations. If available, the concentrator is initiated to immediately acquire the new data items and acquire them in the buffer's available locations, allowing the master station to acquire the data in the buffer. If no available buffer locations exist, buffer position rotation is initiated. The rotation mechanism of the present invention is as follows: the access bit value of the data stored in the buffer rotation area is initially 0. When the data item is accessed once by the master station, the access bit value of the data is changed to 1. Then, in each new round of data collection, if a new data item needs to be acquired and the buffer is full, a rotation mechanism based on the access bit is initiated, and the rotation start position P is determined using a rotation pointer. The rotation start position P is a random position in the first round of rotation and the position after the end position of the previous round in non-first rounds of rotation. Based on the rotation start position P pointed to by the rotation pointer, the access bit value of the data item at this position is determined to be 0 or 1. If it is 1, indicating that the data was just accessed by the master in the previous round and is not suitable for replacement, the access bit is set to 0. The pointer then points to the next buffer position (P+1) in sequence, and continues until a position with an access bit value of 0 is found, indicating that the position was not accessed by the master in the previous round. The probability of access in this round is relatively low, and the position can be replaced with a new data item. This determines the buffer replacement position, and the rotation ends. After the buffer replacement position is determined, the concentrator initiates immediate collection and collects the new data item into the buffer replacement position, allowing the master to obtain the data from the buffer. Therefore, the master obtains data from the concentrator in two steps. The first step is buffer acquisition. When all new data items to be collected are present in the buffer, the master can directly obtain them from the buffer. The second step is immediate collection. When all new data items to be collected cannot be obtained from the buffer, immediate collection is enabled, and the concentrator uses the free positions in the rotation area of the buffer or the buffer replacement position to immediately collect the corresponding data. After the current round of master station collection ends and the next round of master station collection begins, during the idle time, the concentrator will collect buffer data in advance to prepare for the next round of master station collection.
[0109] In summary, the first embodiment of the present invention provides a buffer-based smart meter data scheduling method. Upon receiving a meter data acquisition signal, the method acquires data to be acquired in the priority area and rotation area of the buffer. If there is data to be acquired that cannot be acquired in the buffer, the method immediately acquires data using the buffer's idle positions and buffer replacement positions. The buffer replacement position is determined by initiating buffer position rotation and performing a rotation judgment on each buffer position in the rotation area of the buffer. The rotation judgment is based on the access bit value of the data stored in the buffer position. The present invention implements pre-buffering and priority acquisition of smart meter data, ensuring real-time priority reading of important data. Furthermore, when new burst data is required and the buffer pool is full, the method promptly finds a suitable buffer location to replace the old data item with the new data item. Flexible rotation and updating of buffer positions ensures flexible and rapid data acquisition requirements for smart meters.
[0110] Example 2
[0111] See also Figure 6 , is a structural diagram of an embodiment of a smart meter data scheduling device based on a buffer zone provided by the present invention, the device includes a rotation trigger module 301, a rotation determination module 302 and a data acquisition module 303;
[0112] The rotation trigger module 301 is used to start the buffer position rotation when receiving the buffer position rotation signal, and obtain the rotation initial position and rotation order according to the rotation pointer in the rotation area of the buffer;
[0113] The rotation determination module 302 is configured to determine the rotation initial position as the current position to be measured, perform rotation determination on the positions of the buffer zones in the rotation area according to the rotation sequence, and obtain a buffer zone replacement position;
[0114] The data acquisition module 303 is used to start the concentrator and use the buffer to replace the position to obtain the data to be collected;
[0115] The rotation determination module 302 includes an access bit value determination unit 401, a first determination result unit 402 and a second determination result unit 403;
[0116] The access bit value judgment unit 401 is used to judge whether the access bit value of the data corresponding to the current position to be tested is 0;
[0117] The first judgment result unit 402 is configured to set the access bit value of the data corresponding to the current position to be tested to 0 if the access bit value of the data corresponding to the current position to be tested is non-zero, determine the next buffer position as the current position to be tested according to the rotation sequence, and perform a rotation judgment;
[0118] The second judgment result unit 403 is configured to determine that the current position to be tested is a buffer replacement position if the access bit value of the data corresponding to the current position to be tested is 0.
[0119] Furthermore, in the second embodiment of the present invention, the triggering process of the buffer position rotation signal is specifically as follows:
[0120] When receiving the meter data acquisition signal, obtaining the data item name of each data to be collected by parsing the meter data acquisition signal;
[0121] According to the name of each data item to be collected, it is determined whether all the data to be collected can be obtained in the buffer zone; wherein the buffer zone includes a priority area and a rotation area;
[0122] When all the data to be collected can be obtained in the buffer, each data to be collected is obtained in the buffer according to the data item name of the data to be collected;
[0123] When there is data in the data to be collected that cannot be obtained from the buffer, determining whether there is an idle position in the buffer;
[0124] When there is an idle position in the buffer, the concentrator is started to collect the data to be collected in combination with the idle position in the buffer;
[0125] When there is no free position in the buffer, a buffer position rotation signal is sent.
[0126] Furthermore, in the second embodiment of the present invention, the rotation triggering module 301 includes a first rotation determination unit, a first position generating unit, and a second position generating unit;
[0127] The judging unit is used to judge whether the current buffer position rotation is the first rotation;
[0128] The first position generating unit is configured to generate an initial position of the rotation by using a random generation function if the current buffer position rotation is the first rotation;
[0129] The second position generating unit is configured to add 1 to the position stored in the rotation pointer as the initial position of the rotation if the current buffer position rotation is not the first rotation; wherein the position stored in the rotation pointer is the end position of the previous rotation.
[0130] Furthermore, in a second embodiment of the present invention, the concentrator is started and the buffer is used to replace the position to obtain the data to be collected, specifically:
[0131] Get the location information of the buffer replacement position;
[0132] Clearing the storage location corresponding to the data at the replacement position in the buffer, and writing the location information of the replacement position in the buffer into the storage location corresponding to the data to be collected;
[0133] The buffer zone is used to replace the position, and the concentrator is started to collect the data to be collected, and the access bit value of the data to be collected obtained in the rotation area is set to 1.
[0134] Furthermore, in the second embodiment of the present invention, when all the data to be collected can be obtained in the buffer, each data to be collected is obtained in the buffer according to the data item name of the data to be collected, specifically:
[0135] Obtain the corresponding data to be collected in the priority area of the buffer according to the data item name of each data to be collected;
[0136] According to the data item name of each data to be collected, the corresponding data to be collected is obtained in the rotation area of the buffer, and the access bit value of the data to be collected obtained in the rotation area is set to 1.
[0137] Furthermore, in the second embodiment of the present invention, when there is an idle position in the buffer, the concentrator is started to collect the data to be collected in combination with the idle position in the buffer, specifically:
[0138] Get the location information of the free position of the buffer;
[0139] Writing the position information of the free position in the buffer into the storage position corresponding to the data to be collected;
[0140] The concentrator is started to collect the data to be collected, the collected data to be collected is stored in the free position of the buffer, and the access bit value of the collected data to be collected is set to 1.
[0141] Furthermore, in the second embodiment of the present invention, the priority areas of the buffer zone are specifically:
[0142] According to the preset priority data list, the concentrator is started to collect the priority data in the priority data list in real time;
[0143] The collected priority data is stored in the priority area of the buffer, and the priority option of the priority data is set to 1.
[0144] In summary, the second embodiment of the present invention provides a buffer-based smart meter data scheduling device based on the organic integration of modules. Upon receiving a meter data acquisition signal, the device acquires data to be acquired in the priority area and rotation area of the buffer. If there is data to be acquired that cannot be acquired in the buffer, the device immediately acquires data using the buffer's idle position and buffer replacement position. The buffer replacement position is determined by initiating buffer position rotation and performing a rotation judgment on each buffer position in the rotation area of the buffer. The object of the rotation judgment is the access bit value of the data stored in the buffer position. The present invention implements pre-buffering and priority acquisition of smart meter data, ensuring real-time priority reading of important data. At the same time, when there is a new burst data demand and the buffer pool is full, the device can promptly find a suitable buffer position to replace the old data item with the new data item. By flexibly rotating and updating the buffer position, the flexible and rapid acquisition requirements of smart meter data are guaranteed.
[0145] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A smart meter data scheduling method based on a buffer zone, characterized in that: include: When a buffer position rotation signal is received, the buffer position rotation is started, and in the rotation area of the buffer, the rotation initial position and rotation order are obtained according to the rotation pointer; Determine the rotation initial position as the current position to be measured, perform rotation judgment on the positions of each buffer zone in the rotation area according to the rotation sequence, and obtain a buffer zone replacement position; Starting the concentrator and using the buffer to replace the position to obtain the data to be collected; The rotation determination of the buffer positions in the rotation area according to the rotation order to obtain the buffer replacement position is specifically: Determine whether the access bit value of the data corresponding to the current position to be tested is 0; If the access bit value of the data corresponding to the current position to be tested is non-zero, the access bit value of the data corresponding to the current position to be tested is set to 0, and the next buffer position is determined as the current position to be tested according to the rotation sequence, and a rotation judgment is performed; If the access bit value of the data corresponding to the current position to be tested is 0, then the current position to be tested is determined to be a buffer replacement position; The triggering process of the buffer position rotation signal is specifically as follows: When receiving the meter data acquisition signal, obtaining the data item name of each data to be collected by parsing the meter data acquisition signal; According to the name of each data item to be collected, it is determined whether all the data to be collected can be obtained in the buffer zone; wherein the buffer zone includes a priority area and a rotation area; When all the data to be collected can be obtained in the buffer, each data to be collected is obtained in the buffer according to the data item name of the data to be collected; When there is data in the data to be collected that cannot be obtained from the buffer, determining whether there is an idle position in the buffer; When there is an idle position in the buffer, the concentrator is started to collect the data to be collected in combination with the idle position in the buffer; When there is no free position in the buffer, a buffer position rotation signal is sent.
2. The buffer-based smart meter data scheduling method according to claim 1, characterized in that: When all the data to be collected can be obtained in the buffer, each data to be collected is obtained in the buffer according to the data item name of the data to be collected, specifically: Obtain the corresponding data to be collected in the priority area of the buffer according to the data item name of each data to be collected; According to the data item name of each data to be collected, the corresponding data to be collected is obtained in the rotation area of the buffer, and the access bit value of the data to be collected obtained in the rotation area is set to 1.
3. The buffer-based smart meter data scheduling method according to claim 1, characterized in that: When there is an idle position in the buffer, the concentrator is started to collect the data to be collected in combination with the idle position in the buffer, specifically: Get the location information of the free position of the buffer; Writing the position information of the free position in the buffer into the storage position corresponding to the data to be collected; The concentrator is started to collect the data to be collected, the collected data to be collected is stored in the free position of the buffer, and the access bit value of the collected data to be collected is set to 1.
4. The buffer-based smart meter data scheduling method according to claim 2, characterized in that: The priority areas of the buffer zone are specifically: According to the preset priority data list, the concentrator is started to collect the priority data in the priority data list in real time; The collected priority data is stored in the priority area of the buffer, and the priority option of the priority data is set to 1.
5. The buffer-based smart meter data scheduling method according to any one of claims 1 to 4, characterized in that: The buffer position rotation is started. In the rotation area of the buffer, the initial rotation position and the rotation order are obtained according to the rotation pointer. Specifically, Determine whether the current buffer position rotation is the first rotation; If the current buffer position rotation is the first rotation, the random generation function is used to generate the initial rotation position; If the current buffer position rotation is not the first rotation, the position stored in the rotation pointer is incremented by 1 to serve as the initial position of the rotation; wherein the position stored in the rotation pointer is the end position of the previous rotation.
6. The buffer-based smart meter data scheduling method according to any one of claims 1 to 4, characterized in that: The starting concentrator uses the buffer to replace the position to obtain the data to be collected, specifically: Get the location information of the buffer replacement position; Clearing the storage location corresponding to the data at the replacement position in the buffer, and writing the location information of the replacement position in the buffer into the storage location corresponding to the data to be collected; The buffer zone is used to replace the position, and the concentrator is started to collect the data to be collected, and the access bit value of the data to be collected obtained in the rotation area is set to 1.
7. A smart meter data scheduling device based on a buffer zone, characterized in that: include: Rotation trigger module, rotation judgment module and data acquisition module; The rotation trigger module is used to start the buffer position rotation when receiving the buffer position rotation signal, and obtain the rotation initial position and rotation order according to the rotation pointer in the rotation area of the buffer; The rotation judgment module is used to determine the rotation initial position as the current position to be tested, and perform rotation judgment on the positions of each buffer in the rotation area according to the rotation sequence to obtain a buffer replacement position; The data acquisition module is used to start the concentrator and use the buffer to replace the position to obtain the data to be collected; Wherein, the data acquisition module includes an access bit value judgment unit, a first judgment result unit and a second judgment result unit; The access bit value judgment unit is used to judge whether the access bit value of the data corresponding to the current position to be tested is 0; The first judgment result unit is configured to set the access bit value of the data corresponding to the current position to be tested to 0 if the access bit value of the data corresponding to the current position to be tested is non-zero, determine the next buffer position as the current position to be tested according to the rotation sequence, and perform a rotation judgment; The second judgment result unit is configured to determine that the current position to be tested is a buffer replacement position if the access bit value of the data corresponding to the current position to be tested is 0; The triggering process of the buffer position rotation signal is specifically as follows: When receiving the meter data acquisition signal, obtaining the data item name of each data to be collected by parsing the meter data acquisition signal; According to the name of each data item to be collected, it is determined whether all the data to be collected can be obtained in the buffer zone; wherein the buffer zone includes a priority area and a rotation area; When all the data to be collected can be obtained in the buffer, each data to be collected is obtained in the buffer according to the data item name of the data to be collected; When there is data in the data to be collected that cannot be obtained from the buffer, determining whether there is an idle position in the buffer; When there is an idle position in the buffer, the concentrator is started to collect the data to be collected in combination with the idle position in the buffer; When there is no free position in the buffer, a buffer position rotation signal is sent.
8. The buffer-based smart meter data dispatching device according to claim 7, characterized in that: The rotation trigger module includes a first rotation judgment unit, a first position generation unit and a second position generation unit; The judging unit is used to judge whether the current buffer zone position rotation is the first rotation; The first position generating unit is configured to generate an initial position of the rotation using a random generation function if the current buffer position rotation is the first rotation; The second position generating unit is configured to add 1 to the position stored in the rotation pointer as the initial position of the rotation if the current buffer position rotation is not the first rotation; wherein the position stored in the rotation pointer is the end position of the previous rotation.
Citation Information
Patent Citations
Shared buffer memory controller
CA2254013A1
Centralized scheduling controller for intelligent multi buffer management and dynamic scheduting method
CN101026540A