Missing data filling method and device, electronic equipment and storage medium
By using the historical data associated with the building and the attribute information of the missing data, the missing data in the building data is automatically identified and completed, and the problems of inefficiency and low accuracy of the traditional complement method are solved, and more efficient and accurate data processing is achieved.
Patent Information
- Application Number
- CN202411698882.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-14
AI Technical Summary
In the case of building data reporting, data loss or abnormality caused by equipment failure or network interruption affects the accuracy and reliability of building data analysis. The traditional complement method is inefficient and prone to errors.
By determining the missing data based on the historical data of the building association within the set historical time interval, determining the data type and the complement time period based on the attribute information of the missing data, obtaining the corresponding fill data and performing the fill operation.
It realizes automatic identification and completion of missing data, improves the efficiency and accuracy of data processing, and solves the problems of the traditional complementary method in terms of complementary efficiency and accuracy.
Smart Images

Figure CN119622229A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for filling missing data. Background Art
[0002] At present, through the building digital twin platform, specific building space, equipment and people are organically linked, automated operations are used to achieve a circular improvement of the virtual and real worlds, and optimize the asset management capabilities of buildings and their ancillary equipment.
[0003] Building operation-related data can be collected through various ancillary equipment in the building, such as various smart meters and sensors, and reported to the server to update the digital twin building on the server side. The digital twin building can reflect the real-time status of the real building. However, due to various reasons (such as equipment failure and / or network interruption, etc.), the reported data may be lost or abnormal, which in turn affects the accuracy and reliability of building data analysis, thereby hindering our overall understanding of the building at a certain moment. Traditional complement methods mostly rely on manual judgment and operation, which is inefficient and error-prone.
[0004] Therefore, in the scenario of building data reporting, automatically identifying and completing missing data is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The present invention provides a missing data filling method, device, electronic device and storage medium, which can solve the problems of traditional complement method in complement efficiency and accuracy.
[0006] According to one aspect of the present invention, a method for filling missing data is provided, comprising:
[0007] Determine missing data according to historical data associated with the building within a set historical time interval, wherein the historical data associated with the building is used to represent equipment data of set equipment in the building, and the equipment data includes detection data and / or operation data;
[0008] Determine the data type of the missing data according to the attribute information of the missing data, and determine the complement time period according to the time corresponding to the missing data;
[0009] Acquire the filling data corresponding to the missing data according to the data type and the complement time period, and perform a filling operation on the missing data according to the filling data.
[0010] According to another aspect of the present invention, there is provided a device for filling missing data, comprising:
[0011] A data determination module, used to determine missing data based on historical data associated with the building within a set historical time interval, wherein the historical data associated with the building is used to represent equipment data of set equipment in the building, and the equipment data includes detection data and / or operation data;
[0012] A time period determination module, used to determine the data type of the missing data according to the attribute information of the missing data, and determine the complement time period according to the time corresponding to the missing data;
[0013] The complement module is used to obtain the filling data corresponding to the missing data according to the data type and the complement time period, and perform a filling operation on the missing data according to the filling data.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the missing data filling method described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the missing data filling method described in any embodiment of the present invention when executed.
[0019] The technical solution of the embodiment of the present invention determines the missing data according to the historical data associated with the building, determines the data type of the missing data according to the attribute information of the missing data, and determines the complement time period according to the time corresponding to the missing data. The filling data corresponding to the missing data is obtained according to the data type and the complement time period, and the missing data is filled according to the filling data. The embodiment of the present invention realizes automatic identification and completion of missing data, which can improve the efficiency and accuracy of data processing and solve the problems of traditional complement methods in terms of complement efficiency and accuracy.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A flowchart of a method for filling missing data is provided for an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of historical data distribution of cumulative values provided by an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of the structure of a missing data filling device provided by an embodiment of the present invention;
[0025] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Figure 1A flowchart of a missing data filling method is provided for an embodiment of the present invention. This embodiment can be applied to data processing scenarios, for example, to fill missing data or abnormal data in data required for status update of a digital twin building. The method can be executed by a missing data filling device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. For example, the electronic device can be a PC or a server. Figure 1 As shown, the method includes:
[0029] S110. Determine missing data based on historical data associated with the building within a set historical time interval.
[0030] The historical data associated with the building is used to represent the device data of the set device in the building, and the device data includes detection data and / or operation data. For example, for a smart meter in a building, the device data is the reading of the smart meter. The device data can also be the sensor value corresponding to the sensor associated with the set device. According to the data type classification, the device data includes instantaneous value, enumeration value and cumulative value.
[0031] The historical time interval can be set according to the data processing scenario. Since the equipment data associated with the building is reported to the server in real time, the historical time interval can be set according to the data reporting cycle. For example, suppose that the data reporting cycle is 15 minutes, and the data reported in the last minute or the last second of this cycle represents the data of this cycle for reporting. If there are data reports at 10:15 and 10:30, and then the reported data is obtained again at 11:15, it is considered that the missing data are the data corresponding to the data reporting cycles of 10:45 and 11:00, and accordingly, the missing data time period is 10:30-10:45, and 10:45-11:00.
[0032] Exemplarily, the missing data includes missing data and / or abnormal data. For example, missing data refers to device data that has not been reported to the server. Abnormal data refers to data that has been successfully reported to the server, but the data quality is abnormal.
[0033] The determining of missing data according to historical data associated with the building within a set historical time interval includes:
[0034] If the missing data is missing data, obtain a sampling time point for which no historical data exists within the set historical time, and determine the missing data based on the missing data corresponding to the sampling time point. The sampling time point may refer to at least one moment within the data reporting period. For example, the above 10:45 and 11:00 are both sampling time points.
[0035] If the missing data is abnormal data, obtain the abnormal data within the set historical time, and determine the missing data based on the abnormal data, wherein the abnormal data includes data exceeding the business threshold and / or the accumulated value that violates the accumulation rule. For example, several situations in which abnormal data may be generated include: exceeding the threshold, returning to normal values after jumping to a large number, returning to normal data after jumping to a small number, data oscillation, and replacing meter scenarios, etc.
[0036] Specifically, when the threshold is exceeded, for instantaneous values, enumerated values or cumulative values, the data threshold is determined according to the business scenario corresponding to the data. If the reported device data exceeds the data threshold, the reported device data is determined as abnormal data.
[0037] When the value returns to normal after jumping to a large number, for the cumulative value, since the threshold of the smart meter is relatively wide, it is difficult to judge the data abnormality only by the threshold of the meter. Therefore, the load value corresponding to the meter, that is, the energy consumption value of 15 minutes, can be used for abnormal identification. When the load value is negative or exceeds the threshold, the meter data corresponding to the load value is considered abnormal.
[0038] When the value returns to normal after jumping to a decimal, the judgment logic for the accumulated value is the same as that after jumping to a large number. When the load value is negative or exceeds the threshold, the meter data corresponding to the load value is considered abnormal.
[0039] In the case of data oscillation, for the cumulative value, the base number of the cumulative scale fluctuates up and down and does not develop according to the positive growth curve, that is, the current value is greater than the adjacent subsequent value, and this situation occurs at least twice in a row, and the meter data is judged to be abnormal.
[0040] When the meter is replaced, for the cumulative value, if the end value of the number loss is less than the start value of the number loss, and the subsequent m values after the end of the number loss are still monotonically increasing, the meter data is judged to be abnormal data. Where m is a preset value.
[0041] S120. Determine the data type of the missing data according to the attribute information of the missing data, and determine the complement time period according to the time corresponding to the missing data.
[0042] Among them, data types include instantaneous values, enumeration values, and cumulative values. The data type of the missing data can be determined based on the attribute information of the missing data. The attribute information can report the data source corresponding to the missing data, or the identification information of the missing data, etc. For the data reported by the smart meter, it is usually a cumulative value, and for the data reported by the sensor, it is usually an instantaneous value. The complement time period refers to the difference between the sampling points of the adjacent historical data of the missing data. For example: assuming that the missing data time period is 10:30-10:45, and 10:45-11:00, the complement time period can be 10:30-11:00.
[0043] Exemplarily, the data type of the missing data is determined according to the attribute information of the historical data associated with the missing data, wherein the data type includes an instantaneous value, an enumerated value, and a cumulative value. The complement time period is determined according to the difference in sampling time points of the historical data adjacent to the missing data.
[0044] S130. Obtain filling data corresponding to the missing data according to the data type and the complement time period, and perform a filling operation on the missing data according to the filling data.
[0045] Among them, the filling data refers to the historical data used to fill the missing data. The missing data in the past 7 days can be calculated every 6 hours to complete the automatic complement processing. It can be understood that 6 hours and 7 days are only examples, and the present invention does not limit how often the missing data is identified and automatically supplemented for historical data within a long period of time. Optionally, the complement sequence is from far to near each time. For example, from 7 days ago to half an hour before the current moment, the complement logic is triggered in sequence, and the filled data can be used as a reference source for the data at the following moments. If the lost data is retransmitted successfully, a high priority identifier is assigned to the retransmitted data, and a low priority identifier is assigned to the fill-in data at the position of the missing data.
[0046] For example, at 10:00 on December 12, missing data of the past 7 days are identified, that is, missing data from 10:00 on December 5 to 9:30 on December 12 are identified. Then, at 16:00 on December 12, missing data of the past 7 days are identified, that is, missing data from 16:00 on December 5 to 15:30 on December 12 are identified.
[0047] It should be noted that if the operation of filling the missing data with the filling data is unsuccessful, the automatic complement period is increased. For example, if 8 days of data are lost, which exceeds the complement period by 7 days, the automatic complement period can be extended to 8 days or longer.
[0048] For directly collected data, that is, data collected from hardware devices or from system docking, different methods are used to automatically supplement the data according to different data types and different application scenarios.
[0049] Exemplarily, if the data type of the missing data is an instantaneous value, a previous time period is determined according to the complement time period, and historical data corresponding to the previous time period is obtained as the filling data.
[0050] If the data type of the missing data is an enumeration value, the historical data corresponding to the starting time of the complement time period is obtained as the filling data.
[0051] Among them, the enumeration value includes data such as device status. Devices include devices that are recorded when the status changes, and devices that are recorded when the status does not change. For example, all historical data within seven days are traversed every 6 hours, and the previous valid data of the missing data or abnormal data is used as the basis for complement, and the missing data is inherited in order from the earliest to the latest time range. It should be noted that for devices that are recorded when the status changes, the basis for complement cannot be the previous valid data of the missing data or abnormal data.
[0052] If the data type of the missing data is a cumulative value, the previous time period is determined based on the complement time period, and the historical data corresponding to the previous time period is obtained. The filling data is determined based on the difference between the historical data at the start time and the end time of the complement time period and the historical data corresponding to the previous time period.
[0053] Optionally, if the data type of the missing data is an instantaneous value, determining the previous time period according to the complement time period includes:
[0054] If the data type of the missing data is an instantaneous value and the complement time period belongs to the first time range, the previous time period adjacent to the complement time period is determined as the previous time period, and the previous time period has the same length as the complement time period.
[0055] If the data type of the missing data is an instantaneous value and the complement time period belongs to a second time range, the time period of the previous similar day that is the same as the complement time period is determined as the previous time period, wherein the similar day is a weekday or a weekend, and the second time range is later than the first time range.
[0056] Since the instantaneous value is not strongly correlated with the preceding and following data, data can be read from the adjacent previous time period according to the complement time period (ie, the time period of the lost data) as the filling data.
[0057] Among them, the definition of the previous time period includes:
[0058] If the complement time period is less than or equal to 1 hour, the previous time period is the complement time period. For example, if 1 data is lost and the complement time period is 5 minutes, the data of the last 5 minutes before the loss will be used as the filling data.
[0059] If the complement time period is greater than 1 hour, the previous time period is the same as the complement time period in the previous similar day. For example, if the data from 10:00-12:00 on Monday is missing, the data from 10:00-12:00 on Friday last week will be used as the complement data. If the data from 10:00-12:00 on Tuesday is missing, the data from 10:00-12:00 on Monday this week will be used as the complement data. If the data from 10:00-12:00 on Saturday is missing, the data from 10:00-12:00 on Saturday last week will be used as the complement data. If the data from 10:00-12:00 on Sunday is missing, the data from 10:00-12:00 on Sunday last week will be used as the complement data.
[0060] If the complement time period is greater than 1 day and less than 7 days, the historical data of the days corresponding to the complement time period will be used as the complement data. If the data of Saturday, Sunday and Monday are lost, the historical data of the previous Saturday, Sunday and Friday will be used as the complement data.
[0061] If the complement time period is greater than 7 days, no complement will be performed, i.e. complement fails. You can increase the automatic complement period.
[0062] It should be noted that the complement logic of abnormal data is the same as that of the lost data mentioned above, and will not be repeated here.
[0063] Optionally, obtaining the historical data corresponding to the previous time period, and determining the filling data according to the historical data difference between the start time and the end time of the complement time period and the historical data corresponding to the previous time period, includes:
[0064] Obtain historical data corresponding to the sampling time point in the previous time period.
[0065] The data difference Δd of the previous time period is determined according to the historical data of the start time and the end time of the previous time period.
[0066] If the historical data difference is greater than or equal to N*Δd, the historical data difference is evenly distributed to the sampling time points within the complement time period as the padding data corresponding to the sampling time points, where N is a positive integer.
[0067] If the historical data difference is less than N*Δd, the allocation ratio corresponding to the sampling time point is determined according to the historical data corresponding to the previous time period, and the historical data difference is allocated to the sampling time point according to the allocation ratio to obtain the allocated data at the sampling time point.
[0068] The padding data at the sampling time point is determined according to the historical data of the starting time of the complement time period and the apportioned data corresponding to the sampling time point.
[0069] Exemplarily, performing a filling operation on the missing data according to the filling data includes: filling the filling data at the sampling time point to the position of the missing data in the historical data.
[0070] For the cumulative value (also known as the table base), the starting value and the ending value of the loss are on the same positive growth curve. Among them, the starting value of the loss is the cumulative value at the start time of the loss, and the ending value is the cumulative value at the end time of the loss. The difference between the historical data at the start time and the end time of the complement time period is determined according to the difference between the end value and the starting value. The difference between the historical data corresponding to the start time and the end time of the loss in the previous time period of the complement time period is calculated as the data difference Δd of the previous time period.
[0071] If the difference between the start and end time of the complement time period is greater than or equal to N*Δd, the difference between the historical data is evenly distributed to the sampling time points within the deployment time period as the filling data corresponding to each sampling time point. If the difference between the historical data is less than N*Δd, the difference between the historical data is proportionally distributed to each sampling point as the filling data corresponding to each sampling time point. Figure 2 A schematic diagram of historical data distribution of cumulative values provided by an embodiment of the present invention. Figure 2 As shown, the historical data at 8:00 on November 16 is 100, the historical data at 9:00 is 200, the historical data at 10:00 is 300, and the historical data at 11:00 is 1100. The historical data at 8:00 on November 17 is 2000, the data at 9:00 and 10:00 are lost, and the historical data at 11:00 is 4000. Therefore, 8:00 on November 17 is the starting time of the lost data, and 11:00 is the ending time of the lost data. Δd=1100-100=1000, assuming N=3, the difference between the starting time and the ending time of the complement time period is 4000-2000=2000, then the difference between the starting time and the ending time of the complement time period is less than 3*Δd, and the difference between the historical data is proportionally allocated to 9:00 and 10:00 on November 17.
[0072] Filling data at 9:00 on November 17 = 2000 + (200-100) / (1100-100) * (4000-2000)
[0073] Filling data at 10:00 on November 17 = 2000 + (300-100) / (1100-100) * (4000-2000)
[0074] Alternatively, Δd=1100-100=1000, assuming N=2, the difference in historical data between the start and end times of the complement time period is 4000-2000=2000, then the difference in historical data between the start and end times of the complement time period is equal to 2*Δd, and the historical data difference is evenly distributed to 9:00 and 10:00 on November 17.
[0075] If the complement time period is greater than or equal to 7 days, the historical data difference between the start time and the end time of the complement time period is evenly distributed to the sampling time points within the complement time period.
[0076] If the complement time period is less than 7 days, the allocation ratio corresponding to the sampling time point is determined based on the historical data corresponding to the previous time period of the complement time period. For 9:00 on November 17, (200-100) / (1100-100) represents the allocation ratio. The historical data difference is allocated to each sampling time point in the complement time period according to the allocation ratio.
[0077] It should be noted that the processing logic of abnormal data is the same as that of lost data, which will not be repeated here.
[0078] It should be noted that for manual meter reading data, half an hour can be used as the boundary and the principle of rounding can be adopted. Assuming that the data interval is 1 hour, if the manual meter reading data at 14:29 is obtained, it can be used as the filling data for 14:00, and if the manual meter reading data at 14:31 is obtained, it can be used as the filling data for 15:00. If a data is recorded at 14:00 on December 6 and a data is recorded at 15:00 on December 7, the difference between the two data will be evenly distributed to each hour between 14:00 on December 6 and 15:00 on December 7.
[0079] Optionally, the information points of the smart meter are complemented first, and then inherited or inherited and differentiated to the corresponding device object based on the complemented data. The inherited data is labeled with a complement tag to distinguish the inherited data from the normal data. Among them, the parameter description of each auxiliary equipment of the building is defined in the dictionary corresponding to the digital twin building as the information point of the auxiliary equipment. In data completion, inheritance is a strategy in which missing data values are replaced with the nearest non-missing value. This can be forward inheritance (using the previous non-missing value) or backward inheritance (using the next non-missing value). Inheritance difference is a more complex inheritance strategy, which considers not only the most recent non-missing value but also the changing trend of the data. For example, if the temperature reading of a device is time series data, inheritance difference may consider the rate of change of temperature to predict the missing value.
[0080] For the case where the output parameter is calculated based on the complement data of the input parameter, if the input parameter has no complement label, the output parameter has no complement label either. If the input parameter has a complement label, the output parameter must also have a complement label to distinguish normal data.
[0081] In the embodiment of the present invention, the priority of the data reported by the device is higher than that of the automatic complement, and the priority of the automatic complement is higher than that of the manual complement.
[0082] Figure 3 A schematic diagram of a missing data filling device provided in an embodiment of the present invention. The missing data filling device can be implemented in the form of hardware and / or software, and the missing data filling device can be configured in an electronic device. For example, the electronic device can be a PC or a server.
[0083] like Figure 3 As shown, the device comprises:
[0084] A data determination module 310 is used to determine missing data based on historical data associated with a building within a set historical time interval, wherein the historical data associated with the building is used to represent equipment data of a set equipment in the building, and the equipment data includes detection data and / or operation data;
[0085] A time period determination module 320 is used to determine the data type of the missing data according to the attribute information of the missing data, and determine the complement time period according to the time corresponding to the missing data;
[0086] The complement module 330 is used to obtain the filling data corresponding to the missing data according to the data type and the complement time period, and perform a filling operation on the missing data according to the filling data.
[0087] Optionally, the missing data includes missing data and / or abnormal data.
[0088] The data determination module 310 is specifically used for:
[0089] If the missing data is lost data, obtain a sampling time point where no historical data exists within the set historical time, and determine the missing data according to the lost data corresponding to the sampling time point;
[0090] If the missing data is abnormal data, the abnormal data within the set historical time is obtained, and the missing data is determined based on the abnormal data, wherein the abnormal data includes data exceeding a business threshold and / or a cumulative value that violates an accumulation rule.
[0091] Optionally, the time period determination module 320 is specifically configured to:
[0092] Determine the data type of the missing data according to the attribute information of the historical data associated with the missing data, wherein the data type includes an instantaneous value, an enumerated value, and a cumulative value;
[0093] The complement time period is determined according to the difference in sampling time points of the historical data adjacent to the missing data.
[0094] Optionally, the complement module 330 is specifically used for:
[0095] If the data type of the missing data is an instantaneous value, determining a previous time period according to the complement time period, and obtaining historical data corresponding to the previous time period as the filling data;
[0096] If the data type of the missing data is an enumeration value, obtaining the historical data corresponding to the starting time of the complement time period as the filling data;
[0097] If the data type of the missing data is a cumulative value, the previous time period is determined based on the complement time period, and the historical data corresponding to the previous time period is obtained. The filling data is determined based on the difference between the historical data at the start time and the end time of the complement time period and the historical data corresponding to the previous time period.
[0098] Furthermore, if the data type of the missing data is an instantaneous value, determining the previous time period according to the complement time period includes:
[0099] If the data type of the missing data is an instantaneous value and the complement time period belongs to the first time range, a previous time period adjacent to the complement time period is determined as a previous time period, and the previous time period has the same duration as the complement time period;
[0100] If the data type of the missing data is an instantaneous value and the complement time period belongs to a second time range, the time period of the previous similar day that is the same as the complement time period is determined as the previous time period, wherein the similar day is a weekday or a weekend, and the second time range is later than the first time range.
[0101] Further, the acquiring of the historical data corresponding to the previous time period, and determining the filling data according to the historical data difference between the start time and the end time of the complement time period and the historical data corresponding to the previous time period, includes:
[0102] Obtaining historical data corresponding to the sampling time point in the previous time period;
[0103] Determine the data difference Δd of the previous time period according to the historical data of the start time and the end time of the previous time period;
[0104] If the historical data difference is greater than or equal to N*Δd, the historical data difference is evenly distributed to the sampling time points within the complement time period as the padding data corresponding to the sampling time points, where N is a positive integer;
[0105] If the historical data difference is less than N*Δd, the apportionment ratio corresponding to the sampling time point is determined according to the historical data corresponding to the previous time period, and the historical data difference is apportioned to the sampling time point according to the apportionment ratio to obtain the apportioned data at the sampling time point;
[0106] The padding data at the sampling time point is determined according to the historical data of the starting time of the complement time period and the apportioned data corresponding to the sampling time point.
[0107] Further, the performing a filling operation on the missing data according to the filling data includes:
[0108] The filling data of the sampling time point is filled into the position of the missing data in the historical data.
[0109] The missing data filling device provided in the embodiment of the present invention can execute the missing data filling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0110] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0111] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0112] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0113] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a method for filling in missing data.
[0114] In some embodiments, the missing data filling method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the missing data filling method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the missing data filling method in any other appropriate manner (for example, by means of firmware).
[0115] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0116] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0117] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0118] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0119] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0120] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0121] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0122] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for filling missing data, characterized in that: include: Determine missing data according to historical data associated with the building within a set historical time interval, wherein the historical data associated with the building is used to represent equipment data of set equipment in the building, and the equipment data includes detection data and / or operation data; Determine the data type of the missing data according to the attribute information of the missing data, and determine the complement time period according to the time corresponding to the missing data; Acquire the filling data corresponding to the missing data according to the data type and the complement time period, and perform a filling operation on the missing data according to the filling data.
2. The method according to claim 1, characterized in that The missing data include missing data and / or abnormal data; The determining of missing data according to historical data associated with the building within a set historical time interval includes: If the missing data is lost data, obtain a sampling time point where no historical data exists within the set historical time, and determine the missing data according to the lost data corresponding to the sampling time point; If the missing data is abnormal data, the abnormal data within the set historical time is obtained, and the missing data is determined based on the abnormal data, wherein the abnormal data includes data exceeding a business threshold and / or a cumulative value that violates an accumulation rule.
3. The method according to claim 1, characterized in that The determining the data type of the missing data according to the attribute information of the missing data, and determining the complement time period according to the time corresponding to the missing data, includes: Determine the data type of the missing data according to the attribute information of the historical data associated with the missing data, wherein the data type includes an instantaneous value, an enumerated value, and a cumulative value; The complement time period is determined according to the difference in sampling time points of the historical data adjacent to the missing data.
4. The method according to claim 3, characterized in that The step of obtaining the filling data corresponding to the missing data according to the data type and the complement time period includes: If the data type of the missing data is an instantaneous value, determining a previous time period according to the complement time period, and obtaining historical data corresponding to the previous time period as the filling data; If the data type of the missing data is an enumeration value, obtaining the historical data corresponding to the starting time of the complement time period as the filling data; If the data type of the missing data is a cumulative value, the previous time period is determined based on the complement time period, and the historical data corresponding to the previous time period is obtained. The filling data is determined based on the difference between the historical data at the start time and the end time of the complement time period and the historical data corresponding to the previous time period.
5. The method according to claim 4, characterized in that If the data type of the missing data is an instantaneous value, determining the previous time period according to the complement time period includes: If the data type of the missing data is an instantaneous value and the complement time period belongs to the first time range, a previous time period adjacent to the complement time period is determined as a previous time period, and the previous time period has the same duration as the complement time period; If the data type of the missing data is an instantaneous value and the complement time period belongs to a second time range, the time period of the previous similar day that is the same as the complement time period is determined as the previous time period, wherein the similar day is a weekday or a weekend, and the second time range is later than the first time range.
6. The method according to claim 4, characterized in that The acquiring of the historical data corresponding to the previous time period, and determining the filling data according to the historical data difference between the start time and the end time of the complement time period and the historical data corresponding to the previous time period, comprises: Obtaining historical data corresponding to the sampling time point in the previous time period; Determine the data difference Δd of the previous time period according to the historical data of the start time and the end time of the previous time period; If the historical data difference is greater than or equal to N*Δd, the historical data difference is evenly distributed to the sampling time points within the complement time period as the padding data corresponding to the sampling time points, where N is a positive integer; If the historical data difference is less than N*Δd, the apportionment ratio corresponding to the sampling time point is determined according to the historical data corresponding to the previous time period, and the historical data difference is apportioned to the sampling time point according to the apportionment ratio to obtain the apportioned data at the sampling time point; The padding data at the sampling time point is determined according to the historical data of the starting time of the complement time period and the apportioned data corresponding to the sampling time point.
7. The method according to claim 6, characterized in that The step of performing a filling operation on the missing data according to the filling data comprises: The filling data of the sampling time point is filled into the position of the missing data in the historical data.
8. A missing data filling device, characterized in that: include: A data determination module, used to determine missing data based on historical data associated with the building within a set historical time interval, wherein the historical data associated with the building is used to represent equipment data of set equipment in the building, and the equipment data includes detection data and / or operation data; A time period determination module, used to determine the data type of the missing data according to the attribute information of the missing data, and determine the complement time period according to the time corresponding to the missing data; The complement module is used to obtain the filling data corresponding to the missing data according to the data type and the complement time period, and perform a filling operation on the missing data according to the filling data.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the missing data filling method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the missing data filling method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Abnormal detection and correction method and system for classified data of source network load storage system
CN120994957A