Internet of Things continuous data segmentation method and device, electronic equipment and storage medium

By dividing the time range and obtaining the time node list in the Internet of Things devices, the problem of low efficiency of continuous data segmentation in the Internet of Things devices is solved, and low time complexity and efficient data segmentation are achieved.

CN119669239APending Publication Date: 2025-03-21BEIJING BOE ENERGY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411494130.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In IoT devices, it is difficult for the prior art to effectively segment continuous data, resulting in high time complexity and spatial complexity, affecting data analysis efficiency.

Method used

By determining the time range of the data to be queried, and when the time range is greater than the predetermined time interval, the time range is divided according to the predetermined time interval to obtain a time node list, and finally obtaining the segmented data set based on the time node list, realizing the segmentation of the data.

Benefits of technology

This method significantly reduces time complexity, improves the efficiency of data segmentation, and can quickly complete the segmentation of continuous data generated by IoT devices, which is suitable for various types of continuous data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669239A_ABST
    Figure CN119669239A_ABST
Patent Text Reader

Abstract

The invention provides an Internet of Things continuous data segmentation method and device, electronic equipment and a storage medium. The Internet of Things continuous data segmentation method comprises the steps of determining a time range of to-be-queried data; when the time range is greater than a preset time interval, dividing the time range of the to-be-queried data according to the preset time interval to obtain a time node list of the to-be-queried data; and obtaining a segmented data set of the to-be-queried data according to the time node list. The method has the advantages of being high in speed, high in efficiency and the like, is high in logic replicability, and can be applied to various types of continuous data generated by various types of Internet of Things equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of Internet of Things, and in particular to a method, device, electronic device and storage medium for segmenting continuous data of the Internet of Things. Background Art

[0002] With the development of IoT technology, more and more IoT devices are being used in various scenarios, generating a large amount of data. The data generated by IoT devices can be divided into two types: static data and dynamic data. Static data is mostly data such as tags and addresses, while dynamic data is mostly continuous data with time as the sequence and non-continuous data with time as the sequence.

[0003] In certain scenarios, continuous data needs to be segmented for subsequent analysis. Therefore, a data segmentation solution suitable for the Internet of Things is needed that can be implemented with lower time complexity and space complexity. Summary of the invention

[0004] In view of this, the present disclosure provides a method, device, electronic device and storage medium for continuous data segmentation in the Internet of Things.

[0005] According to a first aspect of the present disclosure, a method for segmenting continuous data of an Internet of Things is provided, and the method for segmenting continuous data of an Internet of Things comprises:

[0006] Determine a time range of the data to be queried, where the time range represents a period from a predetermined start time to a predetermined end time, and the data to be queried is continuous data generated by an IoT device;

[0007] When the time range is greater than a predetermined time interval, the time range of the data to be queried is divided according to the predetermined time interval to obtain a time node list of the data to be queried, the time node list comprising n time nodes arranged in time sequence, the time interval between adjacent time nodes being less than or equal to the predetermined time interval, and n being an integer greater than or equal to 3;

[0008] A segmented data set of the data to be queried is obtained according to the time node list, wherein the segmented data set includes n-1 data segments arranged in time sequence, and the start time and end time of each data segment are two adjacent time nodes in the time node list.

[0009] In some implementations of the first aspect of the present disclosure, the method further includes: when the time range of the data to be queried is less than or equal to the predetermined time interval, not performing segmentation of the data to be queried.

[0010] In some implementations of the first aspect of the present disclosure, the first time node in the time node list is the scheduled start time, and the last time node is the scheduled end time.

[0011] In some implementations of the first aspect of the present disclosure, dividing the time range of the data to be queried according to the predetermined time interval to obtain a time node list of the data to be queried includes:

[0012] Add m predetermined time intervals to the scheduled start time to obtain the m+1th time node, determine whether the m+1th time node is less than the scheduled end time, and if the m+1th time node is less than the scheduled end time, write the m+1th time node into the time node list and add 1 to m;

[0013] The above steps are executed in a loop until the m+1th time node is greater than or equal to the scheduled end time, and the scheduled end time is written into the time node list as the last time node;

[0014] Wherein, m=0, 1, ..., n-1, and n represents the total number of time nodes in the time node list.

[0015] In some embodiments of the first aspect of the present disclosure, obtaining a segmented data set of the data to be queried according to the time node list includes: starting from the first time node in the time node list, taking every two adjacent time nodes in the time node list as the start time and the end time, reading data segments one by one from the storage space of the data to be queried and writing the segmented data set in time sequence.

[0016] In some implementations of the first aspect of the present disclosure, the acquiring the segmented data set of the to-be-queried data according to the time node list includes:

[0017] The value of the loop flag is set to 1, the value of the time node identifier is set to 1, and the value of the total number of time nodes n in the time node list is determined;

[0018] Inserting the data value of the first piece of data in the data to be queried as the first data segment into the segmented data set;

[0019] In the process of successively increasing the value of the time node identifier by 1, the following steps are executed cyclically: setting the value of the data identifier to the value of the loop flag; when the value of the data identifier is less than the data length of the data to be queried, adjusting the value of the data identifier to a value that satisfies the following relationship: the start time of a piece of data corresponding to the data identifier is greater than and closest to the time node corresponding to the time node identifier; inserting the previous piece of data corresponding to the data identifier of the data to be queried into the segmented data set; resetting the value of the loop flag to the value of the data identifier minus 1;

[0020] When the value of the time node identifier reaches n, inserting the data value of the last piece of data in the data to be queried as the last data segment into the segmented data set;

[0021] Among them, the time node identifier is used to uniquely represent a time node, and the value of the time node identifier is 1, 2, ..., n, where n represents the total number of time nodes in the time node list; the data identifier is used to uniquely represent a piece of data in the data to be queried, and the value of the data identifier is 1, 2, ..., p, where p represents the data length of the data to be queried.

[0022] In some implementations of the first aspect of the present disclosure, the acquiring the segmented data set of the data to be queried according to the time node list further includes:

[0023] When the data segments corresponding to some time nodes in the time node list do not exist in the data to be queried, the data segments corresponding to the some time nodes in the segmented data set are completed using the data values ​​corresponding to the first data in the data to be queried, and the length of the first data is equal to the predetermined time interval.

[0024] A second aspect of the present disclosure provides an IoT continuous data segmentation device, comprising:

[0025] A time range determination unit, used to determine a time range of the data to be queried, wherein the time range represents a period from a predetermined start time to a predetermined end time, and the data to be queried is continuous data generated by an IoT device;

[0026] a time range division unit, configured to divide the time range of the data to be queried according to the predetermined time interval to obtain a time node list of the data to be queried, when the time range is greater than a predetermined time interval, wherein the time node list comprises n time nodes arranged in time sequence, and the time interval between adjacent time nodes is less than or equal to the predetermined time interval, and n is an integer greater than or equal to 3;

[0027] A segmented data acquisition unit is used to acquire a segmented data set of the data to be queried according to the time node list, wherein the segmented data set includes n-1 data segments arranged in time sequence, and the start time and end time of each data segment are two adjacent time nodes in the time node list.

[0028] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors and a memory storing a program, wherein the program comprises instructions, and when the instructions are executed by the processor, the processor executes the above method.

[0029] A fourth aspect of the present disclosure provides a computer-readable storage medium storing a program, wherein the program includes instructions, which, when executed by one or more processors of a computing device, cause the computing device to execute the above method.

[0030] It can be seen from the above technical solution that the disclosed embodiment first divides the time range to quickly obtain a time node list, and then uses the time node list to obtain a segmented data set of the data to be queried, thereby completing the segmentation of the continuous data generated by the IoT device with a lower time complexity. The method of the disclosed embodiment not only has the advantages of high speed and high efficiency, but also has strong logical replication, and can be applied to various types of continuous data generated by various IoT devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 A schematic diagram of a process flow of a method for segmenting continuous data of the Internet of Things provided by an embodiment of the present disclosure;

[0033] Figure 2 A schematic diagram of a process of dividing a time range according to a predetermined time interval involved in an embodiment of the present disclosure;

[0034] Figure 3 A schematic diagram of a process of obtaining a segmented data set of data to be queried according to a time node list according to an embodiment of the present disclosure;

[0035] Figure 4 A schematic diagram of the structure of a continuous data segmentation device for the Internet of Things provided by an embodiment of the present disclosure;

[0036] Figure 5 A schematic structural block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0038] The terms used in the embodiments of the present disclosure are only for the purpose of describing specific embodiments, and are not intended to limit the present disclosure. The singular forms "a", "said" and "the" used in the embodiments of the present disclosure and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0039] As used herein, the words "if," "if," and the like may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.

[0040] Figure 1 The flowchart of a method for segmenting continuous data of the Internet of Things provided by an embodiment of the present disclosure is shown. The method for segmenting continuous data of the Internet of Things can be applied to, but not limited to, Internet of Things devices or other similar electronic devices. Figure 1 , the method of the embodiment of the present disclosure may include the following steps:

[0041] Step 101, determine the time range of the data to be queried, the time range represents the period from the scheduled start time to the scheduled end time;

[0042] Step 102: when the time range is greater than the predetermined time interval, the time range of the data to be queried is divided according to the predetermined time interval to obtain a time node list of the data to be queried, the time node list comprising n time nodes arranged in time sequence, the time interval between adjacent time nodes being less than or equal to the predetermined time interval, and n being an integer greater than or equal to 3;

[0043] Step 103, obtaining a segmented data set of the data to be queried according to the time node list, wherein the segmented data set includes n-1 data segments arranged in time sequence, and the start time and end time of each data segment are two adjacent time nodes in the time node list.

[0044] In step 101, the time range represents the period from a predetermined start time to a predetermined end time. Assuming that the predetermined start time is a and the predetermined end time is b, the time range of the data to be queried can be expressed as [a, b].

[0045] In step 101, the data to be queried is continuous data generated by an Internet of Things device. The Internet of Things device can be, but is not limited to, various electronic devices in the Internet of Things.

[0046] In step 102, assuming that the predetermined time interval is represented by the value t, it can be determined whether t is greater than or equal to the difference obtained by subtracting a from b. If t is greater than or equal to the difference obtained by subtracting a from b, it indicates that the time range of the data to be queried is large and needs to be segmented, and the subsequent steps can be continued; if t is less than the difference obtained by subtracting a from b, it indicates that the time range of the data to be queried is small and does not need to be segmented, and the segmentation of the data to be queried is not performed, that is, the processing of steps 102 to 103 does not need to be performed.

[0047] Taking the query of data within a certain time range of an Internet of Things device from a specific database as an example, the specific implementation manner of the embodiments of the present disclosure is described.

[0048] Taking the database MongoDB as an example, first determine the time range of the data to be queried, and compare the time range with the predetermined time interval to determine whether it is necessary to segment the data. Assuming that the predetermined time interval is t and the time range is [a, b], if "t >= b - a" is satisfied, segmentation is required, and steps 102 to 103 described above are executed. If "t < b - a" is satisfied, it means that the time range of the data to be queried is small and does not need to be segmented, that is, steps 102 to 103 do not need to be executed, and the data can be directly queried from MongoDB.

[0049] In some embodiments, step 102 may include: adding m predetermined time intervals to the predetermined start time to obtain the (m + 1)-th time node, determining whether the (m + 1)-th time node is less than the predetermined end time. If the (m + 1)-th time node is less than the predetermined end time, write the (m + 1)-th time node into the time node list and increment m by 1; repeat this step until the (m + 1)-th time node is greater than or equal to the predetermined end time, and write the predetermined end time as the last time node into the time node list; where m = 0, 1,..., n - 1, and n represents the total number of time nodes in the time node list. Thus, the segmentation of the time range can be completed efficiently and quickly.

[0050] Still taking the query of continuous data x_list with a time range of [a, b] from MongoDB as an example, Figure 2 shows an exemplary implementation flow diagram of step 102. Refer to Figure 2 In step 102, the process of dividing the time range according to the predetermined time interval may include:

[0051] Step 201, the process starts, determine the time range [a, b] of the data to be queried and the predetermined time interval t, where a represents the predetermined start time and b represents the predetermined end time;

[0052] Step 202, initialize the time node list t_list;

[0053] Step 203, insert the first data a into the time node list t_list;

[0054] Step 204, determine whether a + t < b is satisfied. If so, continue to Step 205; otherwise, jump to Step 207;

[0055] Step 205, insert the next data "a + t" into the time node list t_list, where "a + t" represents the time node with a time interval of t from the data a;

[0056] Step 206, reset the value of a to a + t, that is, execute a += t, and return to Step 204;

[0057] Step 207, insert the last data b into the time node list t_list;

[0058] Step 208, output the time node list t_list{a, a + t, a + 2t, …, b}, and the process ends.

[0059] It should be noted that Figure 2 the implementation process of Figure 2 is only used as an example. Those skilled in the art should understand that in specific applications, any other applicable method can be used to implement it, not limited to

[0060] shown in the implementation method.

[0061] In some implementations, step 103 can obtain data segments one by one using the time nodes in the time node list based on the length of the data to be queried by setting a time node identifier and a data identifier, thereby obtaining a segmented data set of the data to be queried. The time node identifier is used to uniquely identify a time node in the time node list, and the data identifier is used to uniquely identify a piece of data in the data to be queried. Thus, the data segment can be obtained in combination with the actual length of the data to be queried and the time node list, which helps to ensure the accuracy of the segmented data set.

[0062] Further, step 103 may include steps a1 to a4 performed sequentially:

[0063] Step a1, setting the value of the loop flag to 1, setting the value of the time node identifier to 1, and determining the value of the total number of time nodes n in the time node list;

[0064] Step a2, inserting the data value of the first data in the data to be queried as the first data segment into the segmented data set;

[0065] Step a3, in the process of successively increasing the value of the time node identifier by 1, cyclically executing the following steps b1 to b4: Step b1, setting the value of the data identifier to the value of the loop flag; Step b2, when the value of the data identifier is less than the data length of the data to be queried, adjusting the value of the data identifier to a value that satisfies the following relationship: the start time of a piece of data corresponding to the data identifier is greater than and closest to the time node corresponding to the time node identifier; Step b3, inserting the previous piece of data corresponding to the data identifier of the data to be queried into the segmented data set; Step b4, resetting the value of the loop flag to the value of the data identifier minus 1;

[0066] Step a4, when the value of the time node identifier reaches n, insert the data value of the last piece of data in the data to be queried as the last data segment into the segmented data set;

[0067] Among them, the time node identifier is used to uniquely represent a time node, and the value of the time node identifier is 1, 2, ..., n, where n represents the total number of time nodes in the time node list; the data identifier is used to uniquely represent a piece of data in the data to be queried, and the value of the data identifier is 1, 2, ..., p, where p represents the data length of the data to be queried.

[0068] Therefore, the number of loop executions can be reduced by setting a loop flag bit for initializing data identification, thereby further improving the execution efficiency of data segmentation.

[0069] Further, in step 103, when there is no data segment corresponding to some time nodes in the time node list in the data to be queried, the data segment corresponding to the part of the time nodes in the segmented data set is filled with the data value corresponding to the first piece of data in the data to be queried, and the length of the first piece of data is equal to the predetermined time interval. The first piece of data in the data to be queried refers to the piece of data with the earliest start time and a length equal to the predetermined time interval in the data to be queried. Thus, the number of data segments in the segmented data set can correspond to the time nodes in the time node list, facilitating subsequent data analysis.

[0070] Still taking the query of data from MongoDB: x_list = db.collection.find({"t": {"$gte": a, "$lte": b}}) as an example, Figure 3 The flow diagram of splitting the data to be queried in step 103 is shown. Refer to Figure 3 As shown, the process of splitting the data to be queried according to the time node list in step 103 may include the following steps:

[0071] Step 301, determine the data to be queried x_list and its data length x_count. This x_count represents the number of pieces of data in the data to be queried x_list, and the length of each piece of data is equal to the predetermined time interval t;

[0072] Step 302, initialize the segmented data set v_list;

[0073] Step 303, insert the data value x_0_v of the first piece of data x_list[0] in x_list into v_list;

[0074] Step 304, initialize the loop start flag y = 1. y is the loop start flag for the data identifier i of x_list;

[0075] Step 305, determine the length t_count of t_list, and initialize the time node identifier j = 1 of t_list. t_count can indicate the number of time nodes in t_list;

[0076] Step 306, determine whether j < t_count - 1 is satisfied. If so, continue to step 307; otherwise, jump to step 315;

[0077] Step 307, determine whether the start time x_0_t of the first piece of data x_list[0] satisfies: x_0_t < t_list[j]. t_list[j] represents the j-th element in t_list, that is, the j-th time node in t_list. If so, jump to step 309; otherwise, continue to step 308;

[0078] Step 308, if x_0_t > t_list[j], directly insert the data value x_0_v of the first piece of data x_list[0] into v_list, and jump to Step 315;

[0079] Step 309, if x_0_t < t_list[j], initialize the data identifier i of x_list to y;

[0080] Step 310, determine whether i < x_count is satisfied. If so, continue to Step 311; otherwise, continue to Step 312;

[0081] Step 311, determine whether the start time x_i_t of the i-th piece of data x_list[i - 1] in x_list satisfies: x_i_t > t_list[j]. If so, jump to Step 313; otherwise, continue to Step 312;

[0082] Step 312, i += 1, that is, reset i = i + 1, and return to Step 310;

[0083] Step 313, insert the data value x_i-1_v of the (i - 1)-th piece of data x_list[i - 1] in x_list into v_list;

[0084] Step 314, reset y = i - 1. This step can reduce the loop times of the data identifier i of x_list in the next time and more quickly locate the data value in x_list;

[0085] Step 315, reset j = j + 1, and return to Step 306;

[0086] Step 316, insert the data value x_last_v of the last piece of data x_list[x_count - 1] in x_list into v_list;

[0087] Step 317, output the segmented data set v_list{x_0_v, x_1_v, x_2_v, …, x_last_v}.

[0088] As described above, based on the data length x_count of the data to be queried, the segmented data set v_list of the data to be queried x_list can be obtained using the time node list t_list, which is convenient for subsequent data analysis.

[0089] For special cases, that is, the length of the data to be queried x_list is less than the time range [a, b], that is, the data segments corresponding to some time periods in the time range [a, b] (that is, some time nodes in the time node list t_list) do not exist in the data to be queried x_list. At this time, the data segments corresponding to these time nodes can be filled with the first data segment queried in x_list. Figure 3 , step 303 inserts the data value x_0_v of the first data x_list[0] into v_list for the first time. This is the data corresponding to the first time node of t_list, which is equivalent to directly initializing the first data segment in the segmented data set v_list with the first data in x_list. In step 308, the data value x_0_v of the first data x_list[0] is inserted into v_list for the second time. This occurs in the loop after j=1 in t_list. This situation is only executed when "x_0_t>=t_list[j]" holds, that is, it is executed when the start time of the first data x_list[0] is greater than or equal to the jth time node, that is, it is executed when the data corresponding to the jth time node does not exist in x_list. It can be seen that, Figure 3 In the exemplary process of , in special cases (i.e., the length of the data to be queried x_list is less than the time range [a, b]), the first data in the data to be queried x_list will be used to complete the process. Similarly, if the corresponding data does not exist in x_list again at a subsequent time node, the first data in the data to be queried x_list can still be used to complete the process through steps 307 to 308.

[0090] For example, if you need to query the continuous data of a certain day in the time range of "01:00-10:00" in MongoDB, and the scheduled time interval is set to 1 hour, that is, the data is obtained every 1 hour. At this time, if the data of that day in MongoDB is actually saved from 03:00, then the actual length of the data to be queried will be less than the time range of "01:00-10:00", which is the special case mentioned above. At this time, the data segments of the two time nodes 01:00 and 02:00 can be filled with the first data queried in MongoDB on that day (that is, the data value x_0_v at 03:00).

[0091] The disclosed embodiment first divides the time range to quickly obtain a time node list of continuous data, and then uses the time node list to obtain a segmented data set to achieve segmentation of continuous data with lower time complexity, which helps to quickly complete subsequent analysis of related data. Therefore, the method of the disclosed embodiment not only has the advantages of high speed and high efficiency, but also has strong logical replication, and can be applied to continuous data segmentation of various IoT devices without preprocessing.

[0092] Figure 4 The schematic diagram of the structure of the continuous data segmentation device of the Internet of Things provided by the embodiment of the present disclosure is shown. Figure 4 , the IoT continuous data segmentation device 400 of the embodiment of the present disclosure may include:

[0093] A time range determination unit 401 is used to determine a time range of the data to be queried, where the time range represents a period from a predetermined start time to a predetermined end time, and the data to be queried is continuous data generated by the IoT device;

[0094] The time range division unit 402 is used to divide the time range of the data to be queried according to the predetermined time interval to obtain a time node list of the data to be queried when the time range is greater than the predetermined time interval, wherein the time node list includes n time nodes arranged in time sequence, and the time interval between adjacent time nodes is less than or equal to the predetermined time interval, and n is an integer greater than or equal to 3;

[0095] The segmented data acquisition unit 403 is used to acquire a segmented data set of the data to be queried according to the time node list, wherein the segmented data set includes n-1 data segments arranged in time sequence, and the start time and end time of each data segment are two adjacent time nodes in the time node list.

[0096] Furthermore, the IoT continuous data segmentation device 400 may also include: a judgment unit, used to judge whether the time range is greater than a predetermined time interval, if the time range is greater than the predetermined time interval, notifying the time range division unit 402 to divide the time range, if the time range of the data to be queried is less than or equal to the predetermined time interval, not notifying the time range division unit 402, so as not to perform segmentation of the data to be queried.

[0097] Furthermore, the first time node in the time node list is the scheduled start time, and the last time node is the scheduled end time.

[0098] Furthermore, the time range division unit 402 can be specifically used to: add m predetermined time intervals to the scheduled start time to obtain the m+1th time node, determine whether the m+1th time node is less than the scheduled end time, if the m+1th time node is less than the scheduled end time, write the m+1th time node into the time node list, and add 1 to m; loop through the above steps until the m+1th time node is greater than or equal to the scheduled end time, and write the scheduled end time as the last time node into the time node list; wherein, m=0,1,…,n-1, and n represents the total number of time nodes in the time node list.

[0099] Furthermore, the segmented data acquisition unit 403 can be used to: start from the first time node in the time node list, take every two adjacent time nodes in the time node list as the start time and the end time, read the data segments one by one from the storage space of the data to be queried and write them into the segmented data set in time sequence.

[0100] Further, the segmented data acquisition unit 403 can be specifically used to: set the value of the loop flag to 1, set the value of the time node identifier to 1, determine the value of the total number of time nodes n in the time node list; insert the data value of the first data in the data to be queried as the first data segment into the segmented data set; in the process of successively adding 1 to the value of the time node identifier, cyclically perform the following steps: set the value of the data identifier to the value of the loop flag; when the value of the data identifier is less than the data length of the data to be queried, adjust the value of the data identifier to a value that satisfies the following relationship: the start time of a data corresponding to the data identifier is greater than and closest to the start time of the data corresponding to the time node identifier time node; insert the previous data corresponding to the data identifier of the data to be queried into the segmented data set; reset the value of the loop flag to the value of the data identifier minus 1; when the value of the time node identifier reaches n, insert the data value of the last data in the data to be queried as the last data segment into the segmented data set; wherein, the time node identifier is used to uniquely represent a time node, and the value of the time node identifier is 1, 2, ..., n, and n represents the total number of time nodes in the time node list; the data identifier is used to uniquely represent a piece of data in the data to be queried, and the value of the data identifier is 1, 2, ..., p, and p represents the data length of the data to be queried.

[0101] Furthermore, the segmented data acquisition unit 403 can also be used to: when there are no data segments corresponding to some time nodes in the time node list in the data to be queried, use the data value corresponding to the first data in the data to be queried to complete the data segments corresponding to some time nodes in the segmented data set, and the length of the first data is equal to the predetermined time interval.

[0102] For other technical details about the IoT continuous data segmentation device 400, please refer to the method section above and will not be repeated here.

[0103] In a specific application, the IoT continuous data segmentation device 400 can be implemented by software, hardware, or a combination of both. For example, the IoT continuous data segmentation device 400 can be implemented as software running on the following electronic device 500.

[0104] In addition, an embodiment of the present disclosure also provides a computer-readable storage medium on which a computer program is stored. The program includes instructions, and when the instructions are executed by one or more processors of a computing device, the steps of the aforementioned Internet of Things continuous data segmentation method are executed.

[0105] Figure 5 FIG. 1 is a schematic diagram showing the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 The electronic device 500 may include: one or more processors 501, and a memory 502 storing one or more programs, which are executed by the one or more processors 501 to implement the method flow shown in the above embodiments of the present disclosure and / or program units corresponding to each unit in the device.

[0106] The various components are interconnected using different buses and can be mounted on a common motherboard or in other ways as needed. The processor 501 can process instructions executed within the electronic device, including instructions stored in or on the memory to display graphical information of the user interface on an external input / output device (such as a display device coupled to the interface). In other embodiments, if desired, multiple processors and / or multiple buses can be used with multiple memories and multiple memories.

[0107] The processor 501 may include one or more single-core processors or multi-core processors. The processor 501 may include any combination of general-purpose processors or dedicated processors (such as image processors, application processors, baseband processors, etc.).

[0108] The memory 502 is a computer-readable storage medium provided by the present disclosure, which can be used to store non-transient software programs, non-transient computer executable programs and units, such as the following in the embodiments of the present disclosure: Figure 1 The processor 501 executes the non-transient software programs, instructions and units stored in the memory 502, thereby executing the above method embodiments. Figure 1 The programs, instructions and units corresponding to the IoT continuous data segmentation method shown.

[0109] The electronic device 500 may further include: an input device 503 and an output device 504. The processor 501, the memory 502, the input device 503 and the output device 504 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0110] The input device 503 can receive input digital or character information, and generate signal input related to user settings and function control, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a track ball, a joystick and other input devices. The output device 505 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.

[0111] The above-mentioned programs (also referred to as software, software applications, or codes) include machine instructions for programmable processors, and these computer programs can be implemented using object-oriented programming languages, assembly or machine languages.

[0112] With the development of time and technology, the meaning of medium is becoming more and more extensive, and the propagation path of computer programs is no longer limited to tangible media, and can also be downloaded directly from the network, etc. Any combination of one or more computer-readable storage media can be used. Computer-readable storage media can be used but not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by or in combination with instruction execution systems, devices or devices.

[0113] In a specific implementation, the electronic device 500 may be implemented as an electronic device in the Internet of Things. The specific implementation form of the electronic device 500 is not limited in the embodiment of the present disclosure.

[0114] The technical solution provided by the present disclosure is described in detail above. The principles and implementation methods of the present disclosure are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present disclosure. At the same time, for those skilled in the art, according to the idea of ​​the present disclosure, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present disclosure.

[0115] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, etc. made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.

Claims

1. A method for segmenting continuous data of the Internet of Things, characterized in that: The Internet of Things continuous data segmentation method comprises: Determine a time range of the data to be queried, where the time range represents a period from a predetermined start time to a predetermined end time, and the data to be queried is continuous data generated by an IoT device; When the time range is greater than a predetermined time interval, the time range of the data to be queried is divided according to the predetermined time interval to obtain a time node list of the data to be queried, the time node list comprising n time nodes arranged in time sequence, the time interval between adjacent time nodes being less than or equal to the predetermined time interval, and n being an integer greater than or equal to 3; A segmented data set of the data to be queried is obtained according to the time node list, wherein the segmented data set includes n-1 data segments arranged in time sequence, and the start time and end time of each data segment are two adjacent time nodes in the time node list.

2. The method according to claim 1, characterized in that The method further includes: when the time range of the data to be queried is less than or equal to the predetermined time interval, not performing segmentation of the data to be queried.

3. The method according to claim 1, characterized in that The first time node in the time node list is the scheduled start time, and the last time node is the scheduled end time.

4. The method according to claim 1 or 3, characterized in that: The step of dividing the time range of the data to be queried according to the predetermined time interval to obtain a time node list of the data to be queried includes: Add m predetermined time intervals to the scheduled start time to obtain the m+1th time node, determine whether the m+1th time node is less than the scheduled end time, and if the m+1th time node is less than the scheduled end time, write the m+1th time node into the time node list and add 1 to m; The above steps are executed in a loop until the m+1th time node is greater than or equal to the scheduled end time, and the scheduled end time is written into the time node list as the last time node; Wherein, m=0, 1, ..., n-1, and n represents the total number of time nodes in the time node list.

5. The method according to claim 1, characterized in that The step of acquiring the segmented data set of the data to be queried according to the time node list includes: Starting from the first time node in the time node list, taking every two adjacent time nodes in the time node list as the start time and the end time, data segments are read one by one from the storage space of the data to be queried and written into the segmented data set in time sequence.

6. The method according to claim 1, characterized in that The step of acquiring the segmented data set of the data to be queried according to the time node list includes: The value of the loop flag is set to 1, the value of the time node identifier is set to 1, and the value of the total number of time nodes n in the time node list is determined; Inserting the data value of the first piece of data in the data to be queried as the first data segment into the segmented data set; In the process of successively increasing the value of the time node identifier by 1, the following steps are executed cyclically: setting the value of the data identifier to the value of the loop flag; when the value of the data identifier is less than the data length of the data to be queried, adjusting the value of the data identifier to a value that satisfies the following relationship: the start time of a piece of data corresponding to the data identifier is greater than and closest to the time node corresponding to the time node identifier; inserting the previous piece of data corresponding to the data identifier of the data to be queried into the segmented data set; resetting the value of the loop flag to the value of the data identifier minus 1; When the value of the time node identifier reaches n, inserting the data value of the last piece of data in the data to be queried as the last data segment into the segmented data set; Among them, the time node identifier is used to uniquely represent a time node, and the value of the time node identifier is 1, 2, ..., n, where n represents the total number of time nodes in the time node list; the data identifier is used to uniquely represent a piece of data in the data to be queried, and the value of the data identifier is 1, 2, ..., p, where p represents the data length of the data to be queried.

7. The method according to claim 1, characterized in that The step of obtaining the segmented data set of the data to be queried according to the time node list further includes: When the data segments corresponding to some time nodes in the time node list do not exist in the data to be queried, the data segments corresponding to the some time nodes in the segmented data set are completed using the data values ​​corresponding to the first data in the data to be queried, and the length of the first data is equal to the predetermined time interval.

8. An IoT continuous data segmentation device, characterized in that: include: A time range determination unit, used to determine a time range of the data to be queried, wherein the time range represents a period from a predetermined start time to a predetermined end time, and the data to be queried is continuous data generated by an IoT device; a time range division unit, configured to divide the time range of the data to be queried according to the predetermined time interval to obtain a time node list of the data to be queried, when the time range is greater than a predetermined time interval, wherein the time node list comprises n time nodes arranged in time sequence, and the time interval between adjacent time nodes is less than or equal to the predetermined time interval, and n is an integer greater than or equal to 3; A segmented data acquisition unit is used to acquire a segmented data set of the data to be queried according to the time node list, wherein the segmented data set includes n-1 data segments arranged in time sequence, and the start time and end time of each data segment are two adjacent time nodes in the time node list.

9. An electronic device, characterized in that: include: One or more processors and a memory storing a program, wherein the program comprises instructions, and when the instructions are executed by the processor, the processor executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a program, wherein the program comprises instructions, and when the instructions are executed by one or more processors of a computing device, the instructions cause the computing device to execute the method according to any one of claims 1 to 7.