Data interpolation method and device, electronic equipment and storage medium

By generating geometric shapes to fill in missing data, the problem of low analytical accuracy and false alarms caused by data discontinuity is solved, achieving smooth data transition and improved accuracy.

CN115630052BActive Publication Date: 2025-11-11CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211186404.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2025-11-11
Estimated Expiration
2042-09-27

AI Technical Summary

Technical Problem

The discontinuity of data reporting leads to low accuracy in data analysis and false alarms, especially due to the uncertainty of hardware devices and network access relationships, and the inaccuracy of analysis results caused by missing data.

Method used

By determining the time information and time intervals of historical data, geometric figures are generated. These geometric figures are then used to determine the target data for interpolation, filling in the missing data and achieving a smooth data transition.

Benefits of technology

It improves the accuracy of data analysis, reduces false alarms, ensures data continuity, and supports the integrity of subsequent analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115630052B_ABST
    Figure CN115630052B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data interpolation method and device, electronic equipment and storage medium, which can be applied to the field of computer technology, and specifically applied to the field of data processing. The data interpolation method comprises: determining N historical data and time information corresponding to each historical data, N is an integer greater than or equal to 2; determining whether two historical data based on the time sequence meet the predetermined interpolation condition according to the time interval between the two historical data in the N historical data; in the case of determining that the two historical data meet the predetermined interpolation condition, determining a geometric figure according to the two historical data and the time information corresponding to each historical data; and determining the target interpolation data according to the geometric figure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, specifically to the field of data processing, and more specifically to a data interpolation method, apparatus, electronic device, readable storage medium, and computer program product. Background Technology

[0002] Monitoring systems can collect metric-type data from target machines via network protocols and then analyze the data. For example, data collection intervals can be preset, and data can be collected according to these preset intervals. The operational status of the target machine can then be analyzed based on the collected data.

[0003] In practical applications, data reporting is constrained by factors such as uncertainties in hardware devices, the inherent uncertainties of the polling mechanism of the SNMP (Simple Network Management Protocol), and network access relationships. This results in poor continuity of uploaded data and missing data at certain predetermined intervals. Understandably, due to the incompleteness of the acquired data, the analysis results obtained based on this data suffer from low accuracy, leading to false alarms and alarm delays. Summary of the Invention

[0004] In view of the above problems, this disclosure provides a data interpolation method, apparatus, electronic device, readable storage medium, and computer program product.

[0005] According to a first aspect of this disclosure, a data interpolation method is provided, comprising: determining N historical data and time information corresponding to each historical data, where N is an integer greater than or equal to 2; determining whether two historical data satisfy a predetermined interpolation condition based on the time interval between two historical data that are adjacent in time order among the N historical data; if it is determined that the two historical data satisfy the predetermined interpolation condition, determining a geometric shape based on the two historical data and their respective time information; and determining target interpolated data based on the geometric shape.

[0006] According to an embodiment of this disclosure, determining the target interpolation data based on the geometric figure includes: determining the target time based on the time information corresponding to each of the two historical data; and determining the target interpolation data based on the geometric figure and the target time.

[0007] According to embodiments of this disclosure, determining N historical data and the time information corresponding to each historical data includes: acquiring historical data; and in response to detecting that the historical data does not correspond to time information, determining the time when the historical data was acquired as the time information corresponding to the historical data.

[0008] According to embodiments of this disclosure, the predetermined interpolation conditions include: the time interval between the two historical data is greater than a first predetermined duration and less than or equal to a second predetermined duration.

[0009] According to an embodiment of this disclosure, determining the geometric figure based on the two historical data and their corresponding time information includes: determining the coordinates of the two historical data based on their respective values ​​and corresponding time information; and determining the geometric figure based on the coordinates of the two historical data.

[0010] According to embodiments of this disclosure, determining the geometric figure based on the coordinates of the two historical data points includes: in response to detecting that the number of the N historical data points is 2, determining a linear geometric figure based on the coordinates of the two historical data points; and in response to detecting that the number of the N historical data points is greater than or equal to 3, determining a curved geometric figure based on the coordinates of the two historical data points and the coordinates of predetermined data; wherein the predetermined data includes at least one historical data point other than the two historical data points among the N historical data points, and the coordinates of the predetermined data are determined based on the value of the predetermined data and the corresponding time information.

[0011] According to embodiments of this disclosure, the method further includes: after determining the target interpolation data, interpolating the N historical data using the target interpolation data.

[0012] A second aspect of this disclosure provides a data interpolation apparatus, comprising: a first determining module, a second determining module, a third determining module, and a fourth determining module. The first determining module is used to determine N historical data points and time information corresponding to each historical data point, where N is an integer greater than or equal to 2. The second determining module is used to determine whether two historical data points, based on the time interval between two historical data points that are adjacent in chronological order among the N historical data points, satisfy a predetermined interpolation condition. The third determining module is used to determine a geometric shape based on the two historical data points and their respective time information, provided that the predetermined interpolation condition is satisfied. The fourth determining module is used to determine target interpolated data based on the geometric shape.

[0013] A third aspect of this disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the data interpolation method.

[0014] A fourth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the data interpolation method described above.

[0015] The fifth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described data interpolation method.

[0016] According to the technical solution provided in the embodiments of this disclosure, when the collected historical data is incomplete, the geometric shape can be determined based on the existing historical data, and then the smooth transition data between two adjacent data can be determined based on the geometric shape, that is, the target interpolation data is obtained, thereby solving the problem of low data analysis accuracy caused by data discontinuity and achieving the effect of reducing false alarms. Attached Figure Description

[0017] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0018] Figure 1 The illustrations depict application scenarios of data interpolation methods, apparatus, devices, media, and program products according to embodiments of the present disclosure.

[0019] Figure 2 A flowchart illustrating a data interpolation method according to an embodiment of the present disclosure is shown schematically.

[0020] Figure 3 A schematic diagram illustrating the principle of a data interpolation method according to an embodiment of the present disclosure is shown.

[0021] Figure 4 A schematic block diagram of a data interpolation apparatus according to an embodiment of the present disclosure is shown; and

[0022] Figure 5 A block diagram schematically illustrates an electronic device suitable for implementing a data interpolation method according to an embodiment of the present disclosure. Detailed Implementation

[0023] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0024] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0025] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0026] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0027] For ease of understanding, this disclosure provides explanations of relevant technical terms.

[0028] A distributed system is a software system built on a network. Due to the nature of software, distributed systems exhibit high cohesion and transparency. A distributed system has only one model or paradigm. Above the operating system, there is a layer of middleware responsible for implementing this model.

[0029] Middleware is a type of software that sits between application systems and system software. It uses the basic services (functions) provided by the system software to connect various parts of application systems or different applications on the network, thereby achieving the purpose of resource sharing and function sharing.

[0030] Redis is an open-source, network-enabled, in-memory or persistent, log-structured key-value database written in ANSI C, and provides APIs for multiple languages.

[0031] Network performance indexes are key metrics for network devices. For example, routers have metrics such as the number of ports, throughput, traffic, and packet loss.

[0032] A monitoring system is primarily used to monitor the operational status of systems and network information. This includes monitoring hosts, network devices, and other metrics, as well as database middleware and business data status.

[0033] Figure 1 The illustration shows an application scenario of a data interpolation method, apparatus, device, medium, and program product according to embodiments of the present disclosure.

[0034] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, network 104, and server 105. Network 104 is used as a medium to provide a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0035] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0036] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0037] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0038] It should be noted that the data interpolation method provided in this embodiment can generally be executed by server 105. Correspondingly, the data interpolation device provided in this embodiment can generally be located in server 105. The data interpolation method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the data interpolation device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.

[0039] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0040] The following will be based on Figure 1 The described scene, through Figures 2-3 The data interpolation method of the disclosed embodiments will be described in detail.

[0041] Figure 2 A flowchart illustrating a data interpolation method according to an embodiment of the present disclosure is shown schematically.

[0042] like Figure 2 As shown, the data interpolation method of this embodiment includes operations S210 to S250.

[0043] In operation S210, N historical data points and the time information corresponding to each historical data point are determined, where N is an integer greater than or equal to 2.

[0044] For example, historical data refers to data collected from the metrics of a target device, which may include routers or other network devices. The categories of historical data are related to the target device being monitored. For example, the categories of historical data may include temperature, fan speed, CPU utilization, memory utilization, number of ports, throughput, traffic, packet loss rate, etc.

[0045] For example, each historical data point corresponds to time information, which can indicate the time when the historical data was generated or the time when the historical data was collected.

[0046] After collecting historical data, it can be stored in the system cache or an in-memory database, such as Redis. Furthermore, during storage, historical data can be stored in key-value pairs, for example, using the identifier of the historical data as the key and the value of the historical data as the value.

[0047] In operation S220, based on the time interval between two historical data that are adjacent in time order among N historical data, it is determined whether two historical data satisfy the predetermined interpolation conditions.

[0048] For example, if it is determined that two historical data points meet the predetermined interpolation conditions, operation S230 can be executed. For example, if it is determined that two historical data points do not meet the predetermined interpolation conditions, operation S250 can be executed.

[0049] For example, if four historical data points A, B, C, and D are collected, and the time information for these four historical data points A, B, C, and D is 01:00, 02:00, 05:00, and 15:00 AM respectively, it can be seen that if two historical data points that are adjacent in time sequence are grouped together, then the above four historical data points A, B, C, and D include three groups of data. The first group of data includes historical data points A and B, with a time interval of 1 minute between them. The second group of data includes historical data points B and C, with a time interval of 3 minutes between them. The third group of data includes historical data points C and D, with a time interval of 10 minutes between them.

[0050] In one example, the time interval between two historical data points that are chronologically adjacent can be compared with a first predetermined duration. If the time interval is greater than the first predetermined duration, the two historical data points are determined to meet the predetermined interpolation condition. If the time interval is less than or equal to the first predetermined duration, the two historical data points are determined not to meet the predetermined interpolation condition.

[0051] For example, when the first predetermined duration is 2 minutes, it can be seen that the second and third sets of data meet the predetermined interpolation conditions, while the first set of data does not meet the predetermined interpolation conditions.

[0052] In another example, the time interval between two historical data that are adjacent in time order can be compared with a first predetermined duration and a second predetermined duration. If the time interval is greater than the first predetermined duration and less than or equal to the second predetermined duration, it is determined that the two historical data meet the predetermined interpolation conditions; otherwise, it is determined that the two historical data do not meet the predetermined interpolation conditions.

[0053] For example, when the first predetermined duration is 2 minutes and the second predetermined duration is 5 minutes, it can be seen that the second set of data satisfies the predetermined interpolation condition, while the first set of data and the third set of data do not satisfy the predetermined interpolation condition.

[0054] It can be seen that when determining whether the predetermined interpolation conditions are met by using the second predetermined duration, interpolation can be avoided for two historical data points if the time interval between them is too large. This allows for the completion of data missing in a short period of time in the historical data, thus avoiding inaccurate interpolation due to excessive data missing between the two historical data points.

[0055] In operation S230, the geometric shape is determined based on two historical data points and their corresponding time information.

[0056] For example, historical data values ​​can be used as the x-axis and time information as the y-axis. Historical data can be represented as a point in a coordinate system using both numerical and temporal information. Multiple historical data points can be created as points in the coordinate system, and then these points can be fitted together to obtain geometric shapes such as straight lines, circles, ellipses, and hyperbolas.

[0057] In operation S240, the target interpolation data is determined based on the geometric shape.

[0058] For example, select several points from the sub-graph located between two adjacent historical data points in the geometric figure, and determine the time information and values ​​corresponding to these points as the target interpolation data.

[0059] If two historical data points do not meet the predetermined interpolation conditions during operation S250, it means that the two historical data points are consecutive or the time interval is too large, and no interpolation operation is required.

[0060] In this case, the process can be terminated, for example. Alternatively, two historical data points that are adjacent in time order can be selected from N historical data points, and then operation S220 can be returned.

[0061] According to the technical solution provided in the embodiments of this disclosure, when the collected historical data is incomplete, the geometric shape can be determined based on the existing historical data, and then the smooth transition data between two adjacent data can be determined based on the geometric shape, that is, the target interpolation data is obtained, thereby solving the problem of low data analysis accuracy caused by data discontinuity and achieving the effect of reducing false alarms.

[0062] Furthermore, in practical applications, the technical solutions provided in this disclosure can be implemented across languages, such as on C++ platforms, Hadoop's big data processing components Flink and Spark.

[0063] In practical applications, after determining the target interpolation data, the target interpolation data can be used to interpolate N historical data, thereby achieving the effect of data completion and facilitating analysis using the completed data.

[0064] According to another embodiment of this disclosure, the operation of determining N historical data and the time information corresponding to each historical data can include the following operations: acquiring historical data, then detecting whether the historical data includes a time field; if it includes a time field, then using the time indicated by the time field as the time information corresponding to the historical data; if the historical data does not include a time field, then determining the time of acquiring the historical data as the time information corresponding to the historical data.

[0065] For example, the time field of historical data can represent the timestamp when the historical data was generated. If the historical data does not include a time field, it means that the timestamp is missing. This will make it impossible to analyze the historical data later. Therefore, the time when the historical data enters the processing component can be used as the time information corresponding to the historical data.

[0066] As can be seen, the embodiments of this disclosure can process historical data with missing timestamps, supplement the missing time information in the historical data, thereby ensuring that the historical data can be used for subsequent analysis.

[0067] According to another embodiment of this disclosure, for historical data carrying a time field, the time difference between the time field of the historical data and the time difference between the historical data entering the processing component can be determined, and then the time information corresponding to the historical data with the missing time field can be determined based on the time difference and the reception time of the historical data with the missing time field.

[0068] For example, if historical data Data_1 carries a time field, and the time when this historical data Data_1 is received is 2 milliseconds later than the time indicated by the time field, it means that historical data Data_1 required 2 milliseconds to be transmitted. When other historical data Data_2 with missing time fields is received, the time after subtracting 2 milliseconds from the time of receipt of historical data Data_2 can be used as the time information of historical data Data_2, thereby correcting the time information of historical data and reducing time errors.

[0069] According to another embodiment of this disclosure, the operation of determining the geometric shape based on two historical data points and their corresponding time information may include the following steps: determining the coordinates of each of the two historical data points based on their respective values ​​and corresponding time information; and then determining the geometric shape based on the coordinates of the two historical data points.

[0070] For example, by using time information as the horizontal axis and the numerical value of historical data as the vertical axis, the historical data can be identified as a point in the coordinate system using both time information and numerical value.

[0071] For example, multiple historical data points are created as points in a coordinate system, and then the points are fitted to obtain a geometric figure. The shape of the geometric figure can be linear or curved, and curved shapes can include circles, ellipses, hyperbolas, etc.

[0072] According to the technical solution provided in the embodiments of this disclosure, since points are generated based on historical data and geometric figures are fitted based on the points, the geometric figures can be accurately determined, thereby obtaining more accurate interpolation data.

[0073] In one example, when the number of N historical data points is 2, the geometric shape of the straight line is determined based on the coordinates of the two historical data points.

[0074] For example, the coordinates of two historical data points can be determined based on time information and data, as described above. For example, the coordinates of two points are (x1, y1) and (x2, y2), and the straight line determined by these two coordinates is y = y1 + (x - x1) * (y2 - y1) / (x2 - x1).

[0075] As can be seen, since there are only two historical data points, and considering that determining the linear geometry is simpler, and that the specific parameters of the curve fitting figure cannot be accurately determined based on two points, the linear geometry is fitted at this time.

[0076] In another example, when the number of N historical data points is greater than or equal to three, the geometry of the curve is determined based on the coordinates of two historical data points and the coordinates of a predetermined data point. The predetermined data point includes at least one historical data point from the N historical data points, excluding the other two. The coordinates of the predetermined data point are determined based on its numerical value and corresponding time information.

[0077] For example, the predetermined data can be either the previous historical data or the next historical data. It can be seen that two historical data points and the predetermined data can determine three points, and if these three points are not collinear, a circle can be determined.

[0078] Compared to linear geometric shapes, circles allow for a smoother transition between two adjacent historical data points, resulting in more accurate interpolated data. This makes the interpolated data more continuous and smooth, thereby improving the accuracy of data interpolation.

[0079] According to another embodiment of this disclosure, the operation of determining the target interpolation data based on the geometric figure may include the following operations: determining the target time based on the time information corresponding to each of the two historical data, and then determining the target interpolation data based on the geometric figure and the target time.

[0080] For example, the target time can be determined based on a predetermined time interval for data collection. For instance, if data is collected every minute and the time information between two adjacent historical data points is 8:01 and 8:04, then 8:02 and 8:03 can be determined as the target time.

[0081] For example, the number of target interpolation data points that need to be interpolated can be preset. For instance, if three data points are preset to be interpolated between two adjacent historical data points, the time between the two adjacent historical data points can be divided into three equal parts, thus obtaining three target times.

[0082] For example, by using the target time as the horizontal axis and substituting it into the above geometric figure, we can obtain the vertical axis corresponding to the target time. This vertical axis represents the value of the target interpolated data, and the target time represents the time information corresponding to the target interpolated data.

[0083] It is understandable that due to the lack of historical data, the time interval between two adjacent historical data points will be relatively long. By selecting a target time between two adjacent historical data points, and then determining the target interpolation data based on the geometric figure and the target time, the target interpolation data can be supplemented between two historical data points with a long time interval.

[0084] Figure 3 A schematic diagram illustrating a data interpolation method according to an embodiment of the present disclosure is shown.

[0085] like Figure 3 As shown in this embodiment, the data platform may include monitoring equipment, message middleware, processing components, and a database. The monitoring equipment collects data and then reports it to the processing component. The processing component can determine whether interpolation is needed based on the acquired data; if so, it generates target interpolated data based on historical data. The database stores the data collected by the monitoring equipment and the target interpolated data generated by the processing component.

[0086] For example, historical data collected by monitoring equipment can be stored in a system cache or in-memory database as key-value pairs, using the historical data's identifier as the key and its value as the value. Furthermore, if the historical data includes a time field, that time field is used to determine the corresponding time information. If the collected historical data lacks a time field, the time when the historical data entered the processing component can be used as the corresponding time information.

[0087] After receiving historical data collected by the monitoring system, the processing component can first determine whether other historical data was received before this historical data. If so, it compares the time information of the historical data with the time information of the preceding historical data to obtain the time interval.

[0088] Then, based on the time interval, it is determined whether the historical data and the previous historical data meet the predetermined interpolation conditions. If not, no interpolation operation is performed, and the historical data is stored. If it meets the conditions, the geometry is determined based on the received historical data, and then the target interpolation data is determined using the geometry.

[0089] For example, it can be determined whether the number of received historical data is greater than two. If the number is greater than two, a curved geometry can be determined, and the target interpolation data can be determined based on this curved geometry. If the number is equal to two, a linear geometry can be determined, and the target interpolation data can be determined based on this linear geometry. After obtaining the target interpolation data, it can be stored.

[0090] In practical applications, whenever the processing component receives new historical data, it can overwrite the previous historical data with the latest historical data. This overwriting process updates the most recently collected historical data, thus allowing the determination of the time interval between two adjacent historical data points upon receiving the next set of historical data, thereby determining whether interpolation is necessary. It is understandable that data stored in the database does not require overwriting.

[0091] The technical solutions provided in this disclosure are highly portable and widely applicable in various data acquisition modes. They can also be used for big data applications with high parallelism and multiple replicas.

[0092] To facilitate understanding, this disclosure provides examples to illustrate the determination of whether to use interpolation conditions.

[0093] For example, if the historical data category is port traffic (bps), the time information of the historical data can be used as the horizontal axis and the value of the historical data as the vertical axis, resulting in a data structure of: (historical data time information, historical data value). Furthermore, this historical data is collected every 60 seconds. If the time interval between two adjacent historical data points is greater than 1 minute and less than or equal to 5 minutes (here, 5 minutes is the second predetermined duration mentioned above), interpolation can be performed.

[0094] In one example, the collected data includes: t0 = (12:00, 40000), t1 = (12:01, 40001), t2 = (12:02, 40002), t3 = (12:03, 40003), and t4 = (12:04, 40004). Here, t0 = (12:00, 40000) indicates that the time information of the first historical data is 12:00, and the value is 40000. Other similar data will not be elaborated here. It can be seen that the above historical data is continuous and without missing data; therefore, it does not meet the predetermined interpolation conditions and no interpolation operation is required.

[0095] In another example, the collected data includes: t0 = (12:00, 40000), t1 = (12:04, 40004), and other data between 12:00 and 12:04 is missing. It can be seen that the time interval between two adjacent historical data points is 4 minutes, which is less than the second predetermined duration mentioned above, thus satisfying the predetermined interpolation condition.

[0096] In another example, the collected data includes: t0 = (12:00, 40000), t1 = (12:05, 40001), and other data between 12:00 and 12:05 is missing. It can be seen that the time interval between two adjacent historical data points is 5 minutes, which is equal to the second predetermined duration mentioned above, thus satisfying the predetermined interpolation condition.

[0097] In another example, the collected data includes: t0 = (12:00, 40000), t1 = (12:06, 40001). It can be seen that other data between 12:00 and 12:06 is missing. It can also be seen that the time interval between two adjacent historical data points is 6 minutes, which is longer than the second predetermined duration mentioned above, therefore the predetermined interpolation condition is not met.

[0098] To facilitate understanding, this disclosure provides examples of data interpolation operations.

[0099] In one example, taking t0 = (12:00, 40000) and t1 = (12:04, 40004) as an example, a straight line can be determined based on the coordinates (12:00, 40000) and (12:04, 40004). Then, 12:01, 12:02, and 12:03 are taken as target times. Substituting the target times into the straight line equation, the three target interpolation data can be obtained as (12:01, 40001), (12:02, 40002), and (12:03, 40003).

[0100] In another example, the coordinates corresponding to the three historical data points are t0 = (12:01, 40001), t1 = (12:02, 40003), and t4 = (12:05, 40008). It can be seen that there is no other historical data between t1 and t4, and the time interval is 4 minutes, which is less than the second predetermined duration (i.e., 5 minutes) mentioned above, thus meeting the predetermined interpolation conditions.

[0101] In this case, coordinate points (1, 1), (2, 3), and (5, 8) can be extracted from three historical data points. These three coordinate points can be used to determine the equation of a circular trajectory with a center of (48.5, -21.5) and a radius R of 52.55. Furthermore, the target interpolation time can include 12:03 and 12:04. Substituting the target interpolation time into the above circular trajectory equation, we can obtain the target interpolation data as t2 = (12:03, 40004.8) and t3 = (12:04, 40006.46).

[0102] Based on the above data interpolation method, this disclosure also provides a data interpolation device. The following will be combined with... Figure 4 The device is described in detail.

[0103] Figure 4 A schematic diagram illustrating the structure of a data interpolation apparatus according to an embodiment of the present disclosure is shown as follows: Figure 4 As shown, the data interpolation device 400 of this embodiment includes a first determining module 410, a second determining module 420, a third determining module 430 and a fourth determining module 440.

[0104] The first determining module 410 is used to determine N historical data points and the time information corresponding to each historical data point, where N is an integer greater than or equal to 2. In one embodiment, the first determining module 410 can be used to perform the operation S210 described above, which will not be repeated here.

[0105] The second determining module 420 is used to determine whether two historical data satisfy a predetermined interpolation condition based on the time interval between two historical data that are adjacent in time order among N historical data. In one embodiment, the second determining module 420 can be used to perform the operation S220 described above, which will not be repeated here.

[0106] The third determining module 430 is used to determine the geometric shape based on the two historical data and their corresponding time information, provided that two historical data satisfy a predetermined interpolation condition. In one embodiment, the third determining module 430 can be used to perform the operation S230 described above, which will not be repeated here.

[0107] The fourth determining module 440 is used to determine the target interpolation data based on the geometric shape. In one embodiment, the fourth determining module 440 can be used to perform the operation S240 described above, which will not be repeated here.

[0108] According to another embodiment of this disclosure, the fourth determining module includes a first determining submodule and a second determining submodule. The first determining submodule is used to determine the target time based on the time information corresponding to the two historical data. The second determining submodule is used to determine the target interpolation data based on the geometric figure and the target time.

[0109] According to another embodiment of this disclosure, the first determining module includes an acquisition submodule and a time determining submodule. The acquisition submodule is used to acquire historical data. The time determining submodule is used to determine the time of the acquired historical data as the time information corresponding to the historical data in response to detecting that the historical data does not correspond to time information.

[0110] According to another embodiment of this disclosure, the predetermined interpolation conditions include: the time interval between two historical data is greater than a first predetermined duration and less than or equal to a second predetermined duration.

[0111] According to another embodiment of this disclosure, the third determining module includes a coordinate determining submodule and a graphic determining submodule. The coordinate determining submodule is used to determine the coordinates of the two historical data points based on their respective numerical values ​​and corresponding time information. The graphic determining submodule is used to determine the geometric shape based on the coordinates of the two historical data points.

[0112] According to another embodiment of this disclosure, the graphic determination submodule includes a first determination unit and a second determination unit. The first determination unit is configured to determine a linear geometric shape based on the coordinates of the two historical data points when the number of N historical data points is detected to be two. The second determination unit is configured to determine a curved geometric shape based on the coordinates of the two historical data points and the coordinates of predetermined data when the number of N historical data points is greater than or equal to three. The predetermined data includes at least one historical data point from the N historical data points, excluding the two historical data points, and the coordinates of the predetermined data are determined based on the numerical value of the predetermined data and the corresponding time information.

[0113] According to another embodiment of this disclosure, the data interpolation device further includes an interpolation module, which is used to interpolate N historical data using the target interpolation data after determining the target interpolation data.

[0114] According to embodiments of this disclosure, any plurality of modules among the first determining module 410, the second determining module 420, the third determining module 430, and the fourth determining module 440 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the first determining module 410, the second determining module 420, the third determining module 430, and the fourth determining module 440 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the first determining module 410, the second determining module 420, the third determining module 430, and the fourth determining module 440 may be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.

[0115] Figure 5 A block diagram schematically illustrates an electronic device suitable for implementing a data interpolation method according to an embodiment of the present disclosure.

[0116] like Figure 5 As shown, an electronic device 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage portion 508 into a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0117] RAM 503 stores various programs and data required for the operation of electronic device 500. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 502 and / or RAM 503. It should be noted that the programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0118] According to embodiments of this disclosure, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to a bus 504. The electronic device 500 may also include one or more of the following components connected to the I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.

[0119] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0120] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 502 and / or RAM 503 and / or one or more memories other than ROM 502 and RAM 503 described above.

[0121] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the item recommendation method provided in the embodiments of this disclosure.

[0122] When the computer program is executed by the processor 501, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0123] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0124] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0125] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0126] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0127] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0128] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A data interpolation method, comprising: Determine N historical data points and the corresponding time information for each historical data point, where N is an integer greater than or equal to 2; Based on the time interval between two historical data points that are adjacent in time order among the N historical data points, determine whether the two historical data points meet the predetermined interpolation conditions; If the two historical data satisfy the predetermined interpolation conditions, the geometric figure is determined based on the two historical data and their respective time information. as well as Based on the described geometry, determine the target interpolation data.

2. The method according to claim 1, wherein, The step of determining the target interpolation data based on the geometric shape includes: Based on the time information corresponding to the two historical data sets, the target time is determined; and The target interpolation data is determined based on the geometry and the target time.

3. The method according to claim 1, wherein, The determination of N historical data points and the corresponding time information for each historical data point includes: Obtain historical data; and In response to the detection that the historical data does not correspond to time information, the time when the historical data was acquired is determined as the time information corresponding to the historical data.

4. The method according to claim 1, wherein, The predetermined interpolation conditions include: The time interval between the two historical data points is greater than a first predetermined duration and less than or equal to a second predetermined duration.

5. The method according to any one of claims 1 to 4, wherein, The step of determining the geometric shape based on the two historical data and their corresponding time information includes: Based on the numerical values ​​and corresponding time information of the two historical data points, determine the coordinates of each of the two historical data points; and The geometric shape is determined based on the coordinates of the two historical data points.

6. The method according to claim 5, wherein, Determining the geometric shape based on the coordinates of the two historical data points includes: In response to the detection that the number of the N historical data points is 2, a linear geometric shape is determined based on the coordinates of the two historical data points; and In response to detecting that the number of the N historical data is greater than or equal to 3, a curved geometric shape is determined based on the coordinates of the two historical data and the coordinates of a predetermined data; wherein, the predetermined data includes at least one historical data other than the two historical data in the N historical data, and the coordinates of the predetermined data are determined based on the value of the predetermined data and the corresponding time information.

7. The method according to claim 1, further comprising: After determining the target interpolation data The target interpolation data is used to interpolate the N historical data.

8. A data interpolation device, comprising: The first determining module is used to determine N historical data and the time information corresponding to each historical data, where N is an integer greater than or equal to 2; The second determining module is used to determine whether two historical data satisfy a predetermined interpolation condition based on the time interval between two historical data that are adjacent in time order among the N historical data. The third determining module is used to determine the geometric shape based on the two historical data and their respective time information, provided that the two historical data satisfy the predetermined interpolation conditions. as well as The fourth determining module is used to determine the target interpolation data based on the geometric shape.

9. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 7.

11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A method for forecasting the demand of emergency materials considering partial data ambiguity and missing

    CN109472346A

  • Method for realizing network optimization and related device

    WO2020125716A1