Missing data completion method and device, computer device and storage medium
By using spline interpolation functions to complete missing data in cable core temperature data, the problem of missing data in cable line monitoring was solved, improving data integrity and decision-making accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN POWER SUPPLY BUREAU
- Filing Date
- 2022-12-20
- Publication Date
- 2026-06-19
AI Technical Summary
In existing cable line monitoring technologies, data may be lost during communication, resulting in incomplete cable core temperature data, which affects back-end decision-making.
The missing temperature data is completed using a spline interpolation function. The initial temperature data within the target sampling period is obtained, a spline interpolation function is constructed, and the missing data is completed using this function.
It improves the accuracy and efficiency of data completion, making the generated completed temperature data closer to the real data and avoiding decision-making errors caused by missing data.
Smart Images

Figure CN116108324B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cable testing technology, and in particular to a method, apparatus, computer equipment, and storage medium for completing missing data. Background Technology
[0002] The most important data in a power system are the real-time current carrying capacity of the cable and the temperature of the cable core.
[0003] Currently, the method for detecting cable core temperature is as follows: real-time monitoring of cable line data, measurement of the temperature of the cable outer sheath or buffer layer by a power temperature sensor, and then theoretical calculation to deduce the cable core temperature.
[0004] However, existing cable line monitoring technology is based on theoretical calculations and requires high data accuracy. After the data passes through the communication process, some data may be missing, resulting in blank data, which may affect the back-end decision-making. Summary of the Invention
[0005] Therefore, it is necessary to provide a missing data completion method, apparatus, computer equipment, and storage medium that can effectively complete missing data in response to the above-mentioned technical problems.
[0006] Firstly, this application provides a method for completing missing data, the method comprising:
[0007] Acquire the initial temperature data of the target cable at each sampling time within the target sampling period;
[0008] Identify the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data;
[0009] Based on the initial temperature data corresponding to each sampling time within the target sampling period, construct the spline interpolation function corresponding to the target sampling period;
[0010] Missing temperature data are filled in using the spline interpolation function.
[0011] In one embodiment, based on the initial temperature data corresponding to each sampling time within the target sampling period, a spline interpolation function corresponding to the target sampling period is constructed, including:
[0012] The target sampling period is divided into multiple target sub-intervals containing missing sampling times; the temperature data corresponding to the endpoints of each target sub-interval is determined by the initial temperature data corresponding to each sampling time.
[0013] Based on the linear interpolation formula, determine the interval spline interpolation function corresponding to each target sub-interval.
[0014] In one embodiment, missing temperature data is completed according to a spline interpolation function, including:
[0015] By using the missing sampling time, the interval spline interpolation function corresponding to the missing sampling time is assigned a value to obtain the completed temperature value corresponding to the missing sampling time;
[0016] The missing temperature data corresponding to the missing sampling time is filled in by using the temperature value completion method.
[0017] In one embodiment, the target sampling period is divided into multiple target sub-intervals containing missing sampling times, including:
[0018] Multiple candidate sub-intervals are determined based on each sampling time;
[0019] Based on the missing sampling time, the selected sub-interval is adjusted to obtain multiple target sub-intervals that include the missing sampling time.
[0020] In one embodiment, determining missing temperature data in the initial temperature data includes:
[0021] Acquire the initial current data of the target cable at each sampling time;
[0022] For any given sampling time, if the initial temperature data corresponding to that sampling time is missing, and the initial current data corresponding to that sampling time is not abnormal, then the initial temperature data corresponding to that sampling time is determined to be missing temperature data.
[0023] In one embodiment, based on the initial temperature data corresponding to each sampling time within the target sampling period, a spline interpolation function corresponding to the target sampling period is constructed, including:
[0024] If the initial temperature data corresponding to the endpoint of the target sampling period is missing, then the associated temperature data is obtained, where the associated temperature data is the initial temperature data corresponding to the endpoint of the sampling period adjacent to the target sampling period.
[0025] Based on the initial temperature data corresponding to the endpoints of the sampling period, the initial temperature data corresponding to the endpoints of the target sampling period is completed.
[0026] Based on the initial temperature data corresponding to each sampling time within the completed target sampling period, construct the spline interpolation function corresponding to the target sampling period.
[0027] Secondly, this application also provides a missing data completion device, which includes:
[0028] The acquisition module is used to acquire the initial temperature data of the target cable at each sampling time within the target sampling period;
[0029] The detection module is used to determine the missing temperature data in the initial temperature data, as well as the missing sampling time corresponding to the missing temperature data;
[0030] The module is used to construct the spline interpolation function corresponding to the target sampling period based on the initial temperature data corresponding to each sampling time within the target sampling period;
[0031] The completion module is used to complete missing temperature data based on spline interpolation functions.
[0032] Thirdly, this application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0033] Acquire the initial temperature data of the target cable at each sampling time within the target sampling period;
[0034] Identify the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data;
[0035] Based on the initial temperature data corresponding to each sampling time within the target sampling period, construct the spline interpolation function corresponding to the target sampling period;
[0036] Missing temperature data are filled in using the spline interpolation function.
[0037] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0038] Acquire the initial temperature data of the target cable at each sampling time within the target sampling period;
[0039] Identify the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data;
[0040] Based on the initial temperature data corresponding to each sampling time within the target sampling period, construct the spline interpolation function corresponding to the target sampling period;
[0041] Missing temperature data are filled in using the spline interpolation function.
[0042] Fifthly, this application also provides a computer program product comprising a computer program that, when executed by a processor, performs the following steps:
[0043] Acquire the initial temperature data of the target cable at each sampling time within the target sampling period;
[0044] Identify the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data;
[0045] Based on the initial temperature data corresponding to each sampling time within the target sampling period, construct the spline interpolation function corresponding to the target sampling period;
[0046] Missing temperature data are filled in using the spline interpolation function.
[0047] The aforementioned missing data completion method, apparatus, computer equipment, storage medium, and computer program product utilize the initial temperature data corresponding to each sampling time within the target sampling period to construct a spline interpolation function corresponding to the target sampling period. This spline interpolation function is constructed based on the valid temperature data (non-missing temperature data) in the initial temperature data, thus enabling the generated completed temperature data to be closer to the true data. Furthermore, since the spline interpolation function is the spline interpolation function corresponding to the target sampling period, it can uniformly complete multiple missing temperature data within the target sampling period, improving data completion efficiency. Attached Figure Description
[0048] Figure 1 This is a flowchart illustrating a missing data completion method in one embodiment;
[0049] Figure 2 This is a flowchart illustrating the process of determining missing temperature data in one embodiment;
[0050] Figure 3 This is a flowchart illustrating the process of completing the initial temperature data for the target sampling period in one embodiment.
[0051] Figure 4 This is a flowchart illustrating the process of constructing a spline interpolation function in one embodiment;
[0052] Figure 5 This is a schematic diagram of the candidate sub-interval and the target sub-interval in one embodiment;
[0053] Figure 6 This is a flowchart illustrating the missing data completion method in another embodiment;
[0054] Figure 7 This is a structural block diagram of a missing data completion device in one embodiment;
[0055] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0057] The missing data completion method provided in this application embodiment is applicable to scenarios where missing data needs to be completed. Optionally, this method can be executed by a computer device, which can be a server or a terminal device. Specifically, in one embodiment, as shown... Figure 1 As shown, the method specifically includes the following steps:
[0058] S101, acquire the initial temperature data of the target cable at each sampling time within the target sampling period.
[0059] The initial temperature data refers to the core temperature of the target cable. Each initial temperature data point may be valid or missing. For example, each initial temperature data point could be T... i =f(t) i ), t i This represents the i-th sampling time.
[0060] S102, determine the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data.
[0061] In this application, the missing temperature data corresponds to a null value (NULL), and the sampling time is the missing sampling time. Furthermore, the initial temperature data may include multiple missing temperature data points. The purpose of this application's embodiments is to complete the missing temperature data.
[0062] S103, construct the spline interpolation function corresponding to the target sampling period based on the initial temperature data corresponding to each sampling time within the target sampling period.
[0063] Understandably, in numerical analysis, spline interpolation uses a special piecewise polynomial interpolation form called a spline. Commonly used spline interpolation functions include cubic spline interpolation functions.
[0064] Specifically, the definition of the cubic spline interpolation function is:
[0065] Suppose that there are n+1 interpolation nodes x in the interpolation interval [a, b]. i (a = x0 < x1 < x2 < ... < x n-1 <x n =b), at node x i The function value y at that point i =f(x) i(i = 0, 1, ..., n). If the function S(x) satisfies the following conditions:
[0066] (1)S(x i )=f(x i )=y i , i = 0, 1, ..., n;
[0067] (2) In each interval [x i x i+1 S(x) on (i = 0, 1, ..., n) is a cubic polynomial S i (x);
[0068] (3) S(x) is twice continuously differentiable on [a, b], that is, S(x)∈C 2 [a, b];
[0069] Then S(x) is called the cubic spline interpolation function of f(x).
[0070] Specifically, the target period in this embodiment is taken as the aforementioned interval [a, b], and t is... i As x i The target period is divided into multiple sub-intervals, and the temperature values (T) at each sampling time within the target period are used. i The above f(x) is obtained i (i.e., y) i To construct cubic spline interpolation functions for each sub-interval, the cubic spline interpolation function in each sub-interval is a cubic polynomial, with time as the independent variable and temperature as the dependent variable.
[0071] S104, based on the spline interpolation function, completes the missing temperature data.
[0072] Specifically, since the independent variable of the cubic spline interpolation function is time and the dependent variable is temperature, substituting the missing sampling time into the above cubic polynomial will yield the completed temperature value (complete temperature data) corresponding to the missing temperature data. The missing temperature data is then completed based on the completed temperature data.
[0073] In the above-mentioned missing data completion method, the initial temperature data corresponding to each sampling time within the target sampling period is used to construct a spline interpolation function corresponding to the target sampling period. This spline interpolation function is constructed based on the valid temperature data (non-missing temperature data) in the initial temperature data, thus enabling the generated completed temperature data to be closer to the real data. In addition, since the spline interpolation function is the spline interpolation function corresponding to the target sampling period, it can uniformly complete multiple missing temperature data within the target sampling period, thereby improving the data completion efficiency.
[0074] In real-world scenarios, the reasons for missing temperature data may be: Reason 1: Temperature sensor malfunction. For example, the temperature sensor may lose information during data transmission due to network failure, resulting in incomplete data sets. Reason 2: Target cable malfunction. The temperature sensor may be unable to collect temperature data for a short period, and simultaneously, the current sensor on the target cable may also be unable to collect current data. If it is Reason 1, the occasionally missing temperature data needs to be completed through data cleaning. If it is Reason 2, the target cable can be identified as malfunctioning, and an alarm signal should be sent to the remote decision-making platform to obtain relevant control strategies to resolve the fault; data cleaning (abnormal data) is not necessary.
[0075] Therefore, in order to determine the cause of the malfunction, such as Figure 2 As shown, this embodiment provides an optional method for determining missing temperature data in the initial temperature data, that is, a method for refining S102. The specific implementation process may include:
[0076] S201, Obtain the initial current data corresponding to each sampling time of the target cable.
[0077] The sampling time for the initial temperature data is the same as the sampling time for the initial current data.
[0078] S202, for any sampling time, if the initial temperature data corresponding to that sampling time is missing, and the initial current data corresponding to that sampling time is not abnormal, then the initial temperature data corresponding to that sampling time is determined to be missing temperature data.
[0079] For any sampling time, if the initial temperature data at that sampling time is missing and the initial current data is not abnormal (no missing data), then the fault is caused by reason 1 above, and subsequent data cleaning (completion) is required.
[0080] In this embodiment, the initial current data is used to investigate the cause of the missing temperature data, which can avoid the invalid cleaning of data.
[0081] Furthermore, to ensure that the target period meets the conditions for constructing the interpolation function, it is first necessary to ensure that the endpoint values of the target sampling period are not missing. Specifically, for example... Figure 3 As shown, based on the initial temperature data corresponding to each sampling time within the target sampling period, a spline interpolation function corresponding to the target sampling period is constructed, including:
[0082] S301, if the initial temperature data corresponding to the endpoint of the target sampling period is missing, then obtain the associated temperature data.
[0083] Among them, the associated temperature data is the initial temperature data corresponding to the endpoints of the sampling periods adjacent to the target sampling period;
[0084] In the case of continuous temperature monitoring, the sampling endpoints of each sampling cycle are continuous. Therefore, if the starting point or ending point of the target sampling cycle is missing, the sampling cycle adjacent to the target sampling cycle can be retrieved from the historical database, and the endpoint values (valid data) of the adjacent sampling cycles can be used as the associated temperature data.
[0085] S302, based on the initial temperature data corresponding to the endpoints of the sampling period, complete the initial temperature data corresponding to the endpoints of the target sampling period.
[0086] For example, if the starting point of the target sampling period is missing, the initial temperature data at the end of the previous sampling period is used as the associated temperature data; if the end point of the target sampling period is missing, the initial temperature data at the starting point of the next sampling period is used as the associated temperature data. Specifically, the associated temperature data is used to fill in the missing endpoint values.
[0087] S303, based on the initial temperature data corresponding to each sampling time within the completed target sampling period, construct the spline interpolation function corresponding to the target sampling period.
[0088] In this embodiment, the initial temperature data of the target sampling period is supplemented by the initial temperature data of the adjacent sampling periods, so that the target sampling period meets the initial conditions for constructing the spline interpolation function.
[0089] like Figure 4 As shown, this embodiment provides an optional method for constructing a spline interpolation function corresponding to the target sampling period based on the initial temperature data corresponding to each sampling time within the target sampling period, that is, a method for refining S103. The specific implementation process may include:
[0090] S401 divides the target sampling period into multiple target sub-intervals that include missing sampling times.
[0091] It is understandable that the construction methods of cubic spline interpolation functions include three-angle interpolation algorithms and three-moment interpolation algorithms. In this embodiment, the three-moment interpolation algorithm will be used as an example for illustration. The construction process of the cubic spline interpolation function is as follows:
[0092] Step (1): Construct the interpolation sub-interval (i.e., the target sub-interval in this embodiment).
[0093] Among them, the spline interpolation function is a piecewise function, that is, it includes an interval spline interpolation function that corresponds one-to-one with each interpolation sub-interval;
[0094] Step (2): Assume that the cubic spline function has a second derivative at the interpolation nodes (the endpoints of the interpolation subintervals) (i.e., S'(x)). j ) = M j (j = 0, 1, ..., n) exists); and because the interpolation condition is S(x j-1 )=f(t j-1 ), S(x j )=f(t j Therefore, for any subinterval x∈[xj-1, xj], we can obtain the expression for the cubic spline interpolation function of S(x) on that subinterval:
[0095]
[0096] Where h is = x j -x j-1 ;S'(x j ) = M j (j = 0, 1, ..., n)
[0097] In this case, it is only necessary to determine M0, M1...M n The value of can be used to determine S(x);
[0098] Step (3): Furthermore, since it is assumed that the cubic spline function has a second derivative at the interpolation nodes (the endpoints of the interpolation sub-intervals), it also assumes that the cubic spline function has a first derivative at the interpolation nodes (the endpoints of the interpolation sub-intervals), i.e., it satisfies...
[0099] Therefore, by differentiating S(x) and according to... This equation relationship yields a system of three bending moment equations, which consists of n-1 equations. To determine M0, M1...M... n These n+1 unknowns require the use of endpoint conditions. In this implementation, the endpoint conditions used are natural boundary conditions.
[0100] Given the endpoint conditions, it is only necessary to solve n-1 equations to determine M0, M1...M n The values of are given by the following n-1 equations:
[0101]
[0102] in, λ z =1-μ z ,
[0103]
[0104] Step (4): After determining M0, M1...Mn After that, the expression of S(x) corresponding to each interpolation sub-interval is known. Within the interpolation sub-interval [xj-1,xj], when solving the interpolation corresponding to x at any time, it is only necessary to...
[0105] As can be seen from the above steps (1) to (4), in step (2), when determining the expression of the cubic spline interpolation function, it is necessary to know the endpoint values of each interpolation sub-interval. Therefore, the target sub-interval in this embodiment is the above interpolation sub-interval, and the condition that it must meet is: the temperature data corresponding to the endpoint of each target sub-interval is determined by the initial temperature data corresponding to each sampling time.
[0106] For example, for any target sub-interval, the endpoints of the target sub-interval can be two adjacent sampling times; or they can be composed of several adjacent sampling times.
[0107] In one embodiment, this embodiment provides an optional method for dividing the target sampling period into multiple target sub-intervals containing missing sampling times. That is, the process of constructing each target sub-interval can be: based on multiple candidate sub-intervals for each sampling time; based on the missing sampling times, the candidate sub-intervals are adjusted to obtain multiple target sub-intervals containing missing sampling times.
[0108] Among them, such as Figure 5 As shown, the starting point of the target period is taken as the endpoint of the first candidate sub-interval, which corresponds to sampling time 0. Sampling time 1 is taken as the end of the first candidate sub-interval and the starting point of the second sub-interval, and so on. It is assumed that the target period corresponds to n+k sampling times, where k sampling times correspond to k missing temperature data, namely Lose1, Lose2, Losek, etc.
[0109] Since interpolation cannot be performed within the candidate interval containing missing temperature data to obtain the corresponding interpolation function, in this embodiment, the candidate sub-interval is adjusted by merging the candidate sub-interval containing missing temperature data with its adjacent candidate sub-intervals. For ease of explanation, this corresponds to the n+1 interpolation points in S(x). In this embodiment, as shown... Figure 5 As shown, a total of n target sub-intervals and n+1 interpolation points are obtained.
[0110] S402, Based on the linear interpolation formula, determine the interval spline interpolation function corresponding to each target sub-interval.
[0111] The linear interpolation formula is equation (1) above.
[0112] Specifically, the missing sampling time is used to assign values to the interval spline interpolation function corresponding to the missing sampling time to obtain the completed temperature value corresponding to the missing sampling time; the completed temperature value is then used to complete the missing temperature data corresponding to the missing sampling time.
[0113] That is, within the interpolation sub-interval [xj-1, xj], when solving for the interpolation corresponding to any time x (i.e., any time t), it is only necessary to use the known M. j-1 M j y j-1 y j x j-1 x j That is, where y j-1 That is, T j-1 y j That is, T j ,x j-1 That is, tj-1, and xj is t. j-1 .
[0114] For example, based on the above embodiments, this embodiment provides an optional example of a missing data completion method. For instance... Figure 6 As shown, the specific implementation process includes:
[0115] S601, acquire the initial temperature data of the target cable at each sampling time within the target sampling period.
[0116] S602, acquire the initial current data of the target cable at each sampling time.
[0117] S603: For any sampling time, if the initial temperature data corresponding to that sampling time is missing, and the initial current data corresponding to that sampling time is not abnormal, then the initial temperature data corresponding to that sampling time is determined to be missing temperature data.
[0118] S604: Based on the initial temperature data corresponding to each sampling time within the target sampling period, construct the spline interpolation function corresponding to the target sampling period.
[0119] Specifically, multiple candidate sub-intervals are determined based on each sampling time; the candidate sub-intervals are adjusted based on the missing sampling time to obtain multiple target sub-intervals containing the missing sampling time; the temperature data corresponding to the endpoints of each target sub-interval is determined by the initial temperature data corresponding to each sampling time; and the interval spline interpolation function corresponding to each target sub-interval is determined based on the linear interpolation formula.
[0120] Furthermore, if the initial temperature data corresponding to the endpoint of the target sampling period is missing, the associated temperature data is obtained, wherein the associated temperature data is the initial temperature data corresponding to the endpoint of the sampling period adjacent to the target sampling period; based on the initial temperature data corresponding to the endpoint of the sampling period, the initial temperature data corresponding to the endpoint of the target sampling period is completed; based on the initial temperature data corresponding to each sampling time in the completed target sampling period, the spline interpolation function corresponding to the target sampling period is constructed.
[0121] S605 uses the missing sampling time to assign values to the interval spline interpolation function corresponding to the missing sampling time, thereby obtaining the completed temperature value corresponding to the missing sampling time.
[0122] S606 uses the temperature completion function to complete the missing temperature data corresponding to the missing sampling time.
[0123] The specific processes of S601-S606 described above can be found in the description of the above method embodiments. Their implementation principles and technical effects are similar, and will not be repeated here.
[0124] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.
[0125] Based on the same inventive concept, this application also provides a missing data completion device for implementing the missing data completion method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the missing data completion device provided below can be found in the limitations of the missing data completion method described above, and will not be repeated here.
[0126] In one embodiment, such as Figure 7 As shown, a missing data completion device 100 is provided, including: an acquisition module, a detection module, a construction module, and a completion module, wherein:
[0127] The acquisition module 110 is used to acquire the initial temperature data of the target cable at each sampling time within the target sampling period;
[0128] The detection module 120 is used to determine the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data;
[0129] Module 130 is used to construct a spline interpolation function corresponding to the target sampling period based on the initial temperature data corresponding to each sampling time within the target sampling period;
[0130] The completion module 140 is used to complete the missing temperature data according to the spline interpolation function.
[0131] In one embodiment, the building module 130 includes:
[0132] The segmentation submodule is used to divide the target sampling period into multiple target sub-intervals containing missing sampling times; wherein, the temperature data corresponding to the endpoint of each target sub-interval is determined by the initial temperature data corresponding to each sampling time.
[0133] Construct a submodule to determine the interval spline interpolation function corresponding to each target subinterval based on the linear interpolation formula.
[0134] In one embodiment, the sub-module is further configured to: determine multiple candidate sub-intervals based on each sampling time; and adjust the candidate sub-intervals based on the missing sampling time to obtain multiple target sub-intervals containing the missing sampling time.
[0135] In one embodiment, the detection module 120 is further configured to: acquire the initial current data of the target cable at each sampling time;
[0136] For any given sampling time, if the initial temperature data corresponding to that sampling time is missing, and the initial current data corresponding to that sampling time is not abnormal, then the initial temperature data corresponding to that sampling time is determined to be missing temperature data.
[0137] In one embodiment, the construction module 130 further includes a preprocessing submodule, which is used to: if the initial temperature data corresponding to the endpoint of the target sampling period is missing, obtain associated temperature data, wherein the associated temperature data is the initial temperature data corresponding to the endpoint of the sampling period adjacent to the target sampling period.
[0138] Based on the initial temperature data corresponding to the endpoints of the sampling period, the initial temperature data corresponding to the endpoints of the target sampling period is completed.
[0139] Based on the initial temperature data corresponding to each sampling time within the completed target sampling period, construct the spline interpolation function corresponding to the target sampling period.
[0140] Each module in the aforementioned missing data completion device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0141] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores XX data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a missing data completion method.
[0142] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0143] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0144] Acquire the initial temperature data of the target cable at each sampling time within the target sampling period;
[0145] Identify the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data;
[0146] Based on the initial temperature data corresponding to each sampling time within the target sampling period, construct the spline interpolation function corresponding to the target sampling period;
[0147] Missing temperature data are filled in using the spline interpolation function.
[0148] In one embodiment, when the processor executes the logic of a computer program to construct a spline interpolation function corresponding to the target sampling period based on the initial temperature data corresponding to each sampling time within the target sampling period, the specific steps are as follows: the target sampling period is divided into multiple target sub-intervals containing missing sampling times; wherein, the temperature data corresponding to the endpoints of each target sub-interval is determined by the initial temperature data corresponding to each sampling time; and the interval spline interpolation function corresponding to each target sub-interval is determined according to the linear interpolation formula.
[0149] In one embodiment, when the processor executes the logic of the computer program to complete the missing temperature data according to the spline interpolation function, it specifically implements the following steps: using the missing sampling time, assigning a value to the interval spline interpolation function corresponding to the missing sampling time to obtain the completed temperature value corresponding to the missing sampling time; using the completed temperature value to complete the missing temperature data corresponding to the missing sampling time.
[0150] In one embodiment, when the processor executes a computer program to divide the target sampling period into multiple target sub-intervals containing missing sampling times, the specific steps are as follows: determine multiple candidate sub-intervals based on each sampling time; adjust the candidate sub-intervals based on the missing sampling times to obtain multiple target sub-intervals containing missing sampling times.
[0151] In one embodiment, when the processor executes the logic of the computer program to determine the missing temperature data in the initial temperature data, it specifically implements the following steps: obtaining the initial current data of the target cable at each sampling time; for any sampling time, if the initial temperature data corresponding to that sampling time is missing and the initial current data corresponding to that sampling time is not abnormal, then the initial temperature data corresponding to that sampling time is determined to be the missing temperature data.
[0152] In one embodiment, when the processor executes the logic of a computer program to construct a spline interpolation function corresponding to the target sampling period based on the initial temperature data corresponding to each sampling time within the target sampling period, the specific steps are as follows: if the initial temperature data corresponding to the endpoints of the target sampling period is missing, then the associated temperature data is obtained, wherein the associated temperature data is the initial temperature data corresponding to the endpoints of the adjacent sampling periods of the target sampling period; based on the initial temperature data corresponding to the endpoints of the sampling periods, the initial temperature data corresponding to the endpoints of the target sampling period is completed; based on the completed initial temperature data corresponding to each sampling time within the target sampling period, the spline interpolation function corresponding to the target sampling period is constructed.
[0153] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0154] Acquire the initial temperature data of the target cable at each sampling time within the target sampling period;
[0155] Identify the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data;
[0156] Based on the initial temperature data corresponding to each sampling time within the target sampling period, construct the spline interpolation function corresponding to the target sampling period;
[0157] Missing temperature data are filled in using the spline interpolation function.
[0158] In one embodiment, when the logic of the computer program constructing the spline interpolation function corresponding to the target sampling period based on the initial temperature data corresponding to each sampling time within the target sampling period is executed by the processor, the following steps are specifically implemented: dividing the target sampling period into multiple target sub-intervals containing missing sampling times; wherein, the temperature data corresponding to the endpoints of each target sub-interval is determined by the initial temperature data corresponding to each sampling time; and determining the interval spline interpolation function corresponding to each target sub-interval according to the linear interpolation formula.
[0159] In one embodiment, when the logic of the computer program completing the missing temperature data according to the spline interpolation function is executed by the processor, the following steps are specifically implemented: using the missing sampling time, assigning a value to the interval spline interpolation function corresponding to the missing sampling time to obtain the completed temperature value corresponding to the missing sampling time; using the completed temperature value to complete the missing temperature data corresponding to the missing sampling time.
[0160] In one embodiment, when the logic of a computer program dividing a target sampling period into multiple target sub-intervals containing missing sampling times is executed by a processor, the following steps are specifically implemented: determining multiple candidate sub-intervals based on each sampling time; adjusting the candidate sub-intervals based on the missing sampling times to obtain multiple target sub-intervals containing missing sampling times.
[0161] In one embodiment, when the logic for determining missing temperature data in the initial temperature data is executed by the processor, the following steps are specifically implemented: obtaining the initial current data of the target cable at each sampling time; for any sampling time, if the initial temperature data corresponding to that sampling time is missing and the initial current data corresponding to that sampling time is not abnormal, then the initial temperature data corresponding to that sampling time is determined to be missing temperature data.
[0162] In one embodiment, when the logic of the computer program constructing the spline interpolation function corresponding to the target sampling period based on the initial temperature data corresponding to each sampling time within the target sampling period is executed by the processor, the following steps are specifically implemented: if the initial temperature data corresponding to the endpoints of the target sampling period is missing, then the associated temperature data is obtained, wherein the associated temperature data is the initial temperature data corresponding to the endpoints of the adjacent sampling periods of the target sampling period; based on the initial temperature data corresponding to the endpoints of the sampling periods, the initial temperature data corresponding to the endpoints of the target sampling period is completed; based on the completed initial temperature data corresponding to each sampling time within the target sampling period, the spline interpolation function corresponding to the target sampling period is constructed.
[0163] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0164] Acquire the initial temperature data of the target cable at each sampling time within the target sampling period;
[0165] Identify the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data;
[0166] Based on the initial temperature data corresponding to each sampling time within the target sampling period, construct the spline interpolation function corresponding to the target sampling period;
[0167] Missing temperature data are filled in using the spline interpolation function.
[0168] In one embodiment, when the logic of the computer program constructing the spline interpolation function corresponding to the target sampling period based on the initial temperature data corresponding to each sampling time within the target sampling period is executed by the processor, the following steps are specifically implemented: dividing the target sampling period into multiple target sub-intervals containing missing sampling times; wherein, the temperature data corresponding to the endpoints of each target sub-interval is determined by the initial temperature data corresponding to each sampling time; and determining the interval spline interpolation function corresponding to each target sub-interval according to the linear interpolation formula.
[0169] In one embodiment, when the logic of the computer program completing the missing temperature data according to the spline interpolation function is executed by the processor, the following steps are specifically implemented: using the missing sampling time, assigning a value to the interval spline interpolation function corresponding to the missing sampling time to obtain the completed temperature value corresponding to the missing sampling time; using the completed temperature value to complete the missing temperature data corresponding to the missing sampling time.
[0170] In one embodiment, when the logic of a computer program dividing a target sampling period into multiple target sub-intervals containing missing sampling times is executed by a processor, the following steps are specifically implemented: determining multiple candidate sub-intervals based on each sampling time; adjusting the candidate sub-intervals based on the missing sampling times to obtain multiple target sub-intervals containing missing sampling times.
[0171] In one embodiment, when the logic for determining missing temperature data in the initial temperature data is executed by the processor, the following steps are specifically implemented: obtaining the initial current data of the target cable at each sampling time; for any sampling time, if the initial temperature data corresponding to that sampling time is missing and the initial current data corresponding to that sampling time is not abnormal, then the initial temperature data corresponding to that sampling time is determined to be missing temperature data.
[0172] In one embodiment, when the logic of the computer program constructing the spline interpolation function corresponding to the target sampling period based on the initial temperature data corresponding to each sampling time within the target sampling period is executed by the processor, the following steps are specifically implemented: if the initial temperature data corresponding to the endpoints of the target sampling period is missing, then the associated temperature data is obtained, wherein the associated temperature data is the initial temperature data corresponding to the endpoints of the adjacent sampling periods of the target sampling period; based on the initial temperature data corresponding to the endpoints of the sampling periods, the initial temperature data corresponding to the endpoints of the target sampling period is completed; based on the completed initial temperature data corresponding to each sampling time within the target sampling period, the spline interpolation function corresponding to the target sampling period is constructed.
[0173] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0174] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0175] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0176] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for missing data imputation, the method comprising: The method includes: Acquire the initial temperature data of the target cable at each sampling time within the target sampling period; Determine the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data; If the initial temperature data corresponding to the endpoint of the target sampling period is missing, then the associated temperature data is obtained; Based on the associated temperature data, the initial temperature data corresponding to the endpoints of the target sampling period is completed; wherein, the associated temperature data is the initial temperature data corresponding to the endpoints of the sampling periods adjacent to the target sampling period; Multiple candidate sub-intervals are determined based on each sampling time; Based on the missing sampling time, the candidate sub-intervals are adjusted by merging the candidate sub-intervals with missing temperature data with their adjacent candidate sub-intervals to obtain multiple target sub-intervals containing the missing sampling time; wherein, the temperature data corresponding to the endpoint of each target sub-interval is determined by the non-missing initial temperature data corresponding to each sampling time. Based on the linear interpolation formula, determine the interval spline interpolation function corresponding to each target sub-interval; The missing temperature data is completed according to the spline interpolation function.
2. The method of claim 1, wherein, The step of completing the missing temperature data according to the spline interpolation function includes: Using the missing sampling time, the interval spline interpolation function corresponding to the missing sampling time is assigned a value to obtain the completed temperature value corresponding to the missing sampling time; The missing temperature data corresponding to the missing sampling time is completed using the completed temperature value.
3. The method of claim 1, wherein, The process of determining the missing temperature data in the initial temperature data includes: Acquire the initial current data of the target cable at each sampling time; For any given sampling time, if the initial temperature data corresponding to that sampling time is missing, and the initial current data corresponding to that sampling time is not abnormal, then the initial temperature data corresponding to that sampling time is determined as the missing temperature data.
4. The method of claim 1, wherein, If the initial temperature data corresponding to the endpoint of the target sampling period is missing, then the associated temperature data is obtained, including: If the starting point of the target sampling period is missing, the initial temperature data at the end of the previous sampling period will be used as the associated temperature data. If the end point of the target sampling period is missing, the initial temperature data at the beginning of the next sampling period is used as the associated temperature data.
5. A missing data imputation device, characterized by, The device includes: The acquisition module is used to acquire the initial temperature data of the target cable at each sampling time within the target sampling period; The detection module is used to determine the missing temperature data in the initial temperature data, and the missing sampling time corresponding to the missing temperature data; A construction module is used to: acquire associated temperature data if the initial temperature data corresponding to the endpoints of the target sampling period is missing; complete the initial temperature data corresponding to the endpoints of the target sampling period based on the associated temperature data; wherein the associated temperature data is the initial temperature data corresponding to the endpoints of sampling periods adjacent to the target sampling period; determine multiple candidate sub-intervals according to each sampling time; adjust the candidate sub-intervals according to the missing sampling time, merging the candidate sub-intervals with missing temperature data with their adjacent candidate sub-intervals to obtain multiple target sub-intervals containing the missing sampling time; wherein the temperature data corresponding to the endpoints of each target sub-interval is determined by the non-missing initial temperature data corresponding to each sampling time; and determine the interval spline interpolation function corresponding to each target sub-interval according to the linear interpolation formula. The completion module is used to complete the missing temperature data according to the spline interpolation function. 6.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-5 when the computer program is executed by the processor. When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.