Data integration method, device, electronic device and storage medium
By obtaining and merging the initial data of time data and removing the overlapping parts, the problem that the time selector component cannot integrate the duplicate time data is solved, achieving resource conservation and user experience improvement.
Patent Information
- Application Number
- CN202210731183.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-06-24
AI Technical Summary
After receiving overlapping, crossing, or containing time data in time periods, the time selector component is unable to effectively integrate duplicate data, resulting in wasted computing resources and poor user experience.
By acquiring multiple time data and their initial data, determine whether there are overlapping parts, merge corresponding initial data, and eliminate the time data of the overlapping parts, and then determine the target data.
The integration and streamlining of repeated time data is achieved, repetitive calculations are avoided, computing pressure is reduced, resource waste is avoided, and user experience is improved.
Smart Images

Figure CN115098479B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer software technology, and in particular, to a data integration method, apparatus, electronic device, and storage medium. Background Art
[0002] In the related art, after a time selector component receives time data such as overlapping time periods, intersecting time periods, or included time periods, it is unable to integrate and streamline duplicate data, resulting in waste of computing resources caused by duplicate data calculation and a poor user experience. Summary of the Invention
[0003] In view of this, the present disclosure provides a data integration method, apparatus, electronic device, and storage medium.
[0004] In a first aspect of the present disclosure, a data integration method is provided, and the method includes:
[0005] Obtain a plurality of time data and initial data corresponding to each of the time data;
[0006] Determine whether there are first time data and second time data that at least partially overlap;
[0007] In response to the existence of first time data and second time data that at least partially overlap, merge first initial data corresponding to the first time data and second initial data corresponding to the second time data, and eliminate any one of the first overlapping initial data corresponding to the overlapping part of the time data to determine first target data.
[0008] In a possible implementation, the first time data includes: a first start time and a first end time; the second time data includes: a second start time;
[0009] The determining whether there are first time data and second time data that at least partially overlap includes:
[0010] Determine whether the first start time is less than or equal to the second start time, and whether the second start time is less than or equal to the first end time;
[0011] In response to the first start time being less than or equal to the second start time, and the second start time being less than or equal to the first end time, determine that the first time data and the second time data at least partially overlap.
[0012] In a possible implementation, the first time data includes: a first end time; the second time data includes: a second start time;
[0013] Determining whether there is at least partially overlapping first time data and second time data includes:
[0014] Determining whether the difference between the first end time and the second start time is a preset value;
[0015] In response to the difference between the first end time and the second start time being the preset value, determining that the first time data and the second time data at least partially overlap.
[0016] In a possible implementation manner, after determining a first target data by removing any one of the first overlapping initial data corresponding to the overlapping part of the time data, it includes:
[0017] Determining whether the first overlapping initial data is exactly the same as the first target data;
[0018] In response to the first overlapping initial data being exactly the same as the first target data, deleting the first overlapping initial data.
[0019] In a possible implementation manner, after determining a first target data by removing any one of the first overlapping initial data corresponding to the overlapping part of the time data, it includes:
[0020] Determining whether the first overlapping initial data is at least partially different from the first target data;
[0021] In response to the first overlapping initial data being at least partially different from the first target data, determining the first overlapping initial data as alternative data and saving the alternative data to a cloud database.
[0022] In a possible implementation manner, the alternative data includes: an access label, and the access label binds an access address of the alternative data;
[0023] The method further includes:
[0024] In response to receiving a target data access instruction, determining whether the first target time data corresponding to the first target data to be accessed overlaps at least partially with the first overlapping time data corresponding to the alternative data;
[0025] In response to the first target time data overlapping at least partially with the first overlapping time data, displaying the access label;
[0026] In response to a trigger operation on the access label, accessing the cloud database according to the access address to obtain the alternative data.
[0027] In a possible implementation, the first time data includes: a first start time, a first start time tag corresponding to the first start time, a first end time, and a first end time tag corresponding to the first end time; the second time data includes: a second start time, a second start time tag corresponding to the second start time, a second end time, and a second end time tag corresponding to the second end time;
[0028] After there are at least partially overlapping first time data and second time data, it further includes:
[0029] Determine whether the first start time tag is equal to the second start time tag, and determine whether the first end time tag is equal to the second end time tag;
[0030] In response to the first start time tag being equal to the second start time tag and the first end time tag being equal to the second end time tag, determine the minimum time value between the first start time and the second start time, and determine the maximum time value between the first end time and the second end time;
[0031] Use the minimum time value as the start time corresponding to the first target data, and use the maximum time value as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
[0032] In a possible implementation, after determining whether the first start time tag is equal to the second start time tag and determining whether the first end time tag is equal to the second end time tag, it further includes:
[0033] In response to the first start time tag being less than the second start time tag and the first end time tag being equal to the second end time tag, determine the maximum time value between the first end time and the second end time;
[0034] Use the first start time as the start time corresponding to the first target data, and use the maximum time value as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
[0035] In a possible implementation, after determining whether the first start time tag is equal to the second start time tag and determining whether the first end time tag is equal to the second end time tag, it further includes:
[0036] In response to the first start time tag being less than the second start time tag and the first end time tag being greater than the second end time tag, use the first start time as the start time corresponding to the first target data and use the first end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0037] In a possible implementation, after determining whether the first start time tag is equal to the second start time tag and determining whether the first end time tag is equal to the second end time tag, it further includes:
[0038] In response to the first start time tag being equal to the second start time tag and the first end time tag being less than the second end time tag, determine the minimum time value between the first start time and the second start time;
[0039] Use the minimum time value as the start time corresponding to the first target data and use the second end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0040] In a possible implementation, after determining whether the first start time tag is equal to the second start time tag and determining whether the first end time tag is equal to the second end time tag, it further includes:
[0041] In response to the first start time tag being equal to the second start time tag and the first end time tag being greater than the second end time tag, determine the minimum time value between the first start time and the second start time;
[0042] Use the minimum time value as the start time corresponding to the first target data and use the first end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0043] In a possible implementation, after determining whether the first start time tag is equal to the second start time tag and determining whether the first end time tag is equal to the second end time tag, it further includes:
[0044] In response to the first start time tag being greater than the second start time tag and the first end time tag being equal to the second end time tag, determine the maximum time value between the first end time and the second end time;
[0045] Use the second start time as the start time corresponding to the first target data, and use the maximum time value as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0046] In a possible implementation, after determining whether the first start time tag is equal to the second start time tag and determining whether the first end time tag is equal to the second end time tag, it further includes:
[0047] In response to the first start time tag being greater than the second start time tag and the first end time tag being greater than the second end time tag, use the second start time as the start time corresponding to the first target data, and use the first end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0048] In a possible implementation, the time data further includes: a third time data, and the third time data is different from the first time data and the second time data;
[0049] The method further includes:
[0050] Determine whether the third time data overlaps at least partially with the first time data or the second time data;
[0051] In response to the third time data overlapping at least partially with the first time data or the second time data, merge the third initial data corresponding to the third time data and the first initial data or the second initial data, and eliminate any one of the second overlapping initial data corresponding to the overlapping part of the time data to determine the second target data.
[0052] In a possible implementation, each time data includes: a first time part and a second time part;
[0053] The method further includes:
[0054] Determine the overlapping time points of the first time part and the second time part;
[0055] Divide the first target data with the overlapping time point as the midpoint to determine the first partial target data corresponding to the first time part and the second partial target data corresponding to the second time part.
[0056] In a possible implementation, the method further includes:
[0057] In response to receiving a call instruction, display the first target time data corresponding to the first target data;
[0058] In response to a selection operation on the first target time data, determine the call path of the call instruction, and display the first target time data at a position associated with the call path.
[0059] In a second aspect of the present disclosure, there is provided a data integration device, the device including:
[0060] An acquisition module, configured to acquire a plurality of time data and initial data corresponding to each of the time data;
[0061] A determination module, configured to determine whether there are first time data and second time data that at least partially overlap;
[0062] An integration module, configured to, in response to there being first time data and second time data that at least partially overlap, merge first initial data corresponding to the first time data and second initial data corresponding to the second time data, and eliminate any one of the first overlapping initial data corresponding to the time data of the overlapping part to determine first target data.
[0063] In a third aspect of the present disclosure, there is provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, the method described in the first aspect is implemented.
[0064] In a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores a set of instructions for an electronic device, and the set of instructions is used to cause the electronic device to execute the method described in the first aspect.
[0065] The data integration method, device, electronic device, and storage medium provided by the embodiments of the present disclosure acquire a plurality of time data and initial data corresponding to each time data, further determine whether there are first time data and second time data that at least partially overlap, and if there are first time data and second time data that at least partially overlap, merge first initial data corresponding to the first time data and second initial data corresponding to the second time data to obtain merged data, and then further eliminate any one of the first overlapping initial data corresponding to the time data of the overlapping part from the merged data, thereby determining first target data. It realizes the integration and streamlining of multiple repeated time data, avoids repeated calculation of data corresponding to overlapping times, reduces the calculation pressure, avoids waste of computing resources, and improves the user experience due to eliminating duplicate data. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] To more clearly illustrate the technical solutions in one or more embodiments of this specification or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only one or more embodiments of this specification. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0067] Figure 1 A schematic diagram showing exemplary time data with overlapping time periods according to an embodiment of the present disclosure.
[0068] Figure 2 A flowchart showing an exemplary determination process of target time data in a single-day scenario according to an embodiment of the present disclosure.
[0069] Figure 3 A schematic diagram showing the integrated target time data in a single-day scenario according to an embodiment of the present disclosure.
[0070] Figure 4 A schematic diagram showing time data set across days according to an embodiment of the present disclosure.
[0071] Figure 5 A schematic diagram showing multiple time data before integration according to an embodiment of the present disclosure.
[0072] Figure 6 A schematic diagram showing the integrated target time data of multiple time data according to an embodiment of the present disclosure.
[0073] Figure 7 A flowchart showing an exemplary method for data integration provided by an embodiment of the present disclosure.
[0074] Figure 8 A schematic diagram showing an exemplary device for data integration provided by an embodiment of the present disclosure.
[0075] Figure 9 A schematic diagram showing the structure of an exemplary electronic device provided by an embodiment of the present disclosure. Detailed implementation manners
[0076] To make the objectives, technical solutions, and advantages of the present disclosure clearer and more understandable, the following further details the present disclosure in combination with specific embodiments and with reference to the accompanying drawings.
[0077] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of this specification should have the ordinary meaning understood by those of ordinary skill in the art to which this disclosure pertains. The terms "first", "second" and similar words used in one or more embodiments of this specification do not denote any order, quantity or importance, but are only used to distinguish different components. Words such as "including" or "comprising" mean that the elements or items appearing before this word cover the elements or items listed after this word and their equivalents, without excluding other elements or items. Words such as "connected" or "linked" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
[0078] As described in the background art section, in the field of park Internet of Things management, a time selector component is used to set time plans, and any time period can be added. When the time selector component receives time data such as overlapping time periods, intersecting time periods or included time periods, it is unable to integrate and streamline duplicate data, resulting in waste of computing resources due to duplicate data calculation and a poor user experience.
[0079] In view of this, embodiments of the present disclosure provide a data integration method, device, electronic device and storage medium. The method includes: obtaining a plurality of time data and initial data corresponding to each of the time data; determining whether there are first time data and second time data that at least partially overlap; in response to there being first time data and second time data that at least partially overlap, merging first initial data corresponding to the first time data and second initial data corresponding to the second time data, and eliminating any one of the first overlapping initial data corresponding to the time data of the overlapping part to determine first target data.
[0080] The data integration method, device, electronic device and storage medium provided by the embodiments of the present disclosure obtain a plurality of time data and initial data corresponding to each time data, further determine whether there are first time data and second time data that at least partially overlap, and if there are first time data and second time data that at least partially overlap, merge first initial data corresponding to the first time data and second initial data corresponding to the second time data to obtain merged data, and then further eliminate any one of the first overlapping initial data corresponding to the time data of the overlapping part from the merged data, thereby determining first target data. It realizes the integration and streamlining of multiple duplicate time data, avoids duplicate calculation of data corresponding to overlapping times, reduces the computing pressure, avoids waste of computing resources, and improves the user experience due to the elimination of duplicate data.
[0081] Figure 1Schematic diagram showing exemplary time data with overlapping time periods according to an embodiment of the present disclosure.
[0082] Taking a video recording scenario as an example, when recording a target area through a device, a recording plan for at least one device can be set, that is, the recording time period planned to use at least one device for recording. The recording time period can be time data, and the recording data generated by the device within this recording time period can be initial data. For example, a recording time period of one week can be set for at least one device, and the time period for each day can be set to any time period between 00:00 and 23:59. As Figure 1 shown, the Vue-Cli framework (also known as a scaffolding, a progressive framework for building user interfaces) and Element UI (also known as an interactive interface desktop component library) can be used to create and set the planned time period. For example, the time selection component of Element UI and the function of dynamically adding and deleting form items can be used to set the time period, such as dynamically adding or deleting time periods.
[0083] However, due to possible misoperations when users set the time period, duplicate data such as duplicate time periods, overlapping time periods, or inclusive time periods may occur. For example, if one piece of time data is 01:00 - 03:00 and another piece of time data is also 01:00 - 03:00, then a duplicate time period appears. For a single device, the initial data within the duplicate time period is the same, and the system will repeatedly calculate the initial data within this time period, resulting in a waste of system computing resources.
[0084] For overlapping time periods, as Figure 1 shown, if one piece of time data is 13:43 - 17:43 and another piece of time data is 16:43 - 19:43, there is an overlap in the time period 16:43 - 17:43 in these two pieces of time data, and this time period can be called an overlapping time period. It can be understood that for a single device, the initial data within the overlapping time period is the same, and the system will repeatedly calculate the initial data within this time period, resulting in a waste of system computing resources.
[0085] For inclusive time periods, as Figure 1 shown, if one piece of time data is 15:43 - 19:43 and another piece of time data is 16:43 - 19:43, in these two pieces of time data, the time period 16:43 - 19:43 is included in the time period 15:43 - 19:43, and this time period can be called an inclusive time period. It can be understood that for a single device, the initial data corresponding to the included time data within the inclusive time period is the same, and the system will repeatedly calculate the initial data within this time period, resulting in a waste of system computing resources.
[0086] Based on the Vue-Cli framework and Element UI, integrated components can be designed. The judgment logic of the integrated components is used to integrate and streamline the time data corresponding to duplicate data. Among them, the integrated components can include TimeList (which can be the existing time data of the parent level), used to echo the editing state of the existing time data. After determining that the current integrated component is in an editable state, the non-empty TimeList array can be assigned to the variable domains of the integrated component, where domains can be time data, that is, any time period.
[0087] The variable domains can be two-way bound to all time data, and its initial value can be a two-dimensional empty array, and the length can be 7 for example. For example, a two-dimensional array can be 00:00 - 00:00. Among them, the "00", ":", "00", "-", "00", ":", "00" arranged in order form an initial value with a length of 7. In the scenario of setting time data for more than one day, each two-dimensional array can represent the set of time data for the current single day. By clicking the add time period interaction control in the integrated component, an empty array can be added to the domains variable. The newly added empty array is a three-dimensional array, which can represent one piece of time data for the current single day.
[0088] The variable domains can fold and store all the time data for the current single day in order, streamlining the current display page. After expanding the folded time data, each piece of time data can include two time values. In order from left to right, the first value is the start time of the time data, and the second value is the end time of the time data. For example, as Figure 1 shown, for the time data 15:43 - 19:43, "15:43" is the start time of the current time data, and "19:43" can be the end time of the current time data.
[0089] It should be noted that according to user needs, the variable domains can add multiple time data. To ensure the calculation efficiency of the system, a threshold for the added quantity can be set, for example, at most 8 time data can be added.
[0090] It should be noted that the following embodiments are described by taking the setting of time data for a single day as an example. The time data for a single day corresponds to 24 hours of the whole day, 60 minutes per hour. The start time in the time data can be any time from 00:00 - 23:59, and the end time can also be any time from 00:00 - 23:59, but the end time is not less than the start time to ensure that the time data does not cross days. When setting the time data for the whole day of a single day, the time data can be defaulted to 00:00 - 23:59.
[0091] Further, it is possible to determine whether two time data segments at least partially overlap by determining the magnitudes of the start time and the end time between the two time data segments. For example, when the start time of one time data segment is less than or equal to the start time of another time data segment, and the end time of one time data segment is less than or equal to the end time of another time data segment, it is determined that the two time data segments at least partially overlap. As Figure 1 shown, for the first time data segment from 15:43 to 19:43, the start time is 15:43 and the end time is 19:43. For the second time data segment from 16:43 to 19:43, the start time is 16:43 and the end time is 19:43. Among them, the start time 15:43 of the first time data segment is less than the start time 16:43 of the second time data segment, and the end time 19:43 of the first time data segment is equal to the end time 19:43 of the second time data segment, so the two time data segments at least partially overlap.
[0092] Still further, it is also possible to determine whether two time data segments at least partially overlap by the end time of one time data segment and the start time of another time data segment. For example, taking the minimum unit of each time data segment as 1 minute, when the difference between the end time 10:02 of one time data segment and the start time 10:03 of another time data segment is -1, the two time data segments can be considered as continuous time data, that is, the two time data segments are determined to at least partially overlap and can be integrated.
[0093] Each time data segment may further include a start time tag and an end time tag, and the start time tag and the end time tag may represent the date to which the corresponding time belongs. Taking the setting of one-week time data and the setting of time data within a single day as an example, the start time tag and the end time tag of each time data segment within a single day are equal. For example, when setting the time data for Monday, the start time tag and the end time tag of all time data on Monday can both be 1, indicating that all time data starts on Monday and also ends on Monday, and there is no time data that crosses days.
[0094] Figure 2 shows a flowchart of an exemplary determination process of target time data in a single-day scenario according to an embodiment of the present disclosure.
[0095] Refer to Figure 2 , the determination process of target time data in a single-day scenario may include:
[0096] S202: Determine the minimum time value among the first start time and the second start time, and determine the maximum time value among the first end time and the second end time;
[0097] S204: Use the minimum time value as the start time corresponding to the first target data, and use the maximum time value as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
[0098] In the scenario of setting time data within a single day, the start time tags of each time data are the same, and the end time tags are also the same. Then, when it is determined that there are at least two overlapping time data segments, the two time data segments and the corresponding initial data can be merged. Further, the minimum time value among the two start times in the two time data segments can be determined, and the minimum time value is used as the start time of the merged target time data. The maximum time value among the two end times in the two time data segments can be determined, and the maximum time value is used as the end time of the merged target time data.
[0099] Figure 3 Shows a schematic diagram of the integrated target time data in a single-day scenario according to an embodiment of the present disclosure.
[0100] For example, as Figure 1 shown, the first time data segment is 13:43 - 17:43, and the second time data segment is 16:43 - 19:43. The two at least partially overlap and can be integrated. The minimum start time among the two time data segments is 13:43, and the maximum end time among the two time data segments is 19:43. As Figure 3 shown, the integrated target time data is 13:43 - 19:43. After determining the target time data, since there is an overlapping time part in the two time data segments, and the initial data in the overlapping time part may be repeated after integration, it can be further integrated, and then the target data obtained after integrating the initial data is determined.
[0101] When the initial data corresponding to the time data to be integrated is collected by a single device, the initial data in the overlapping time part is exactly the same. To ensure that there is no redundant data in the target data, the initial data in the overlapping time part can be deleted, and any one of the initial data in the overlapping time part can be retained, and the other identical initial data can be deleted, so as to determine the integrated target data.
[0102] When the initial data corresponding to the time data to be integrated is collected by multiple devices, for example, the initial data corresponding to one time data segment is collected by device A, and the initial data corresponding to another time data segment is collected by device B. Then, due to different collection angles or regions, the initial data in the overlapping time part is at least partially different. To ensure that the integrated target data presents a segment of initial data in the overlapping time part and does not lose any segment of initial data, any segment of the initial data in the overlapping time part can be determined as the alternative data, and the alternative data is saved to the cloud database for waiting to be called.
[0103] Further, the alternative data may include access tags, where the access address of the alternative data is bound to the access tag. When a target data access instruction sent by the user is received, it is determined whether the time data corresponding to the target data the user wants to access overlaps at least partially with the time data corresponding to the alternative data. If there is at least partial overlap, the access tag of the alternative data can be displayed to the user. For example, the time data corresponding to the target data the user wants to access is 01:00 - 03:00, and the time data corresponding to the alternative data is 01:00 - 02:00, and the overlapping time data is 01:00 - 02:00. Then when the user accesses the target data, when reaching the 01:00 time point, the access tag can be displayed. The user can obtain the access address of the alternative data by triggering the access tag, and can choose to access the target data within the 01:00 - 02:00 time period, or access the alternative data within the 01:00 - 02:00 time period stored in the cloud database through the access address, avoiding the loss of the initial data corresponding to the same time data of different devices.
[0104] Figure 4 A schematic diagram of setting time data across days according to an embodiment of the present disclosure is shown.
[0105] Reference Figure 4 , since in different scenarios, when setting time data, it may occur that the time data spans at least two days. For example, one period of time data is (1)01:00 - (2)02:00, and another period of time data is (1)03:00 - (1)10:00, where "(1)" and "(2)" can be time tags. When setting time data across days, it is difficult to directly determine whether different time data overlaps at least partially only from the start time and end time of the time data. For example, only looking at the start time and end time, the time data 01:00 - 02:00 and the time data 03:00 - 10:00 do not overlap. However, since the time data 01:00 - 02:00 spans two days, the date of the time data can be distinguished by setting the tag of the start time and the tag of the end time for the scenario of setting time data across days.
[0106] It should be noted that for the time data (1) 01:00 - (2) 02:00, the start time label is (1) and the end time label is (2). For the time data (1) 03:00 - (1) 10:00, the start time label is (1) and the end time label is (1). Then it can be determined that the time data (1) 01:00 - (2) 02:00 represents the time period from 01:00 on the first day to 02:00 on the second day, and the time data (1) 03:00 - (1) 10:00 represents the time period from 03:00 on the first day to 10:00 on the first day. The second time data is included in the first time data, so the two at least partially overlap.
[0107] For the scenario of setting time data across days, the target time data corresponding to the target data can be determined through time labels. For example, after determining that two time data at least partially overlap, the two time data can be (1) 01:00 - (1) 05:00 and (1) 02:00 - (1) 03:00 respectively. When the start time label of the first time data is equal to the start time label of the second time data, and the end time of the first time data is equal to the end time of the second time data, it can be considered that the current scenario is the same as the scenario of setting time data on a single day. The smallest time value among the start times of the two time data can be determined, and this smallest time value is used as the start time of the target time data corresponding to the target data; the largest time value among the end times of the two time data can be determined, and this largest time value is used as the end time of the target time data corresponding to the target data. The obtained target time data is (1) 01:00 - (1) 05:00.
[0108] Furthermore, after determining that two time data at least partially overlap, the two time data can be (1) 01:00 - (2) 05:00 and (2) 02:00 - (2) 03:00 respectively. When the start time label of the first time data is less than the start time label of the second time data, and the end time of the first time data is equal to the end time of the second time data, since the start time of the first time data is before the start time of the second time data, regardless of the numerical size relationship between the two, the start time of the first time data can be used as the start time of the target time data corresponding to the target data; since the end time labels of the two time data are equal, the end times of the two time data are on the same day, so the largest time value among the end times of the two time data can be used as the end time of the target time data corresponding to the target data. The obtained target time data is (1) 01:00 - (2) 05:00.
[0109] Further, after determining that the two time data at least partially overlap, the two time data can be respectively (1) 01:00 - (3) 05:00 and (2) 02:00 - (2) 03:00. When the start time label of the first time data is less than the start time label of the second time data, and the end time of the first time data is greater than the end time of the second time data, since the start time of the first time data is before the start time of the second time data, regardless of the numerical size relationship between the two, the start time of the first time data can be used as the start time of the target time data corresponding to the target data; since the end time of the first time data is after the end time of the second time data, regardless of the numerical size relationship between the two, the end time of the first time data can be used as the end time of the target time data corresponding to the target data, that is, the second time data is included in the first time data, and the obtained target time data is (1) 01:00 - (3) 05:00.
[0110] Further, after determining that the two time data at least partially overlap, the two time data can be respectively (1) 01:00 - (1) 05:00 and (1) 02:00 - (2) 03:00. When the start time label of the first time data is equal to the start time label of the second time data, and the end time of the first time data is less than the end time of the second time data, since the start time labels of the two time data are equal, it can be determined that the start times of the two time data are on the same day, then the minimum time value among the start times of the two time data can be used as the start time of the target time data corresponding to the target data; since the end time of the second time data is after the end time of the first time data, regardless of the numerical size relationship between the two, the end time of the second time data can be used as the end time of the target time data corresponding to the target data, and the obtained target time data is (1) 01:00 - (2) 03:00.
[0111] Further, after determining that the two time data at least partially overlap, the two time data can be respectively (1) 01:00 - (3) 05:00 and (1) 02:00 - (2) 03:00. When the start time label of the first time data is equal to the start time label of the second time data, and the end time of the first time data is greater than the end time of the second time data, since the start time labels of the two time data are equal, it can be determined that the start times of the two time data are on the same day. Then, the minimum time value among the start times of the two time data can be used as the start time of the target time data corresponding to the target data. Since the end time of the first time data is after the end time of the second time data, regardless of the numerical size relationship between the two, the end time of the first time data can be used as the end time of the target time data corresponding to the target data, and the obtained target time data is (1) 01:00 - (3) 05:00.
[0112] Further, after determining that the two time data at least partially overlap, the two time data can be respectively (2) 01:00 - (2) 05:00 and (1) 02:00 - (2) 03:00. When the start time label of the first time data is greater than the start time label of the second time data, and the end time of the first time data is equal to the end time of the second time data, since the start time of the second time data is before the start time of the first time data, regardless of the numerical size relationship between the two, the start time of the second time data can be used as the start time of the target time data corresponding to the target data. Since the end time labels of the two time data are equal, the end times of the two time data are on the same day. Then, the maximum time value among the end times of the two time data can be used as the end time of the target time data corresponding to the target data, and the obtained target time data is (1) 02:00 - (2) 05:00.
[0113] Further, after determining that at least part of the two time data overlaps, the two time data can be (2) 01:00 - (3) 05:00 and (1) 02:00 - (2) 03:00 respectively. When the start time tag of the first time data is greater than the start time tag of the second time data, and the end time of the first time data is greater than the end time of the second time data, since the start time of the second time data is before the start time of the first time data, regardless of the numerical size relationship between the two, the start time of the second time data can be used as the start time of the target time data corresponding to the target data; since the end time of the first time data is after the end time of the second time data, regardless of the numerical size relationship between the two, the end time of the first time data can be used as the end time of the target time data corresponding to the target data, and the obtained target time data is (1) 02:00 - (3) 05:00.
[0114] It should be noted that the time data tags may not be set, and the start time and end time of the time data can be accumulated according to the date. For example, if the start time of a period of time data is 01:00 on the first day, the start time can be written as 01:00, and the end time of this period of time data is 02:00 on the second day, then the end time can be written as 26:00, that is, the time data across days is accumulated by multiplying the number of days it spans by 24 to obtain the new time data 01:00 - 26:00. In this way of determining each new time data, each time data can be regarded as on the same day. Therefore, when determining that at least part of the two time data overlaps, the smallest time value among the start times of the two time data can be used as the start time of the target time data corresponding to the target data, and the largest time value among the end times of the two time data can be used as the end time of the target time data corresponding to the target data.
[0115] Figure 5 Shows a schematic diagram before integrating multiple time data according to an embodiment of the present disclosure.
[0116] When there are multiple time data to be integrated, it can be determined whether at least part of each pair of time data overlaps. For example, as Figure 5 shown, the first time data can be 13:43 - 17:43, the second time data can be 16:43 - 19:43, and at this time there is a third time data different from the first two time data, and this time data can be 15:43 - 19:43.
[0117] Figure 6 Shows a schematic diagram of the target time data after integrating multiple time data according to an embodiment of the present disclosure.
[0118] After the target time data 13:43 - 19:43 has been obtained by integrating the first - period time data and the second - period time data, it is possible to determine whether the third - period time data overlaps with the target time data at least partially. When determining that the third - period time data overlaps with the target time data at least partially, the initial data corresponding to the third - period time data and the target data corresponding to the target time data can be merged. Further, any one of the overlapping initial data corresponding to the overlapping time data can be removed, as Figure 6 shown, and then the new target time data 13:43 - 19:43 is determined.
[0119] It should be noted that during the integration process of multiple time data, if there are initial data of multiple devices as overlapping initial data, the removed overlapping initial data can be stored in the cloud database for waiting to be called. And if there is a scenario of setting time data across days, the method for integrating multiple time data in the above - mentioned embodiment for the scenario of setting time data across days is used to integrate multiple time data.
[0120] In some embodiments, the integration component may include a full reset button (such as deleteStoragePlanAll), which can clear the time plans set in all devices by receiving a deletion request from the user. The integration component may also include a clear all plans button (such as clearPlan), and by triggering the clear all plans button, all the time plans configured for the current device can be reset. The integration component may further include a current click clear button (such as clearPlanByDay), and by triggering the current click clear button, a period of time plan or the full - day time plan of the single day currently clicked can be cleared.
[0121] In some embodiments, since the variable domains can represent time data, when determining whether two time data overlap at least partially and then integrating them, a setting times parameter i can be set with an initial value of 0. After each judgment of the variable domains, the times parameter i is incremented by 1 to determine the new i value. When the total number threshold of time data is M, when the value of i reaches M, it is determined that all time data has undergone the judgment process of whether integration is required.
[0122] In some embodiments, to meet the needs of different users, the time plan for a single day can be divided into two time parts. One time part can represent the morning period, and the other time part can represent the afternoon period. During the process of integrating data, the overlapping time points between the two time parts can be determined, such as 12:00. When integrating data, the target time data can be divided with the overlapping time point as the midpoint. For example, if the target time data is 10:00 - 15:00, after division, the target time data for the two parts are 10:00 - 12:00 and 12:00 - 15:00 respectively, and then the target data corresponding to the target time data for the two parts can be determined respectively.
[0123] In some embodiments, the time plans for multiple dates can be set to the same time plan. When the same time plan is set for each date, if each time data is added in sequence, many steps of repeated calculation will be generated. To simplify the setting of the same time plan in such a scenario, after receiving a call instruction, the set target time data in any one date can be displayed. In response to receiving a selection operation on the target time data, the call path of the call instruction can be determined. When the focus (such as the mouse cursor) clicks on the date "Tuesday", the call path can be bound to the time plan corresponding to "Tuesday", and the selected target time data can be displayed at the associated position of the time plan corresponding to "Tuesday", completing the call of the target time data and the target data.
[0124] Figure 7 The flowchart shows an exemplary method for data integration provided by an embodiment of the present disclosure.
[0125] A method 700 for data integration provided by an embodiment of the present disclosure. This method 700 can be executed by an integration control in an electronic device. This method 700 may include the following steps.
[0126] In step 702, the integration control can obtain multiple time data (for example, Figure 1 the time data 13:43 - 17:43 or the time data 16:43 - 19:43) and the initial data corresponding to each of the time data.
[0127] In step 704, the integration control can determine whether there is at least partially overlapping first time data (for example, Figure 1 the time data 13:43 - 17:43) and second time data (for example, Figure 1 the time data 16:43 - 19:43).
[0128] In some embodiments, the first time data may include: a first start time (for example, Figure 1at 13:43) and a first termination time (e.g., Figure 1 at 17:43); the second time data may include: a second start time (e.g., Figure 1 at 16:43); the integration control can determine whether the first start time is less than or equal to the second start time, and whether the second start time is less than or equal to the first termination time; in response to the first start time being less than or equal to the second start time, and the second start time being less than or equal to the first termination time, the integration control can determine that the first time data and the second time data at least partially overlap.
[0129] In some embodiments, the first time data may include: a first termination time (e.g., Figure 1 at 17:43); the second time data may include: a second start time (e.g., Figure 1 at 16:43); the integration control can determine whether the difference between the first termination time and the second start time is a preset value; in response to the difference between the first termination time and the second start time being the preset value, the integration control can determine that the first time data and the second time data at least partially overlap.
[0130] In step 704, in response to there being at least partially overlapping first time data and second time data, the integration control can merge the first initial data corresponding to the first time data and the second initial data corresponding to the second time data, and exclude any one of the first overlapping initial data corresponding to the overlapping part of the time data to determine the first target data.
[0131] In some embodiments, the integration control can determine whether the first overlapping initial data is exactly the same as the first target data; in response to the first overlapping initial data being exactly the same as the first target data, the integration control can delete any one of the first overlapping initial data. Thus, duplicate data is deleted to save system computing space.
[0132] In some embodiments, the integration control can determine whether the first overlapping initial data is at least partially different from the first target data; in response to the first overlapping initial data being at least partially different from the first target data, the integration control can determine any one of the first overlapping initial data as alternative data, and save the alternative data to the cloud database. Thus, the overlapping initial data corresponding to different duplicate time data is saved for subsequent user calls to avoid data loss.
[0133] Further, the alternative data may include: an access label, and the access label may bind an access address of the alternative data; in response to receiving a target data access instruction, an integration control may determine whether first target time data corresponding to first target data to be accessed overlaps at least partially with first overlapping time data corresponding to the alternative data; in response to the first target time data and the first overlapping time data overlapping at least partially, the integration control may display the access label; in response to a trigger operation on the access label, the integration control may access the cloud database according to the access address to obtain the alternative data.
[0134] In some embodiments, in a case where time data is set across days, the first time data may include: a first start time, a first start time label corresponding to the first start time (for example, start time label (1)), a first end time, and a first end time label corresponding to the first end time (for example, end time label (2)); the second time data may include: a second start time, a second start time label corresponding to the second start time (for example, start time label (1)), a second end time, and a second end time label corresponding to the second end time (for example, end time label (1)); the integration control may determine whether the first start time label is equal to the second start time label, and determine whether the first end time label is equal to the second end time label; in response to the first start time label being equal to the second start time label, and the first end time label being equal to the second end time label, the integration control may determine a minimum time value between the first start time and the second start time, and determine a maximum time value between the first end time and the second end time; use the minimum time value as the start time corresponding to the first target data, and use the maximum time value as the end time corresponding to the first target data, so as to determine first target time data corresponding to the first target data.
[0135] In some embodiments, in response to the first start time label being less than the second start time label, and the first end time label being equal to the second end time label, the integration control may determine a maximum time value between the first end time and the second end time; use the first start time as the start time corresponding to the first target data, and use the maximum time value as the end time corresponding to the first target data, so as to determine first target time data corresponding to the first target data.
[0136] In some embodiments, in response to the first start time tag being less than the second start time tag and the first end time tag being greater than the second end time tag, the integration control may use the first start time as the start time corresponding to the first target data and the first end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0137] In some embodiments, in response to the first start time tag being equal to the second start time tag and the first end time tag being less than the second end time tag, the integration control may determine the minimum time value between the first start time and the second start time; use the minimum time value as the start time corresponding to the first target data and the second end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0138] In some embodiments, in response to the first start time tag being equal to the second start time tag and the first end time tag being greater than the second end time tag, the integration control may determine the minimum time value between the first start time and the second start time; use the minimum time value as the start time corresponding to the first target data and the first end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0139] In some embodiments, in response to the first start time tag being greater than the second start time tag and the first end time tag being equal to the second end time tag, the integration control may determine the maximum time value between the first end time and the second end time; use the second start time as the start time corresponding to the first target data and the maximum time value as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0140] In some embodiments, in response to the first start time tag being greater than the second start time tag and the first end time tag being greater than the second end time tag, the integration control may use the second start time as the start time corresponding to the first target data and the first end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0141] In some embodiments, in the case where there are multiple time data, the time data may further include: third time data, where the third time data is different from the first time data and the second time data; the integration control can determine whether the third time data at least partially overlaps with the first target time data corresponding to the first target data; in response to the third time data at least partially overlapping with the first target time data, merge the third initial data corresponding to the third time data and the first target data, and eliminate any one of the second overlapping initial data corresponding to the time data of the overlapping part to determine the second target data.
[0142] In some embodiments, each time data may include: a first time part (e.g., the morning before 12:00) and a second time part (e.g., the afternoon after 12:00); the integration control can determine the overlapping time point of the first time part and the second time part (e.g., 12:00 noon); divide the first target data with the overlapping time point as the midpoint to determine the first partial target data corresponding to the first time part and the second partial target data corresponding to the second time part.
[0143] In some embodiments, in response to receiving a call instruction, the integration control can display the first target time data corresponding to the first target data; in response to a selection operation on the first target time data, determine the call path of the call instruction, and display the first target time data at a position associated with the call path. Thereby reducing repeated operations and alleviating the system computing pressure.
[0144] As described above, the data integration method, device, electronic device, and storage medium provided by the embodiments of the present disclosure obtain multiple time data and the initial data corresponding to each time data, further determine whether there are at least partially overlapping first time data and second time data, and if there are at least partially overlapping first time data and second time data, merge the first initial data corresponding to the first time data and the second initial data corresponding to the second time data to obtain the merged data, and then further eliminate any one of the first overlapping initial data corresponding to the time data of the overlapping part from the merged data, thereby determining the first target data. It realizes the integration and streamlining of multiple repeated time data, avoids repeated calculation of data corresponding to overlapping times, alleviates the computing pressure, avoids waste of computing resources, and improves the user experience due to eliminating duplicate data.
[0145] Those skilled in the art can understand that although the above description is based on a simulation program of a logic system, the methods and devices provided by the present disclosure can also be used to debug other types of programs.
[0146] It should be noted that the method of the present disclosure can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario and be completed by multiple devices cooperating with each other. In such a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the present disclosure, and these multiple devices will interact with each other to complete the described method.
[0147] Figure 8 Fig. shows an exemplary structural schematic diagram of a data integration device provided by an embodiment of the present application.
[0148] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application further provides a data integration device.
[0149] Reference Figure 8 , the data integration device includes: an acquisition module, a determination module, and an integration module; wherein,
[0150] The acquisition module is configured to acquire a plurality of time data and initial data corresponding to each of the time data;
[0151] The determination module is configured to determine whether there are first time data and second time data with at least partial overlap;
[0152] The integration module is configured to, in response to the existence of first time data and second time data with at least partial overlap, merge the first initial data corresponding to the first time data and the second initial data corresponding to the second time data, and eliminate any one of the first overlapping initial data corresponding to the overlapping part of the time data to determine first target data.
[0153] In a possible implementation manner, the first time data includes: a first start time and a first end time; the second time data includes: a second start time;
[0154] The determination module is further configured to:
[0155] Determine whether the first start time is less than or equal to the second start time, and whether the second start time is less than or equal to the first end time;
[0156] In response to the first start time being less than or equal to the second start time, and the second start time being less than or equal to the first end time, determine that the first time data and the second time data at least partially overlap.
[0157] In a possible implementation manner, the first time data includes: a first end time; the second time data includes: a second start time;
[0158] The determining module is further configured to:
[0159] Determine whether the difference between the first termination time and the second start time is a preset value;
[0160] In response to the difference between the first termination time and the second start time being the preset value, determine that the first time data and the second time data at least partially overlap.
[0161] In a possible implementation, the apparatus further includes: a deletion module;
[0162] The deletion module is configured to:
[0163] Determine whether the first overlapping initial data is exactly the same as the first target data;
[0164] In response to the first overlapping initial data being exactly the same as the first target data, delete any one of the first overlapping initial data.
[0165] In a possible implementation, the apparatus further includes: a saving module;
[0166] The saving module is configured to:
[0167] Determine whether the first overlapping initial data is at least partially different from the first target data;
[0168] In response to the first overlapping initial data being at least partially different from the first target data, determine any one of the first overlapping initial data as alternative data, and save the alternative data to the cloud database.
[0169] In a possible implementation, the alternative data includes: an access label, and the access label binds an access address of the alternative data;
[0170] The apparatus further includes: an access module;
[0171] The access module is further configured to:
[0172] In response to receiving a target data access instruction, determine whether the first target time data corresponding to the first target data to be accessed overlaps at least partially with the first overlapping time data corresponding to the alternative data;
[0173] In response to the first target time data and the first overlapping time data at least partially overlapping, display the access label;
[0174] In response to a trigger operation on the access label, access the cloud database according to the access address to obtain the alternative data.
[0175] In a possible implementation, the first time data includes: a first start time, a first start time tag corresponding to the first start time, a first end time, and a first end time tag corresponding to the first end time; the second time data includes: a second start time, a second start time tag corresponding to the second start time, a second end time, and a second end time tag corresponding to the second end time;
[0176] The apparatus further includes: a time determination module;
[0177] The time determination module is further configured to:
[0178] Determine whether the first start time tag is equal to the second start time tag, and determine whether the first end time tag is equal to the second end time tag;
[0179] In response to the first start time tag being equal to the second start time tag and the first end time tag being equal to the second end time tag, determine the minimum time value between the first start time and the second start time, and determine the maximum time value between the first end time and the second end time;
[0180] Use the minimum time value as the start time corresponding to the first target data, and use the maximum time value as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
[0181] In a possible implementation, the time determination module is further configured to:
[0182] In response to the first start time tag being less than the second start time tag and the first end time tag being equal to the second end time tag, determine the maximum time value between the first end time and the second end time;
[0183] Use the first start time as the start time corresponding to the first target data, and use the maximum time value as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
[0184] In a possible implementation, the time determination module is further configured to:
[0185] In response to the first start time tag being less than the second start time tag, and the first end time tag being greater than the second end time tag, use the first start time as the start time corresponding to the first target data, and use the first end time as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
[0186] In a possible implementation, the time determination module is further configured to:
[0187] In response to the first start time tag being equal to the second start time tag, and the first end time tag being less than the second end time tag, determine the minimum time value between the first start time and the second start time;
[0188] Use the minimum time value as the start time corresponding to the first target data, and use the second end time as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
[0189] In a possible implementation, the time determination module is further configured to:
[0190] In response to the first start time tag being equal to the second start time tag, and the first end time tag being greater than the second end time tag, determine the minimum time value between the first start time and the second start time;
[0191] Use the minimum time value as the start time corresponding to the first target data, and use the first end time as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
[0192] In a possible implementation, the time determination module is further configured to:
[0193] In response to the first start time tag being greater than the second start time tag, and the first end time tag being equal to the second end time tag, determine the maximum time value between the first end time and the second end time;
[0194] Use the second start time as the start time corresponding to the first target data, and use the maximum time value as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
[0195] In a possible implementation, the time determination module is further configured to:
[0196] In response to the first start time tag being greater than the second start time tag and the first end time tag being greater than the second end time tag, use the second start time as the start time corresponding to the first target data and use the first end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
[0197] In a possible implementation, the time data further includes: third time data, where the third time data is different from the first time data and the second time data;
[0198] The integration module is further configured to:
[0199] Determine whether the third time data at least partially overlaps with the first target time data corresponding to the first target data;
[0200] In response to the third time data at least partially overlapping with the first target time data, merge the third initial data corresponding to the third time data and the first target data, and exclude any one of the second overlapping initial data corresponding to the overlapping part of the time data to determine the second target data.
[0201] In a possible implementation, each time data includes: a first time part and a second time part;
[0202] The device further includes: a division module;
[0203] The division module is configured to:
[0204] Determine the overlapping time point of the first time part and the second time part;
[0205] Using the overlapping time point as the midpoint, divide the first target data to determine the first partial target data corresponding to the first time part and the second partial target data corresponding to the second time part.
[0206] In a possible implementation, the device further includes: a call module;
[0207] The call module is configured to:
[0208] In response to receiving a call instruction, display the first target time data corresponding to the first target data;
[0209] In response to a selection operation on the first target time data, determine the call path of the call instruction, and display the first target time data at a position associated with the call path.
[0210] For the convenience of description, when describing the above system, it is divided into various modules according to functions and described separately. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0211] The system of the above embodiment is used to implement the corresponding data integration method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0212] Figure 9 The exemplary structural schematic diagram of an electronic device provided by an embodiment of the present application is shown.
[0213] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the data integration method described in any of the above embodiments. Figure 6 The more specific hardware structural schematic diagram of an electronic device provided in this embodiment is shown. The device may include: a processor 910, a memory 920, an input / output interface 930, a communication interface 940, and a bus 950. Among them, the processor 910, the memory 920, the input / output interface 930, and the communication interface 940 are communicatively connected to each other inside the device through the bus 950.
[0214] The processor 910 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0215] The memory 920 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 920 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 920 and called and executed by the processor 910.
[0216] The input / output interface 930 is used to connect to the input / output module to implement information input and output. The input / output module can be configured as a component in the device (not shown in the figure), or can be externally connected to the device to provide corresponding functions. The input devices can include keyboards, mice, touchscreens, microphones, various sensors, etc., and the output devices can include displays, speakers, vibrators, indicator lights, etc.
[0217] The communication interface 940 is used to connect to the communication module (not shown in the figure) to implement communication interaction between this device and other devices. The communication module can implement communication through wired means (such as USB, network cable, etc.), or can also implement communication through wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0218] The bus 950 includes a path for transmitting information between various components of the device (such as the processor 910, the memory 920, the input / output interface 930, and the communication interface 940).
[0219] It should be noted that although the above device only shows the processor 910, the memory 920, the input / output interface 930, the communication interface 940, and the bus 950, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0220] The electronic device of the above embodiment is used to implement the corresponding data integration method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0221] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the data integration method described in any of the above embodiments.
[0222] The computer-readable medium of this embodiment includes both permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0223] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the data integration method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0224] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, and they are not provided in detail for the sake of brevity.
[0225] In addition, for the sake of simplicity of description and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. In addition, the device may be shown in block diagram form to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application will be implemented (i.e., these details should be completely within the understanding of those skilled in the art). In the case where specific details (such as circuits) are set forth to describe the exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0226] Although the present application has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0227] Embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included within the protection scope of the present application.
Claims
1. A data integration method, characterized in that, the method includes: obtaining a plurality of time data and initial data corresponding to each of the time data; determining whether there are first time data and second time data that at least partially overlap; in response to there being first time data and second time data that at least partially overlap, merging first initial data corresponding to the first time data and second initial data corresponding to the second time data, and removing any one of the first overlapping initial data corresponding to the overlapping part of the time data to determine first target data; after removing any one of the first overlapping initial data corresponding to the overlapping part of the time data to determine first target data, it includes: determining whether the first overlapping initial data is at least partially different from the first target data; in response to the first overlapping initial data being at least partially different from the first target data, determining any one of the first overlapping initial data as alternative data, and saving the alternative data to a cloud database; the alternative data includes: an access label, and the access label binds an access address of the alternative data; the method further includes: in response to receiving a target data access instruction, determining whether first target time data corresponding to the accessed first target data overlaps at least partially with first overlapping time data corresponding to the alternative data; in response to the first target time data overlapping at least partially with the first overlapping time data, displaying the access label; in response to a trigger operation on the access label, accessing the cloud database according to the access address to obtain the alternative data.
2. The method according to claim 1, characterized in that, the first time data includes: a first start time and a first end time; the second time data includes: a second start time; the determining whether there are first time data and second time data that at least partially overlap includes: determining whether the first start time is less than or equal to the second start time, and whether the second start time is less than or equal to the first end time; in response to the first start time being less than or equal to the second start time, and the second start time being less than or equal to the first end time, determining that the first time data and the second time data at least partially overlap.
3. The method according to claim 1, characterized in that, the first time data includes: a first end time; the second time data includes: a second start time; the determining whether there are first time data and second time data that at least partially overlap includes: determining whether a difference between the first end time and the second start time is a preset value; in response to the difference between the first end time and the second start time being the preset value, determining that the first time data and the second time data at least partially overlap.
4. The method according to claim 1, characterized in that, after removing any one of the first overlapping initial data corresponding to the overlapping part of the time data to determine first target data, it includes: Determine whether the first overlapping initial data is exactly the same as the first target data; In response to the first overlapping initial data being exactly the same as the first target data, delete any one of the first overlapping initial data.
5. The method according to claim 1, wherein, the first time data includes: a first start time, a first start time tag corresponding to the first start time, a first end time, and a first end time tag corresponding to the first end time; the second time data includes: a second start time, a second start time tag corresponding to the second start time, a second end time, and a second end time tag corresponding to the second end time; after responding to the existence of at least partially overlapping first time data and second time data, further includes: determine whether the first start time tag is equal to the second start time tag, and determine whether the first end time tag is equal to the second end time tag; in response to the first start time tag being equal to the second start time tag, and the first end time tag being equal to the second end time tag, determine the minimum time value among the first start time and the second start time, and determine the maximum time value among the first end time and the second end time; take the minimum time value as the start time corresponding to the first target data, and take the maximum time value as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
6. The method according to claim 5, wherein, after determining whether the first start time tag is equal to the second start time tag, and determining whether the first end time tag is equal to the second end time tag, further includes: in response to the first start time tag being less than the second start time tag, and the first end time tag being equal to the second end time tag, determine the maximum time value among the first end time and the second end time; take the first start time as the start time corresponding to the first target data, and take the maximum time value as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
7. The method according to claim 5, wherein, after determining whether the first start time tag is equal to the second start time tag, and determining whether the first end time tag is equal to the second end time tag, further includes: in response to the first start time tag being less than the second start time tag, and the first end time tag being greater than the second end time tag, take the first start time as the start time corresponding to the first target data, and take the first end time as the end time corresponding to the first target data, so as to determine the first target time data corresponding to the first target data.
8. The method according to claim 5, wherein, After determining whether the first start time tag is equal to the second start time tag and determining whether the first end time tag is equal to the second end time tag, it further includes: In response to the first start time tag being equal to the second start time tag and the first end time tag being less than the second end time tag, determining the minimum time value between the first start time and the second start time; Taking the minimum time value as the start time corresponding to the first target data and taking the second end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
9. The method according to claim 5, wherein, After determining whether the first start time tag is equal to the second start time tag and determining whether the first end time tag is equal to the second end time tag, it further includes: In response to the first start time tag being equal to the second start time tag and the first end time tag being greater than the second end time tag, determining the minimum time value between the first start time and the second start time; Taking the minimum time value as the start time corresponding to the first target data and taking the first end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
10. The method according to claim 5, wherein, After determining whether the first start time tag is equal to the second start time tag and determining whether the first end time tag is equal to the second end time tag, it further includes: In response to the first start time tag being greater than the second start time tag and the first end time tag being equal to the second end time tag, determining the maximum time value between the first end time and the second end time; Taking the second start time as the start time corresponding to the first target data and taking the maximum time value as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
11. The method according to claim 5, wherein, After determining whether the first start time tag is equal to the second start time tag and determining whether the first end time tag is equal to the second end time tag, it further includes: In response to the first start time tag being greater than the second start time tag and the first end time tag being greater than the second end time tag, taking the second start time as the start time corresponding to the first target data and taking the first end time as the end time corresponding to the first target data to determine the first target time data corresponding to the first target data.
12. The method according to claim 1, wherein, The time data further includes: a third time data, and the third time data is different from the first time data and the second time data; The method further includes: Determine whether the third time data at least partially overlaps with the first target time data corresponding to the first target data; In response to the third time data at least partially overlapping with the first target time data, merge the third initial data corresponding to the third time data and the first target data, and eliminate any one of the second overlapping initial data corresponding to the time data of the overlapping part to determine the second target data.
13. The method according to claim 1, characterized in that, each time data includes: a first time part and a second time part; the method further includes: determine the overlapping time point of the first time part and the second time part; divide the first target data with the overlapping time point as the midpoint to determine the first partial target data corresponding to the first time part and the second partial target data corresponding to the second time part.
14. The method according to claim 1, characterized in that, the method further includes: in response to receiving a call instruction, display the first target time data corresponding to the first target data; in response to a selection operation on the first target time data, determine the call path of the call instruction, and display the first target time data at a position associated with the call path.
15. A data integration device, characterized in that, the device includes: an acquisition module configured to acquire a plurality of time data and the initial data corresponding to each of the time data; a determination module configured to determine whether there are first time data and second time data that at least partially overlap; an integration module configured to, in response to the existence of first time data and second time data that at least partially overlap, merge the first initial data corresponding to the first time data and the second initial data corresponding to the second time data, and eliminate any one of the first overlapping initial data corresponding to the time data of the overlapping part to determine the first target data; after eliminating any one of the first overlapping initial data corresponding to the time data of the overlapping part to determine the first target data, it includes: determine whether the first overlapping initial data is at least partially different from the first target data; in response to the first overlapping initial data being at least partially different from the first target data, determine any one of the first overlapping initial data as alternative data, and save the alternative data to the cloud database; the alternative data includes: an access label, and the access label binds the access address of the alternative data; it further includes: in response to receiving a target data access instruction, determine whether the first target time data corresponding to the accessed first target data at least partially overlaps with the first overlapping time data corresponding to the alternative data; in response to the first target time data at least partially overlapping with the first overlapping time data, display the access label; in response to a trigger operation on the access label, access the cloud database according to the access address to obtain the alternative data.
16. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 14 when executing the program.
17. A non-transitory computer-readable storage medium storing a set of instructions for an electronic device, the set of instructions being configured to cause the electronic device to execute the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Data downsampling method and system, data query method and system and storage medium
CN114328601A