Power data acquisition method and device, electronic equipment and readable storage medium
By obtaining the acquisition marks of the historical acquisition cycle and performing data supplementary acquisition, the real-time and completeness of data acquisition problems of existing power data acquisition solutions when the scale of the station area is large, achieving more efficient data acquisition and more accurate power consumption statistics.
Patent Information
- Application Number
- CN202411699493.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-18
AI Technical Summary
When the existing power data acquisition plan is large in Taiwan, the real-time performance of data acquisition is poor, the acquisition efficiency and completeness rate are low, making it difficult to meet the statistical requirements for the power consumption of each user in Taiwan.
By obtaining the acquisition flags for N historical acquisition cycles within the data acquisition period of each data acquisition cycle, we judge whether the power data has been collected, and collecting the power data for multiple historical acquisition cycles and the current cycle at the same time without the acquisition.
It improves the efficiency and completeness of data acquisition, ensures the real-time nature of data acquisition, and meets the accurate statistical requirements for the power consumption of each user in the station area.
Smart Images

Figure CN119653260A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data acquisition technology, and in particular to a power data acquisition method and device, an electronic device and a readable storage medium. Background Art
[0002] In the power system, a transformer substation refers to the power supply range or area of a transformer. When collecting statistics on the power consumption of each user in the transformer substation, in order to ensure the accuracy of the statistics, the real-time statistical curves related to power data such as the real-time current curve, real-time voltage curve and real-time power curve of each user in the transformer substation are usually used to collect and count the power consumption information of each user.
[0003] At present, the commonly used power data collection scheme is based on low-voltage power line broadband carrier communication technology, in which the terminal, router, module and meter are used as a system to read the meter of each user in the substation. Specifically, the existing power data collection scheme issues power data collection tasks through the master station, and then the terminal reads the meter of each user in the substation at a fixed time and point within the set data collection cycle to collect power data of each user in the substation, and reports the collected power data to the master station according to the set task format.
[0004] However, the existing power data collection scheme is not flexible enough in meter reading and the power data collection rate is limited. Especially when the scale of the substation is large, there will be problems such as poor real-time data collection, low collection efficiency and completeness, which makes it difficult to meet the statistical requirements for the power consumption of each user in the substation. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.
[0006] To this end, a first aspect of the present invention is to propose a power data collection method.
[0007] A second aspect of the present invention is to provide a power data collection device.
[0008] A third aspect of the present invention is to provide an electronic device.
[0009] A fourth aspect of the present invention is to provide a readable storage medium.
[0010] In view of this, according to a first aspect of the present invention, a method for collecting power data is proposed, the method comprising: in a data collection period of each data collection cycle, obtaining N collection flag bits corresponding to N historical collection cycles, N being a positive integer greater than 1; in a case where there are M collection flag bits indicating that the power data of the corresponding M historical collection cycles have not been collected, collecting the power data of the data collection cycle and the M historical collection cycles, M being a positive integer; in a case where N collection flag bits indicate that the power data of the corresponding N historical collection cycles have been collected, collecting the power data of the data collection cycle.
[0011] The execution subject of the technical solution of the power data collection method provided by the present invention can be a terminal, or a power data collection device, and can also be determined according to actual use requirements, which is not specifically limited here. In order to more clearly describe the power data collection method provided by the present invention, the execution subject of the power data collection method is described below as a terminal.
[0012] Specifically, in the power data collection method provided by the present invention, in the process of the terminal collecting power data according to a fixed data collection cycle, the data collection cycle includes a data collection period. In the data collection period of the current data collection cycle, the terminal will obtain the N collection flags corresponding to the previous N historical collection cycles, and judge whether the power data in the N historical collection cycles are collected by the values of the N collection flags. N is a positive integer greater than 1. In the case where there are M collection flags indicating that the power data of the corresponding M historical collection cycles have not been collected, the terminal collects the power data in the above M historical collection cycles and the current data collection cycle at one time to supplement the power data missing in the previous data collection cycle. M is a positive integer. In the case where there is no collection flag indicating that the power data of the corresponding historical collection cycle has not been collected, the terminal only collects the power data in the current data collection cycle. In this way, in each data collection cycle, the power data missing in the previous collection cycle is collected by collecting power data at multiple time points at one time, while ensuring the real-time nature of data collection, the efficiency and completeness of data collection are improved.
[0013] The above-mentioned power data collection method according to the present invention may also have the following additional technical features:
[0014] In some technical schemes, optionally, collecting power data of a data collection cycle and M historical collection cycles includes: adjusting data collection parameters according to the data collection cycle and M historical collection cycles; collecting power data of the data collection cycle and M historical collection cycles through one data collection frame according to the adjusted data collection parameters; wherein the data collection parameters include: data collection time point and the number of time points.
[0015] In this technical solution, when the terminal collects the power data in the above-mentioned M historical collection cycles and the current data collection cycle at one time, the terminal adjusts the data collection parameters according to the above-mentioned M historical collection cycles and the current data collection cycle to modify the data collection time point and the number of time points of the power data to be collected. On this basis, the terminal collects the power data in the above-mentioned M historical collection cycles and the current data collection cycle at one time in accordance with the adjusted data collection parameters by collecting multiple power data of a measurement point at multiple time points through one data collection frame. In this way, the number of data collection times and the time occupied by the carrier channel are effectively reduced, the power data previously missed is supplemented, and the efficiency and completeness of data collection are improved.
[0016] In some technical schemes, optionally, the power data collection method also includes: taking each K historical collection cycles as a group, and sequentially collecting multiple groups of power data that were not collected in the historical collection cycles in the historical period in order of data generation time from near to far, K is a positive integer greater than 1; wherein, the power data within a group of historical collection cycles is collected through one data collection frame.
[0017] In this technical solution, when the terminal is idle or executing a task with a lower priority, the terminal will divide each adjacent K historical collection periods into a group in the order of the data generation time of the power data from near to far, and then collect the power data that has not been collected in multiple groups of historical collection periods in turn in the order of the data generation time of the power data in each group of historical collection periods from near to far, until the power data in the historical period is completed. Among them, K is a positive integer greater than 1. In the process of collecting power data in each group of historical collection cycles, the power data in each group of K historical collection cycles is collected at one time through a data collection frame. In this way, when the terminal is idle or executing a task with a lower priority, the missing power data in the historical period is copied again, which can avoid the problem of missing power data collection due to other task processes occupying the carrier channel, thereby improving the integrity of power data collection.
[0018] In some technical schemes, optionally, the power data collection method also includes: obtaining N reporting flag bits corresponding to N historical collection cycles within the data reporting period of each data collection cycle; when there are P reporting flag bits indicating that the corresponding P historical collection cycles' power data have not been reported, reporting the power data of the data collection cycle and P historical collection cycles, where P is a positive integer; when N reporting flag bits indicate that the corresponding N historical collection cycles' power data have been reported, reporting the power data of the data collection cycle.
[0019] In this technical solution, in the process of the terminal collecting power data according to a fixed data collection cycle, the data collection cycle also includes a data reporting period. During the data reporting period of the current data collection cycle, the terminal will obtain the N reporting flags corresponding to the previous N historical collection cycles, and judge whether the power data in the N historical collection cycles have been reported to the main station by the values of the N reporting flags. In the case where there are P reporting flags indicating that the power data in the corresponding P historical collection cycles has not been reported to the main station, the terminal will report the power data collected in the above P historical collection cycles and the current data collection cycle to the main station together, where P is a positive integer. In the case where there is no reporting flag indicating that the power data in the corresponding historical collection cycle has not been reported to the main station, the terminal will only report the power data collected in the current data collection cycle to the main station. In this way, the valid data that has been collected but not reported in the past is framed and reported, which realizes the supplementary reporting of valid data, improves the data reporting rate, improves the completeness rate of the data received by the main station, and avoids the problem of invalid data occupying traffic.
[0020] According to a second aspect of the present invention, a power data collection device is proposed, which includes: an acquisition unit, used to acquire N collection flag bits corresponding to N historical collection cycles within a data collection period of each data collection cycle, where N is a positive integer greater than 1; a collection unit, used to collect power data of a data collection cycle and M historical collection cycles when there are M collection flag bits indicating that the power data of the corresponding M historical collection cycles have not been collected, where M is a positive integer; the collection unit is also used to collect power data of a data collection cycle when N collection flag bits indicate that the power data of the corresponding N historical collection cycles have been collected.
[0021] The power data collection device provided by the present invention includes an acquisition unit and a collection unit. In the process of the terminal collecting power data through the power data collection device according to a fixed data collection cycle, the data collection cycle includes a data collection period. In the data collection period of the current data collection cycle, the acquisition unit will obtain N collection flags corresponding to the previous N historical collection cycles respectively. The collection unit judges whether the power data in the N historical collection cycles are collected by the values of the N collection flags respectively, and N is a positive integer greater than 1. In the case where there are M collection flags indicating that the power data of the corresponding M historical collection cycles have not been collected, the collection unit will collect the power data in the above M historical collection cycles and the current data collection cycle at one time, so as to supplement the power data that was missing in the previous data collection cycle. M is a positive integer. In the case where there is no collection flag indicating that the power data of the corresponding historical collection cycle has not been collected, the collection unit only collects the power data in the current data collection cycle. In this way, in each data collection cycle, by collecting power data at multiple time points at one time, the power data that was missing in the previous collection cycle is collected, which improves the efficiency and completeness of data collection while ensuring the real-time nature of data collection.
[0022] The above-mentioned power data acquisition device according to the present invention may also have the following additional technical features:
[0023] In some technical schemes, optionally, the acquisition unit is specifically used to: adjust data acquisition parameters according to the data acquisition cycle and M historical acquisition cycles; according to the adjusted data acquisition parameters, collect power data of the data acquisition cycle and M historical acquisition cycles through one data acquisition frame; wherein the data acquisition parameters include: data acquisition time point and the number of time points.
[0024] In this technical solution, when the acquisition unit collects the power data in the above-mentioned M historical acquisition cycles and the current data acquisition cycle at one time, the acquisition unit adjusts the data acquisition parameters according to the above-mentioned M historical acquisition cycles and the current data acquisition cycle to modify the data acquisition time point and the number of time points of the power data to be collected. On this basis, the acquisition unit collects the power data in the above-mentioned M historical acquisition cycles and the current data acquisition cycle at one time in accordance with the adjusted data acquisition parameters by collecting multiple power data of a measurement point at multiple time points through one data acquisition frame. In this way, the number of data acquisition times and the time occupied by the carrier channel are effectively reduced, the power data previously missed is supplemented, and the efficiency and completeness of data acquisition are improved.
[0025] In some technical schemes, optionally, the collection unit is also used to: take each K historical collection cycles as a group, and collect multiple groups of power data that were not collected in the historical collection cycles in the historical period in sequence in order of data generation time from near to far, where K is a positive integer greater than 1; wherein, the power data within a group of historical collection cycles is collected through one data collection frame.
[0026] In this technical solution, when the terminal is idle or executing a task with a lower priority, the collection unit will divide each adjacent K historical collection periods into a group in the order of the data generation time of the power data from near to far, and then collect the power data that has not been collected in multiple groups of historical collection periods in turn in the order of the data generation time of the power data in each group of historical collection periods from near to far, until the power data in the historical period is completed. Among them, K is a positive integer greater than 1. In the process of the collection unit collecting the power data in each group of historical collection periods, the collection unit collects the power data in each group of K historical collection periods at one time through a data collection frame. In this way, when the terminal is idle or executing a task with a lower priority, the missing power data in the historical period is copied again, which can avoid the problem of missing power data collection due to other task processes occupying the carrier channel, thereby improving the integrity of power data collection.
[0027] In some technical schemes, optionally, the acquisition unit is also used to: acquire N reporting flag bits corresponding to N historical collection cycles within the data reporting period of each data collection cycle; the power data collection device also includes: a reporting unit, used to report the power data of the data collection cycle and P historical collection cycles when there are P reporting flag bits indicating that the corresponding P historical collection cycles have not been reported, where P is a positive integer; the reporting unit is also used to report the power data of the data collection cycle when N reporting flag bits indicate that the corresponding N historical collection cycles have been reported.
[0028] In the technical scheme, in the process of collecting power data according to a fixed data collection cycle, the data collection cycle also includes a data reporting period, and each data collection cycle is also corresponding to a reporting flag, which is used to indicate whether the power data in the corresponding data collection period has been reported to the main station. On this basis, the power data collection device also includes a reporting unit. In the data reporting period of the current data collection cycle, the acquisition unit will obtain the N reporting flags corresponding to the previous N historical collection cycles, and the reporting unit will judge whether the power data in the N historical collection cycles has been reported to the main station by the values of the N reporting flags. In the case where there are P reporting flags indicating that the power data in the corresponding P historical collection cycles has not been reported to the main station, the reporting unit will report the power data collected in the above P historical collection cycles and the current data collection cycle to the main station together, and P is a positive integer. In the case where there is no reporting flag indicating that the power data of the corresponding historical collection cycle has not been reported to the main station, the reporting unit will only report the power data collected in the current data collection cycle to the main station. In this way, valid data that has been collected but not reported in the past is framed and reported, which realizes the supplementary reporting of valid data, improves the data reporting rate, improves the completeness rate of data received by the master station, and avoids the problem of invalid data occupying traffic.
[0029] According to the third aspect of the present invention, an electronic device is proposed, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the power data collection method in any of the above technical solutions are implemented. Therefore, the electronic device proposed in the third aspect of the present invention has all the beneficial effects of the power data collection method in any of the above technical solutions in the first aspect, which will not be repeated here.
[0030] According to the fourth aspect of the present invention, a readable storage medium is proposed, on which a program or instruction is stored, and when the program or instruction is executed by a processor, a power data collection method as in any of the above technical solutions is implemented. Therefore, the readable storage medium proposed in the fourth aspect of the present invention has all the beneficial effects of the power data collection method in any of the technical solutions in the first aspect, which will not be repeated here.
[0031] Additional aspects and advantages of the present invention will become apparent from the following description or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0033] Figure 1One of the flow charts of the power data collection method according to the embodiment of the present invention is shown;
[0034] Figure 2 A second flow chart of the power data collection method according to an embodiment of the present invention is shown;
[0035] Figure 3 The third flowchart of the power data collection method according to the embodiment of the present invention is shown;
[0036] Figure 4 A fourth flow chart of the power data collection method according to an embodiment of the present invention is shown;
[0037] Figure 5 A structural block diagram of a power data acquisition device according to an embodiment of the present invention is shown;
[0038] Figure 6 A structural block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0039] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0040] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0041] Combine the following Figures 1 to 6 , the power data collection method and device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.
[0042] In one embodiment of the present invention, Figure 1 As shown, the power data collection method may specifically include the following steps 102 to 106:
[0043] Step 102, obtaining N collection flags corresponding to N historical collection cycles within the data collection period of each data collection cycle;
[0044] Step 104, when there are M collection flags indicating that the corresponding M historical collection cycles of power data have not been collected, collect the power data of the data collection cycle and the M historical collection cycles;
[0045] Step 106, when N collection flags indicate that the collection of power data of the corresponding N historical collection cycles is completed, collect power data of the data collection cycle;
[0046] Wherein, N is a positive integer greater than 1, and M is a positive integer.
[0047] The execution subject of the technical solution of the power data collection method provided by the present invention can be a terminal, or a power data collection device, and can also be determined according to actual use requirements, which is not specifically limited here. In order to more clearly describe the power data collection method provided by the present invention, the execution subject of the power data collection method is described below as a terminal.
[0048] Specifically, in the power data collection method provided by the present invention, in the process of the terminal collecting power data according to a fixed data collection cycle, the data collection cycle includes a data collection period, and each data collection cycle is correspondingly provided with a collection flag, which is used to indicate whether the power data in the corresponding data collection period has been collected. On this basis, in the data collection period of the current data collection cycle, the terminal will obtain the N collection flags corresponding to the previous N historical collection cycles, and judge whether the power data in the N historical collection cycles has been collected by the values of the N collection flags. In the case where there are M collection flags indicating that the power data of the corresponding M historical collection cycles has not been collected, the terminal collects the power data in the above M historical collection cycles and the current data collection cycle at one time, so as to supplement the power data that was missing in the previous data collection cycle. In the case where there is no collection flag indicating that the power data of the corresponding historical collection cycle has not been collected, the terminal only collects the power data in the current data collection cycle. In this way, in each data collection cycle, by collecting power data at multiple time points at one time, the power data that was missing in the previous collection cycle is collected, which improves the efficiency and completeness of data collection while ensuring the real-time nature of data collection.
[0049] Wherein, N is a positive integer greater than 1. For the specific value of N, those skilled in the art can set it according to the actual situation. For example, N can be specifically 5, and no specific limitation is made here.
[0050] Furthermore, M is a positive integer.
[0051] Furthermore, the above-mentioned power data may specifically be curve data of a freezing time point of a carrier module in the power system.
[0052] Furthermore, the value of the above-mentioned collection flag includes 0 and 1. Among them, when the value of the collection flag is 0, it means that the power data in the historical collection cycle corresponding to the collection flag has not been collected, and when the value of the collection flag is 1, it means that the power data in the historical collection cycle corresponding to the collection flag has been collected.
[0053] Furthermore, after the terminal collects power data within M historical collection cycles or the current data collection cycle, when the power data collection within M historical collection cycles or the current data collection cycle is completed, the terminal will update the value of the collection flag corresponding to the M historical collection cycles or the current data collection cycle to 1, otherwise, the value of the collection flag will be kept at 0.
[0054] In summary, if Figure 2 As shown, the power data collection method provided by the present invention may specifically include the following steps 202 to 216:
[0055] Step 202, start data collection;
[0056] Step 204, determine: if the acquisition flag of the measurement point in the current data acquisition cycle is 1, if so, execute step 206, if not, execute step 208;
[0057] Step 206, changing the measuring point;
[0058] Step 208, obtaining the collection flags of the last five historical collection cycles;
[0059] Step 210, judging: the collection flag indicates that there is power data in the historical collection cycle that has not been collected, if so, executing step 212, if not, executing step 214;
[0060] Step 212, collecting power data of the historical data collection period and the current data collection period at one time;
[0061] Step 214, only collecting power data of the current data collection cycle;
[0062] Step 216: After data collection is completed, update the collection flag.
[0063] After step 216 is completed, step 206 will continue to be executed.
[0064] In some embodiments of the present invention, optionally, the step of collecting power data of the data collection cycle and M historical collection cycles may specifically include the following steps 108 and 110:
[0065] Step 108, adjusting data collection parameters according to the data collection cycle and M historical collection cycles;
[0066] Step 110, collecting power data of a data collection cycle and M historical collection cycles through a data collection frame according to the adjusted data collection parameters;
[0067] The data collection parameters include: data collection time point and the number of time points.
[0068] In this embodiment, when the terminal collects the power data in the above-mentioned M historical collection cycles and the current data collection cycle at one time, the terminal adjusts the data collection parameters according to the above-mentioned M historical collection cycles and the current data collection cycle to modify the data collection time point and the number of time points of the power data to be collected. On this basis, the terminal collects the power data in the above-mentioned M historical collection cycles and the current data collection cycle at one time in accordance with the adjusted data collection parameters by collecting multiple power data of a measurement point at multiple time points through one data collection frame. In this way, the number of data collection times and the time occupied by the carrier channel are effectively reduced, the power data previously missed is supplemented, and the efficiency and completeness of data collection are improved.
[0069] In some embodiments of the present invention, optionally, the above-mentioned power data collection method may further include the following step 112:
[0070] Step 112, taking each K historical collection cycles as a group, sequentially collecting multiple groups of power data that were not collected in the historical collection cycles in the historical period in the order of data generation time from recent to far;
[0071] Wherein, K is a positive integer greater than 1, and a set of power data within a historical collection period is collected through a data collection frame.
[0072] In this embodiment, when the terminal is idle or executing a task with a lower priority, the terminal will divide each adjacent K historical collection periods into a group in the order of the data generation time of the power data from near to far, and then collect the power data that has not been collected in multiple groups of historical collection periods in turn in the order of the data generation time of the power data in each group of historical collection periods from near to far, until the power data in the historical period is completed. In the process of collecting the power data in each group of historical collection periods, the power data in the K historical collection periods of each group are collected at one time through a data collection frame. In this way, when the terminal is idle or executing a task with a lower priority, the missing power data in the historical period is copied again, which can avoid the problem of missing power data collection caused by other task processes occupying the carrier channel, thereby improving the integrity of power data collection.
[0073] Wherein, K is a positive integer greater than 1.
[0074] In actual application, technicians in this field can flexibly set the specific value of K according to the frame length limit of the data acquisition frame and the number of data items. For example, K can be specifically set to 5, and no specific limitation is made here.
[0075] Furthermore, for the specific range of the above historical period, those skilled in the art may set it according to actual conditions. For example, the above historical period may be the past 2 days, the past 3 days, etc., and no specific limitation is made here.
[0076] In summary, if Figure 3 As shown, the power data collection method provided by the present invention may further include the following steps 302 to 312:
[0077] Step 302, start data collection;
[0078] Step 304, taking 5 historical collection cycles as a group, obtaining collection flags of multiple groups of historical collection cycles of the current measurement point in the historical period;
[0079] Step 306, judging: the collection flag indicates that there is at least one set of power data of the historical collection cycle that has not been collected, if so, executing step 308, if not, executing 312;
[0080] Step 308, sequentially collect the power data of each group of historical collection cycles that have not been collected;
[0081] Step 310, after the power data of the current measurement point in the historical period is collected, the collection flag is updated;
[0082] Step 312, changing the measurement point.
[0083] After step 310 is completed, step 312 will be executed.
[0084] In some embodiments of the present invention, optionally, the above-mentioned power data collection method may further include the following steps 114 to 118:
[0085] Step 114, obtaining N reporting flags corresponding to N historical collection cycles within the data reporting period of each data collection cycle;
[0086] Step 116, when there are P reporting flags indicating that the corresponding power data of P historical collection periods have not been reported, report the power data of the data collection period and the P historical collection periods;
[0087] Step 118, reporting the power data of the data collection period when N reporting flag bits indicate that the corresponding N historical collection periods have been reported;
[0088] Wherein, P is a positive integer.
[0089] In this embodiment, in the process of the terminal collecting power data according to a fixed data collection cycle, the data collection cycle also includes a data reporting period, and each data collection cycle is also corresponding to a reporting flag, which is used to indicate whether the power data in the corresponding data collection period has been reported to the main station. On this basis, during the data reporting period of the current data collection cycle, the terminal will obtain the N reporting flags corresponding to the previous N historical collection cycles, and judge whether the power data in the N historical collection cycles has been reported to the main station by the values of the N reporting flags. In the case where there are P reporting flags indicating that the power data in the corresponding P historical collection cycles has not been reported to the main station, the terminal will report the power data collected in the above P historical collection cycles and the current data collection cycle to the main station together. In the case where there is no reporting flag indicating that the power data of the corresponding historical collection cycle has not been reported to the main station, the terminal will only report the power data collected in the current data collection cycle to the main station. In this way, valid data that has been collected but not reported in the past is framed and reported, which realizes the supplementary reporting of valid data, improves the data reporting rate, improves the completeness rate of data received by the master station, and avoids the problem of invalid data occupying traffic.
[0090] Wherein, P is a positive integer.
[0091] Furthermore, for the separation points of the data collection period and the data reporting period in each data collection cycle, technical personnel in this field may set them fixedly, or may set the separation points to vary according to the completion status of the power data collection in each data collection cycle, without specific limitation herein.
[0092] Furthermore, the value of the above-mentioned reporting flag includes 0 and 1. Among them, when the value of the reporting flag is 0, it means that the power data in the historical collection period corresponding to the reporting flag has not been reported to the master station, and when the value of the reporting flag is 1, it means that the power data in the historical collection period corresponding to the reporting flag has been reported to the master station.
[0093] Furthermore, after the terminal reports the power data within P historical collection cycles or the current data collection cycle, when the power data within P historical collection cycles or the current data collection cycle is successfully reported to the main station, the terminal will update the value of the reporting flag corresponding to the P historical collection cycles or the current data collection cycle to 1, otherwise, the value of the reporting flag will be kept at 0.
[0094] In summary, if Figure 4 As shown, the power data collection method provided by the present invention may further include the following steps 402 to 416:
[0095] Step 402, the master station issues a task;
[0096] Step 404, obtaining the collection flags of the last five historical collection cycles;
[0097] Step 406, judging: the collection flag indicates that there is power data in the historical collection cycle that has not been collected, if so, executing step 408, if not, executing step 410;
[0098] Step 408, collecting power data of the historical data collection period and the current data collection period at one time;
[0099] Step 410, obtaining the reporting flags of the last five historical collection cycles;
[0100] Step 412, determine: the reporting flag indicates that there is power data in the historical collection cycle that has not been reported, if so, execute step 414, if not, execute step 416;
[0101] Step 414, reporting the power data of the historical data collection cycle and the current data collection cycle;
[0102] Step 416, waiting for the next data collection cycle.
[0103] After step 414 is completed, step 416 will be executed.
[0104] In one embodiment of the present invention, a power data acquisition device is also provided. Figure 5 As shown, Figure 5 The structure block diagram of the power data acquisition device 500 according to the embodiment of the present invention is shown. The power data acquisition device 500 may specifically include the following acquisition unit 502 and acquisition unit 504:
[0105] An acquisition unit 502 is used to acquire N acquisition flags corresponding to N historical acquisition cycles in a data acquisition period of each data acquisition cycle, where N is a positive integer greater than 1;
[0106] The collection unit 504 is used to collect the power data of the data collection cycle and the M historical collection cycles when there are M collection flags indicating that the power data of the corresponding M historical collection cycles have not been collected, where M is a positive integer;
[0107] The collection unit 504 is further configured to collect power data of a data collection cycle when N collection flag bits indicate that the collection of power data of the corresponding N historical collection cycles is completed.
[0108] The power data collection device 500 provided in the embodiment of the present invention includes an acquisition unit 502 and a collection unit 504. In the process of the terminal collecting power data through the power data collection device 500 according to a fixed data collection cycle, the data collection cycle includes a data collection period, and each data collection period is correspondingly provided with a collection flag, which is used to indicate whether the power data in the corresponding data collection period has been collected. On this basis, in the data collection period of the current data collection cycle, the acquisition unit 502 will obtain the N collection flags corresponding to the previous N historical collection cycles, and the collection unit 504 will judge whether the power data in the N historical collection cycles has been collected by the values of the N collection flags. In the case where there are M collection flags indicating that the power data of the corresponding M historical collection cycles has not been collected, the collection unit 504 will collect the power data in the above M historical collection cycles and the current data collection cycle at one time, so as to supplement the power data that was missing in the previous data collection cycle. In the case where there is no collection flag indicating that the power data of the corresponding historical collection cycle has not been collected, the collection unit 504 only collects the power data in the current data collection cycle. In this way, in each data collection cycle, by collecting power data at multiple time points at one time, the power data that was missing in the previous collection cycle is collected, which improves the efficiency and completeness of data collection while ensuring the real-time nature of data collection.
[0109] Wherein, N is a positive integer greater than 1. For the specific value of N, those skilled in the art can set it according to the actual situation. For example, N can be specifically 5, and no specific limitation is made here.
[0110] Furthermore, M is a positive integer.
[0111] Furthermore, the above-mentioned power data may specifically be curve data of a freezing time point of a carrier module in the power system.
[0112] Furthermore, the value of the above-mentioned collection flag includes 0 and 1. Among them, when the value of the collection flag is 0, it means that the power data in the historical collection cycle corresponding to the collection flag has not been collected, and when the value of the collection flag is 1, it means that the power data in the historical collection cycle corresponding to the collection flag has been collected.
[0113] Further, after the collection unit 504 collects the power data within M historical collection cycles or the current data collection cycle, when the power data collection within M historical collection cycles or the current data collection cycle is completed, the value of the collection flag corresponding to the M historical collection cycles or the current data collection cycle will be updated to 1, otherwise, the value of the collection flag will remain 0.
[0114] In some embodiments of the present invention, optionally, the acquisition unit 504 is specifically used to: adjust data acquisition parameters according to the data acquisition cycle and M historical acquisition cycles; according to the adjusted data acquisition parameters, collect power data of the data acquisition cycle and M historical acquisition cycles through one data acquisition frame; wherein the data acquisition parameters include: data acquisition time point and the number of time points.
[0115] In this embodiment, in the process that the acquisition unit 504 collects the power data in the above-mentioned M historical acquisition cycles and the current data acquisition cycle at one time, the acquisition unit 504 adjusts the data acquisition parameters according to the above-mentioned M historical acquisition cycles and the current data acquisition cycle to modify the data acquisition time point and the number of time points of the power data to be collected. On this basis, the acquisition unit 504 collects the power data in the above-mentioned M historical acquisition cycles and the current data acquisition cycle at one time in accordance with the adjusted data acquisition parameters by collecting multiple power data of a measurement point at multiple time points through one data acquisition frame. In this way, the number of data acquisition times and the time occupied by the carrier channel are effectively reduced, the power data previously missed is supplemented, and the efficiency and completeness of data acquisition are improved.
[0116] In some embodiments of the present invention, optionally, the collection unit 504 is also used to: take each K historical collection cycles as a group, and collect multiple groups of power data that were not collected in the historical collection cycles in the historical time period in order from near to far in terms of data generation time, where K is a positive integer greater than 1; wherein the power data in a group of historical collection cycles is collected through one data collection frame.
[0117] In this embodiment, when the terminal is idle or executing a task with a lower priority, the acquisition unit 504 will divide each adjacent K historical acquisition periods into a group in the order of the data generation time of the power data from near to far, and then collect the power data that has not been collected in multiple groups of historical acquisition periods in turn in the order of the data generation time of the power data in each group of historical acquisition periods from near to far, until the power data in the historical period is completed. In the process of the acquisition unit 504 collecting the power data in each group of historical acquisition periods, the acquisition unit 504 collects the power data in each group of K historical acquisition periods at one time through a data acquisition frame. In this way, when the terminal is idle or executing a task with a lower priority, the missing power data in the historical period is copied again, which can avoid the problem of missing power data collection due to other task processes occupying the carrier channel, thereby improving the integrity of power data collection.
[0118] Wherein, K is a positive integer greater than 1.
[0119] In actual application, technicians in this field can flexibly set the specific value of K according to the frame length limit of the data acquisition frame and the number of data items. For example, K can be specifically set to 5, and no specific limitation is made here.
[0120] Furthermore, for the specific range of the above historical period, those skilled in the art may set it according to actual conditions. For example, the above historical period may be the past 2 days, the past 3 days, etc., and no specific limitation is made here.
[0121] In some embodiments of the present invention, the acquisition unit 502 is optionally further configured to: acquire N reporting flags corresponding to N historical collection cycles within a data reporting period of each data collection cycle; Figure 5 As shown, the power data collection device 500 also includes: a reporting unit 506, which is used to report the power data of the data collection cycle and P historical collection cycles when there are P reporting flag bits indicating that the power data of the corresponding P historical collection cycles have not been reported, and P is a positive integer; the reporting unit 506 is also used to report the power data of the data collection cycle when N reporting flag bits indicate that the power data of the corresponding N historical collection cycles have been reported.
[0122] In this embodiment, in the process of collecting power data according to a fixed data collection cycle, the data collection cycle also includes a data reporting period, and each data collection cycle is also correspondingly provided with a reporting flag, which is used to indicate whether the power data in the corresponding data collection period has been reported to the main station. On this basis, the power data collection device 500 also includes a reporting unit 506. In the data reporting period of the current data collection cycle, the acquisition unit 502 will acquire the N reporting flags corresponding to the previous N historical collection cycles, and the reporting unit 506 will judge whether the power data in the N historical collection cycles has been reported to the main station by the values of the N reporting flags. In the case where there are P reporting flags indicating that the power data in the corresponding P historical collection cycles has not been reported to the main station, the reporting unit 506 will report the power data collected in the above P historical collection cycles and the current data collection cycle to the main station together. In the case where there is no reporting flag indicating that the corresponding power data of the historical collection cycle has not been reported to the master station, the reporting unit 506 only reports the power data collected in the current data collection cycle to the master station. In this way, the valid data that has been collected but not reported in the past is framed and reported, which realizes the supplementary reporting of valid data, improves the data reporting rate, improves the completeness rate of the master station receiving data, and avoids the problem of invalid data occupying traffic.
[0123] Wherein, P is a positive integer.
[0124] Furthermore, for the separation points of the data collection period and the data reporting period in each data collection cycle, technical personnel in this field may set them fixedly, or may set the separation points to vary according to the completion status of the power data collection in each data collection cycle, without specific limitation herein.
[0125] Furthermore, the value of the above-mentioned reporting flag includes 0 and 1. Among them, when the value of the reporting flag is 0, it means that the power data in the historical collection period corresponding to the reporting flag has not been reported to the master station, and when the value of the reporting flag is 1, it means that the power data in the historical collection period corresponding to the reporting flag has been reported to the master station.
[0126] Furthermore, after the reporting unit 506 reports the power data within P historical collection cycles or the current data collection cycle, when the power data within P historical collection cycles or the current data collection cycle is successfully reported to the main station, the value of the reporting flag corresponding to the P historical collection cycles or the current data collection cycle will be updated to 1, otherwise, the value of the reporting flag will remain 0.
[0127] In one embodiment of the present invention, an electronic device is also provided. Figure 6 As shown, Figure 6 FIG. 6 is a block diagram of an electronic device 600 provided in an embodiment of the present invention. The electronic device 600 includes:
[0128] A memory 602, where programs or instructions are stored;
[0129] Processor 604, when executing the above program or instruction, implements the steps of the power data collection method in any of the above embodiments.
[0130] The electronic device 600 provided in this embodiment includes a memory 602 and a processor 604. When the program or instructions in the memory 602 are executed by the processor 604, the steps of the power data collection method in any of the above embodiments are implemented. Therefore, the electronic device 600 has all the beneficial effects of the power data collection method in any of the above embodiments, which will not be repeated here.
[0131] Specifically, the memory 602 and the processor 604 may be connected via a bus or other means. The processor 604 may include one or more processing units, and the processor 604 may be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), and other chips.
[0132] In one embodiment of the present invention, a readable storage medium is also provided, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the power data collection method in any of the above embodiments are implemented.
[0133] The readable storage medium provided in the embodiment of the present invention can implement the steps of the power data collection method in any of the above embodiments when the program or instruction stored in the medium is executed by the processor. Therefore, the readable storage medium has all the beneficial effects of the power data collection method in any of the above embodiments, which will not be described in detail here.
[0134] Specifically, the above-mentioned readable storage medium may include any medium capable of storing or transmitting information. Examples of readable storage media include electronic circuits, semiconductor memory devices, read-only memory (ROM), random access memory (RAM), compact disc read-only memory (CD-ROM), flash memory, erasable ROM (EROM), magnetic tape, floppy disk, optical disk, hard disk, optical fiber medium, radio frequency (RF) link, optical data storage device, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0135] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance unless otherwise clearly specified and limited; the terms "connection", "installation", "fixation" and the like should be understood in a broad sense, for example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0136] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0137] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for collecting power data, characterized in that: include: In the data collection period of each data collection cycle, N collection flag bits corresponding to N historical collection cycles are obtained, where N is a positive integer greater than 1; In the case where there are M collection flags indicating that the corresponding power data of the M historical collection cycles have not been collected, collecting the power data of the data collection cycle and the M historical collection cycles, where M is a positive integer; When N of the collection flag bits indicate that the collection of power data of the corresponding N historical collection cycles is completed, the power data of the data collection cycle is collected.
2. The power data collection method according to claim 1, characterized in that: The collecting of the power data of the data collection cycle and M historical collection cycles includes: Adjusting data collection parameters according to the data collection cycle and M historical collection cycles; According to the adjusted data collection parameters, the power data of the data collection period and M historical collection periods are collected through one data collection frame; The data collection parameters include: data collection time points and the number of time points.
3. The power data collection method according to claim 1, characterized in that: Also includes: Taking each K historical collection cycles as a group, multiple groups of power data not collected in the historical collection cycles in the historical period are collected in sequence according to the order of data generation time from recent to far, where K is a positive integer greater than 1; Among them, a group of power data within a historical collection period is collected through a data collection frame.
4. The power data collection method according to any one of claims 1 to 3, characterized in that: Also includes: In the data reporting period of each data collection cycle, obtaining N reporting flag bits corresponding to N historical collection cycles; In the case where there are P reporting flags indicating that the corresponding power data of the P historical collection cycles have not been reported, reporting the data collection cycle and the power data of the P historical collection cycles, where P is a positive integer; When N reporting flag bits indicate that the corresponding N power data of the historical collection cycles have been reported, the power data of the data collection cycle is reported.
5. A power data acquisition device, characterized in that: include: An acquisition unit, used to acquire N acquisition flags corresponding to N historical acquisition cycles within a data acquisition period of each data acquisition cycle, where N is a positive integer greater than 1; A collection unit, configured to collect the power data of the data collection period and M historical collection periods when there are M collection flags indicating that the power data of the corresponding M historical collection periods have not been collected, where M is a positive integer; The collection unit is further used to collect the power data of the data collection cycle when the N collection flag bits indicate that the collection of the power data of the corresponding N historical collection cycles is completed.
6. The power data acquisition device according to claim 5, characterized in that: The acquisition unit is specifically used for: Adjusting data collection parameters according to the data collection cycle and M historical collection cycles; According to the adjusted data collection parameters, the power data of the data collection period and M historical collection periods are collected through one data collection frame; The data collection parameters include: data collection time points and the number of time points.
7. The power data acquisition device according to claim 5, characterized in that: The acquisition unit is also used for: Taking each K historical collection cycles as a group, multiple groups of power data not collected in the historical collection cycles in the historical period are collected in sequence according to the order of data generation time from recent to far, where K is a positive integer greater than 1; Among them, a group of power data within a historical collection period is collected through a data collection frame.
8. The power data acquisition device according to any one of claims 5 to 7, characterized in that: The acquisition unit is also used for: In the data reporting period of each data collection cycle, obtaining N reporting flag bits corresponding to N historical collection cycles; The power data acquisition device also includes: A reporting unit, configured to report the data collection period and the power data of P historical collection periods when there are P reporting flags indicating that the corresponding power data of P historical collection periods have not been reported, where P is a positive integer; The reporting unit is further configured to report the power data of the data collection cycle when the N reporting flag bits indicate that the power data of the corresponding N historical collection cycles have been reported.
9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the power data collection method as described in any one of claims 1 to 4 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the power data collection method according to any one of claims 1 to 4 are implemented.