CN116108018A - Time pull chain table construction method and related device - Google Patents

Time pull chain table construction method and related device Download PDF

Info

Publication number
CN116108018A
CN116108018A CN202310227373.1A CN202310227373A CN116108018A CN 116108018 A CN116108018 A CN 116108018A CN 202310227373 A CN202310227373 A CN 202310227373A CN 116108018 A CN116108018 A CN 116108018A
Authority
CN
China
Prior art keywords
data
time
pull chain
chain table
day
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310227373.1A
Other languages
Chinese (zh)
Inventor
吕虎
魏烨
薛羽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202310227373.1A priority Critical patent/CN116108018A/en
Publication of CN116108018A publication Critical patent/CN116108018A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a time pull chain table construction method and a related device, wherein the first time pull chain table can be established on the first day of the current period; if the first data is confirmed to be modified on the first day of the current period, the modified first data is inserted into a first time pull chain table, wherein the first data is any piece of data corresponding to the last day in a second time pull chain table, and the second time pull chain table is a time pull chain table corresponding to the last period of the current period; setting the effective starting time of the modified first data in the first time pull chain table as the date corresponding to the first day of the current period; setting the effective termination time as a preset date. The method establishes the corresponding time pull chain table according to the period, only queries and cleans the data in the time pull chain table of the corresponding period when cleaning the data of the time pull chain table, does not need to partition the data and process the whole large time pull chain table by crossing the partition, and has higher performance.

Description

Time pull chain table construction method and related device
Technical Field
The invention relates to the field of databases, in particular to a method and a related device for constructing a time zipper table.
Background
Time pull linked list: a table of historical states and the latest states is maintained, the historical states are recorded through the data effective starting time and the effective ending time, and the effect is equivalent to the snapshot at different times, and is opposite to the snapshot at different moments. The time zipper table removes a portion of the unchanged record.
The time pull chain table is accumulated in the daily period, a large amount of data can be generated, the storage space is occupied, the inquiry performance is affected, and therefore the time pull chain table is required to be cleaned or transferred to a refrigeration house according to the date of the data. The conventional way to clean up the time pull chain table is to create partitions according to date for the time pull chain table, but often, for performance, secondary partitions are also required to be created for other fields. There are two problems with this approach: on the one hand, OLTP class databases often do not support secondary partitions, and on the other hand, secondary partitions can cause partition data maldistribution. That is, this way of creating partitions for an entire time pull chain table by date often results in poor performance when cleaning the time pull chain table across partition queries.
Disclosure of Invention
In view of the foregoing, the present invention provides a method and related apparatus for constructing a time zipper schedule that overcomes or at least partially solves the foregoing problems.
In a first aspect, a method of constructing a time zipper schedule includes:
establishing a first time pull chain table on the first day of the current period;
if the first data is confirmed to be modified on the first day of the current period, inserting the modified first data into a first time pull chain table, wherein the first data is any piece of data corresponding to the last day in a second time pull chain table, and the second time pull chain table is a time pull chain table corresponding to the last period of the current period;
setting the effective starting time of the modified first data in the first time pull chain table as the date corresponding to the first day of the current period;
setting the effective termination time of the modified first data in the first time pull chain table as a preset date.
With reference to the first aspect, in some optional embodiments, after the establishing the first time pull chain table on the first day of the current period, the method further includes:
and if the first data is deleted on the first day of the current period, modifying the effective ending time of the first data in the second time pull chain table as the date corresponding to the last day of the previous period.
With reference to the first aspect, in some optional embodiments, after the establishing the first time pull chain table on the first day of the current period, the method further includes:
if it is determined that second data is newly added on the first day of the current period, inserting the second data into the first time pull chain table, wherein the second data is data which is not stored on the last day in the second time pull chain table;
setting the effective starting time of the second data in the first time pull chain table as the date corresponding to the first day of the current period;
and setting the effective ending time of the second data in the first time pull chain table as the preset date.
With reference to the first aspect, in some optional embodiments, after the setting the validation termination time of the modified first data in the first time pull chain table to be a preset date, the method further includes:
for any piece of data corresponding to a first day in the first time pull chain table, if the data is confirmed to be modified on a second day of the current period, inserting the modified data in the first time pull chain table, wherein the modified data is the data corresponding to the second day in the first time pull chain table;
setting the effective starting time of the modified data in the first time pull chain table as the corresponding date of the second day of the current period;
setting the effective termination time of the modified data in the first time pull chain table as the preset date.
In combination with the above embodiment, in some optional embodiments, after the inserting the modified data in the first time pull chain table, the method further includes:
and modifying the effective termination time of the data corresponding to the first day in the first time pull chain table to be the date corresponding to the first day of the current period.
In a second aspect, a time zipper schedule construction apparatus includes: a new table unit, a first data insertion unit, a first time setting unit and a second time setting unit;
the new table unit is used for establishing a first time pull chain table on the first day of the current period;
the first data inserting unit is configured to insert modified first data into the first time pull chain table if it is determined that the first data is modified on a first day of the current period, where the first data is any piece of data corresponding to a last day in a second time pull chain table, and the second time pull chain table is a time pull chain table corresponding to a last period of the current period;
the first time setting unit is used for setting the effective starting time of the modified first data in the first time pull chain table as the date corresponding to the first day of the current period;
the second time setting unit is configured to set the effective termination time of the modified first data in the first time pull chain table as a preset date.
With reference to the second aspect, in certain optional embodiments, the apparatus further comprises: a first time modification unit;
the first time modification unit is configured to modify, after the first time pull chain table is established on the first day of the current period, the effective termination time of the first data in the second time pull chain table to be a date corresponding to the last day of the previous period if it is determined that the first data is deleted on the first day of the current period.
With reference to the second aspect, in certain optional embodiments, the apparatus further comprises: a new data unit, a second time setting unit and a third time setting unit are added;
the newly added data unit is configured to insert second data into the first time pull linked list if it is determined that the second data is newly added on the first day of the current period after the first time pull linked list is established on the first day of the current period, where the second data is data that is not stored on the last day in the second time pull linked list;
the second time setting unit is configured to set the effective start time of the second data in the first time pull chain table as a date corresponding to the first day of the current period;
the third time setting unit is configured to set the effective ending time of the second data in the first time pull chain table as the preset date.
In a third aspect, a computer-readable storage medium has stored thereon a program that, when executed by a processor, implements the time zipper table construction method of any one of the above.
In a fourth aspect, an electronic device includes at least one processor, at least one memory coupled to the processor, and a bus; the processor and the memory complete communication with each other through the bus; the processor is configured to invoke the program instructions in the memory to perform the method of constructing a time zipper table as described in any of the above.
By means of the technical scheme, the time pull chain table construction method and the related device can be used for building the first time pull chain table on the first day of the current period; if the first data is confirmed to be modified on the first day of the current period, inserting the modified first data into a first time pull chain table, wherein the first data is any piece of data corresponding to the last day in a second time pull chain table, and the second time pull chain table is a time pull chain table corresponding to the last period of the current period; setting the effective starting time of the modified first data in the first time pull chain table as the date corresponding to the first day of the current period; setting the effective termination time of the modified first data in the first time pull chain table as a preset date. It can be seen that the present invention differs from the prior art in that: according to the method, the corresponding time pull chain table is built according to the periods, when the data of the time pull chain table is cleaned, only the data in the time pull chain table of the corresponding period is required to be queried and cleaned, the data is not required to be partitioned, the whole large time pull chain table is not required to be processed by crossing the partitions, and the performance is high.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 shows a flowchart of a first method of constructing a time zipper schedule provided by the present invention;
FIG. 2 is a flow chart of a second method of constructing a time zipper schedule provided by the present invention;
FIG. 3 is a flow chart illustrating a third method of constructing a time zipper schedule provided by the present invention;
FIG. 4 is a flow chart of a fourth method of constructing a time zipper schedule provided by the present invention;
FIG. 5 is a flowchart of a fifth method of constructing a time zipper schedule provided by the present invention;
FIG. 6 shows a schematic structural diagram of a time pull chain table constructing apparatus according to the present invention;
fig. 7 shows a schematic structural diagram of an electronic device provided by the invention.
Detailed Description
The time pull chain table is shown in table 1, and each piece of data in the table is arranged in time sequence from top to bottom, namely, the more front the time is arranged, the longer the corresponding data is generated (including data generated by operations such as new addition, deletion, modification and the like). The primary key is a unique identification of data, and when a certain piece of data changes (including operations such as deleting and modifying), other data items in the data linked list change correspondingly, but the primary key does not change. The validation start time refers to the validation start date of the corresponding piece of data, and the validation end time is the corresponding validation expiration date.
TABLE 1
Figure BDA0004118881250000051
As shown in table 1, according to the rule of the time pull chain table, when a time comes to a specific day, it is required to determine whether the data of the day is changed (including new and modified) from the data of the previous day. For changed data, corresponding processing is needed in the time pull chain table. For example, for newly added data, it is necessary to insert corresponding new data in the time pull chain table; for modified data, it is necessary to insert the modified data in a time pull chain table. After the time is accumulated and the month is accumulated, a large amount of data can be generated in the time pulling chain table, the storage space is occupied, and the inquiry performance is affected. It is often necessary to clean the time pull chain table according to the date of the data or to transfer it to a freezer. The conventional way to clean up the time pull chain table is to create partitions according to date for the time pull chain table, but often, for performance, secondary partitions are also required to be created for other fields. The data in the whole time pull chain table is required to be partitioned according to the date, the data of the same day is partitioned into the same primary partition, and then the data of the same primary partition is partitioned into a plurality of secondary partitions according to a specific field. There are two problems with this approach: on the one hand, OLTP class databases often do not support secondary partitions, and on the other hand, secondary partitions can cause partition data maldistribution. That is, this way of building partitions for an entire time pull chain table that has been built by date often results in poor performance when cleaning up the time pull chain table across partition queries.
In order to solve the above problems, the present invention proposes a method for establishing a time pull chain table according to a period. One cycle corresponds to one time pulling the linked list and one cycle is a fixed time rather than the entire historical period. Namely, the proposal proposed by the invention is characterized in that: different physical time pull chain tables are established according to different periods, rather than firstly obtaining the time pull chain table of the whole history and then partitioning the time pull chain table.
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
As shown in fig. 1, the present invention provides a method for constructing a time zipper table, comprising: s100, S200, S300, and S400;
s100, establishing a first time pull chain table on the first day of the current period;
optionally, the invention sets a certain period, and when the first day of the new period comes, a corresponding time pull chain table, namely a first time pull chain table, can be established. By the method of initially establishing a corresponding time pull chain table in one period, the whole historical data is divided into a plurality of independent physical time pull chain tables in advance according to the period, rather than firstly obtaining the time pull chain table of the whole history and then partitioning the time pull chain table according to the date, which is obviously different from the prior art.
Alternatively, the period of the present invention may be set according to actual needs, for example, the present invention may be set to one period for one month or one period for one quarter, which is not limited in this aspect.
Optionally, the first time zipper table is applied to the whole period of the current period, that is, the first time zipper table can sequentially store data of each day of the current period, that is, it can be understood that data of different dates are sequentially stored in different areas of the first time zipper table. According to the rule of time-pulled chain table, which data is inserted in the day, the data of the previous day needs to be referred to.
For example, if the data is newly added on the same day as the previous day, the newly added data is inserted into the area of the same day in the first time pull chain table; if the data of the previous day is modified on the same day, the modified data is inserted into the area of the current day in the first time pull chain table; if the data of the previous day is deleted, the corresponding data is not inserted in the area of the current day in the first time pull chain table.
It should be noted that: the execution subject of the present invention may be a data analysis system to which the time zipper table is applied, and the actions described above with respect to modifying data, deleting data, and adding new data occur at the earliest in the front-end application system. That is, the modified data in the invention is that the front-end application system has modified the data on the same day, and the modified data is also stored in the data on the previous day in the time pull chain table, instead of actually modifying the data on the previous day in the time pull chain table, and the data on the previous day in the time pull chain table is kept unchanged.
For deleting data, please refer to the explanation of the modified data, and it is equally understood that the present invention will not be repeated.
The new data refers to the action that the front-end application system generates the new data on the same day, and the new data is not stored in the area of the time pull chain table on the previous day.
Optionally, the method for determining whether the front-end application system performs operations such as adding data, modifying data, deleting data and the like can be two ways:
1. the results are obtained directly from the front-end application system. That is, the front-end application system directly feeds back the operations and results for the data to the execution subject of the present invention, including operations of adding data, modifying data, deleting data, and the like, and the corresponding results.
2. And obtaining a result after data comparison. That is, the execution subject of the present invention can obtain data generated by the front-end application system on the same day, but does not know what operation the data is generated by. Accordingly, the execution subject of the present invention can compare the data of the current day with the data of the previous day, thereby determining what operation the data generated on the current day is based on. For example, if the primary key of a piece of data generated on the same day as the primary key of a piece of data generated on the previous day, but the data fields are different, it is indicated that the piece of data generated on the same day is generated by modifying the piece of data corresponding to the previous day by the front-end application system.
For another example, if the primary key of a piece of data generated on the same day is inconsistent with the primary keys of all data of the previous day, it indicates that the piece of data generated on the same day is generated by the newly added data of the front-end application system.
Aiming at different operations and different data generated, the invention can do different operations in the pull chain table at the time of the day. Different processing modes can be adopted for the data of different dates of the first time pull chain table. For example, on the first day of the current cycle, the present invention differs from the processing of the other dates of the current cycle for the processing of data.
Optionally, as shown in fig. 2, in combination with the embodiment shown in fig. 1, in certain optional embodiments, after the step S100, the method further includes: s110, performing S110;
and S110, if the first data is deleted on the first day of the current period, modifying the effective ending time of the first data in the second time pull chain table as the date corresponding to the last day of the last period.
Optionally, on the first day of the current period, if the front-end application system performs deletion processing on the first data, the first data is deleted on the front-end application system side, but the second time pull chain table on the execution main body side of the present invention has no corresponding deletion record yet. Thus, the present invention can tag the first data in the second time pull chain table to identify the date the first data has been deleted and the date the first data has been deleted. That is, the present invention identifies that the first data has been deleted on the first day of the current cycle resulting in an effective by modifying the effective termination time of the first data in the second time pull chain table.
Optionally, the front-end application system performs deletion processing on the first data on the first day of the current period, so that the first data is not recorded in an area corresponding to the first day of the current period in the first time pull chain table, thereby reducing redundancy of useless data.
Optionally, as shown in fig. 3, in combination with the embodiment shown in fig. 1, in some optional embodiments, after the step S100, the method further includes: s120, S121, and S122;
s120, if it is determined that second data is newly added on the first day of the current period, inserting the second data into the first time pull chain table, wherein the second data is data which is not stored on the last day in the second time pull chain table;
optionally, if the executing body determines that the front-end application system adds data on the first day of the current period, the newly added data may be inserted into an area corresponding to the first day of the current period in the first time pull chain table. It should be noted that: the processing manner of S120 may be adopted as long as the data of the current day is newly added to the data of the previous day.
S121, setting the effective starting time of the second data in the first time pull chain table as the date corresponding to the first day of the current period;
s122, setting the effective termination time of the second data in the first time pull chain table as the preset date.
Optionally, since the second data is newly added, the corresponding validation start time may be set to be the date corresponding to the first day of the current period, and the validation end time may be set to be the preset date.
Optionally, the preset date may be set according to actual needs, for example, may be set to a date corresponding to the maximum period. Of course, the invention can also set the maximum service life of any piece of data to be one year, and then calculate the corresponding effective ending time according to the effective starting time, in this way, the preset date of different data is not fixed, but the maximum service life is fixed.
S200, if it is determined that the first data is modified on the first day of the current period, inserting the modified first data into a first time pull chain table, wherein the first data is any piece of data corresponding to the last day in a second time pull chain table, and the second time pull chain table is a time pull chain table corresponding to the last period of the current period;
s300, setting the effective starting time of the modified first data in the first time pull chain table as the date corresponding to the first day of the current period;
s400, setting the effective termination time of the modified first data in the first time pull chain table as a preset date.
Optionally, S200 to S400 are processing manners of the modified data, which is colloquially understood to be that the modified data is inserted into a time pull chain table, and corresponding effective start time and effective end time are set.
Optionally, on the first day of the current period, for the modified data, in addition to inserting into the corresponding time pull chain table, the corresponding data on the last day in the time pull chain table of the previous period may be processed to represent the modified data.
For example, the invention can also modify the effective termination time of the corresponding data of the last day in the time pull chain table of the last cycle to the date corresponding to the last day of the last cycle, so that the data can be known to be modified on the first day of the current cycle by comparing the effective termination times of the two time pull chain tables.
Optionally, as shown in fig. 4, in combination with the embodiment shown in fig. 1, in some optional embodiments, after the step S400, the method further includes: s500, S600, and S700;
s500, inserting modified data into the first time pull chain table if any piece of data corresponding to a first day in the first time pull chain table is determined to be modified on a second day of the current period, wherein the modified data is data corresponding to the second day in the first time pull chain table;
s600, setting the effective starting time of the modified data in the first time pull chain table as the corresponding date of the second day of the current period;
s700, setting the effective termination time of the modified data in the first time pull chain table as the preset date.
As shown in fig. 5, in combination with the embodiment shown in fig. 4, in certain alternative embodiments, after S500, the method further includes: s800;
s800, modifying the effective termination time of the data corresponding to the first day in the first time pull chain table to be the date corresponding to the first day of the current period.
Alternatively, the embodiments of fig. 4 and 5 describe the manner in which modified data is processed the next day of the current cycle. For the processing manners of the processing of the new data and the deleted data, please refer to the processing manner of the first day of the current period, which is not described in detail in the present invention.
Alternatively, for the third day of the current cycle, the manner of processing on the second day of the current cycle may be referred to. And so on for the other dates of the current cycle, which will not be described in detail herein.
For clarity of description of the solution of the present invention, it is assumed that the period of the present invention is one month, i.e., one month corresponds to one time pull chain table. Based on the data in table 1, if the data with the numbers "10000", "10001" and "10002" are all data with the number 2023 and month 03 and 31, the data with the number "20000" is the first data with the number 2023 and month 04 and 02, and the data with the number "30000" is the first data with the number 2023 and 04, the method of the present invention is adopted for the data in table 1, so that two time-pulled lists as shown in table 2 and table 3 are obtained, wherein the data with the number 2023 and month 03 correspond to the data in table 2, and the data with the number 2023 and month 04 correspond to the data in table 3.
TABLE 2
Figure BDA0004118881250000101
Alternatively, table 2 shows data from 2023, 03, month 01 to 2023, 03, month 31, it is not exhaustive, so the symbol ". Cndot." indicates that there can be many pieces of data. It should be noted that: the data with serial numbers "10000", "10001" and "10002" in table 2 may be data inserted in 2023, 03, 31, wherein the two data with serial numbers "10000" and "10001" may be generated by modifying data or adding data in 2023, 03, 31; the data with the number "10002" was generated at the earliest in the year 2023 month 01 03 and inserted into the time pull chain table corresponding to the year 2023 month 01, and there was no change in the period from the end of the year 2023 month 01 No. 03 to the end of the year 2023 month 03 No. 31. Therefore, the data with the number "10002" is recorded in the time pull chain table of 2023 and 01, is recorded in the time pull chain table of 2023 and 02, is recorded in the time pull chain table of 2023 and 03, and is further recorded in other months and the like.
TABLE 3 Table 3
Figure BDA0004118881250000111
Optionally, on the day 2023, 04, 01, data field 1 of number "10000" is modified, data of number "10001" is deleted, and data of number "10002" is unchanged. Based on the method of the present invention, a new time pull chain table is established in 2023, 04, and then after the foregoing processing procedure is performed, all data (the area corresponding to the first day of the current cycle) before the number "30000" shown in table 3 can be obtained.
Optionally, the day 2023, month 04, 02, data field 1, numbered "20000", was modified. Based on the method of the invention, after the processing procedure is performed on the basis of the time pull chain table established in the year 2023, 04 and 01, the data with the serial number of 30000 shown in the table 3 can be updated, and other data can be obtained in the follow-up process.
As shown in fig. 6, the present invention provides a time pull chain table construction device, including: a new table unit 100, a first data insertion unit 200, a first time setting unit 300, and a second time setting unit 400;
the new table unit 100 is configured to establish a first time pull chain table on a first day of a current period;
the first data inserting unit 200 is configured to insert, if it is determined that the first data is modified on the first day of the current period, the modified first data into the first time pull linked list, where the first data is any piece of data corresponding to the last day in a second time pull linked list table, and the second time pull linked list is a time pull linked list corresponding to the last period of the current period;
the first time setting unit 300 is configured to set the effective start time of the modified first data in the first time pull chain table as a date corresponding to the first day of the current period;
the second time setting unit 400 is configured to set the effective termination time of the modified first data in the first time pull chain table as a preset date.
In connection with the embodiment shown in fig. 6, in certain alternative embodiments, the apparatus further comprises: a first time modification unit;
the first time modification unit is configured to modify, after the first time pull chain table is established on the first day of the current period, the effective termination time of the first data in the second time pull chain table to be a date corresponding to the last day of the previous period if it is determined that the first data is deleted on the first day of the current period.
In connection with the embodiment shown in fig. 6, in certain alternative embodiments, the apparatus further comprises: a new data unit, a second time setting unit and a third time setting unit are added;
the newly added data unit is configured to insert second data into the first time pull linked list if it is determined that the second data is newly added on the first day of the current period after the first time pull linked list is established on the first day of the current period, where the second data is data that is not stored on the last day in the second time pull linked list;
the second time setting unit is configured to set the effective start time of the second data in the first time pull chain table as a date corresponding to the first day of the current period;
the third time setting unit is configured to set the effective ending time of the second data in the first time pull chain table as the preset date.
In connection with the embodiment shown in fig. 6, in certain alternative embodiments, the apparatus further comprises: a second data inserting unit, a fourth time setting unit, and a fifth time setting unit;
the second data inserting unit is configured to insert, after the setting the effective termination time of the modified first data in the first time pull linked list as a preset date, modified data in the first time pull linked list for any piece of data corresponding to a first day in the first time pull linked list if it is determined that the data is modified on a second day in the current period, where the modified data is data corresponding to a second day in the first time pull linked list;
the fourth time setting unit is configured to set the effective starting time of the modified data in the first time pull chain table as a date corresponding to a second day of the current period;
the fifth time setting unit is configured to set the modified time for ending the validation of the data in the first time pull chain table as the preset date.
In combination with the above embodiment, in certain alternative embodiments, the apparatus further comprises: a second time modification unit;
the second time modification unit is configured to modify, after the modified data is inserted into the first time pull chain table, a validation termination time of the data corresponding to a first day in the first time pull chain table to be a date corresponding to a first day of the current period.
The present invention provides a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the time zipper table construction method of any one of the above.
As shown in fig. 7, the present invention provides an electronic device 70, the electronic device 70 comprising at least one processor 701, and at least one memory 702, bus 703 connected to the processor 701; wherein, the processor 701 and the memory 702 complete communication with each other through the bus 703; the processor 701 is configured to invoke the program instructions in the memory 702 to perform the method of constructing a time zipper table as described in any of the above.
In the present invention, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A method of constructing a time zipper schedule, comprising:
establishing a first time pull chain table on the first day of the current period;
if the first data is confirmed to be modified on the first day of the current period, inserting the modified first data into a first time pull chain table, wherein the first data is any piece of data corresponding to the last day in a second time pull chain table, and the second time pull chain table is a time pull chain table corresponding to the last period of the current period;
setting the effective starting time of the modified first data in the first time pull chain table as the date corresponding to the first day of the current period;
setting the effective termination time of the modified first data in the first time pull chain table as a preset date.
2. The method of claim 1, wherein after the establishing a first time pull chain table on the first day of the current cycle, the method further comprises:
and if the first data is deleted on the first day of the current period, modifying the effective ending time of the first data in the second time pull chain table as the date corresponding to the last day of the previous period.
3. The method of claim 1, wherein after the establishing a first time pull chain table on the first day of the current cycle, the method further comprises:
if it is determined that second data is newly added on the first day of the current period, inserting the second data into the first time pull chain table, wherein the second data is data which is not stored on the last day in the second time pull chain table;
setting the effective starting time of the second data in the first time pull chain table as the date corresponding to the first day of the current period;
and setting the effective ending time of the second data in the first time pull chain table as the preset date.
4. The method of claim 1, wherein after said setting the expiration time of the modified first data in the first time pull chain table to a preset date, the method further comprises:
for any piece of data corresponding to a first day in the first time pull chain table, if the data is confirmed to be modified on a second day of the current period, inserting the modified data in the first time pull chain table, wherein the modified data is the data corresponding to the second day in the first time pull chain table;
setting the effective starting time of the modified data in the first time pull chain table as the corresponding date of the second day of the current period;
setting the effective termination time of the modified data in the first time pull chain table as the preset date.
5. The method of claim 4, wherein after inserting the modified data in the first time pull chain table, the method further comprises:
and modifying the effective termination time of the data corresponding to the first day in the first time pull chain table to be the date corresponding to the first day of the current period.
6. A time zipper schedule building apparatus, comprising: a new table unit, a first data insertion unit, a first time setting unit and a second time setting unit;
the new table unit is used for establishing a first time pull chain table on the first day of the current period;
the first data inserting unit is configured to insert modified first data into the first time pull chain table if it is determined that the first data is modified on a first day of the current period, where the first data is any piece of data corresponding to a last day in a second time pull chain table, and the second time pull chain table is a time pull chain table corresponding to a last period of the current period;
the first time setting unit is used for setting the effective starting time of the modified first data in the first time pull chain table as the date corresponding to the first day of the current period;
the second time setting unit is configured to set the effective termination time of the modified first data in the first time pull chain table as a preset date.
7. The apparatus of claim 6, wherein the apparatus further comprises: a first time modification unit;
the first time modification unit is configured to modify, after the first time pull chain table is established on the first day of the current period, the effective termination time of the first data in the second time pull chain table to be a date corresponding to the last day of the previous period if it is determined that the first data is deleted on the first day of the current period.
8. The apparatus of claim 6, wherein the apparatus further comprises: a new data unit, a second time setting unit and a third time setting unit are added;
the newly added data unit is configured to insert second data into the first time pull linked list if it is determined that the second data is newly added on the first day of the current period after the first time pull linked list is established on the first day of the current period, where the second data is data that is not stored on the last day in the second time pull linked list;
the second time setting unit is configured to set the effective start time of the second data in the first time pull chain table as a date corresponding to the first day of the current period;
the third time setting unit is configured to set the effective ending time of the second data in the first time pull chain table as the preset date.
9. A computer-readable storage medium having a program stored thereon, wherein the program when executed by a processor implements the time zipper table construction method according to any one of claims 1 to 5.
10. An electronic device comprising at least one processor, and at least one memory, bus coupled to the processor; the processor and the memory complete communication with each other through the bus; the processor is configured to invoke program instructions in the memory to perform the method of constructing a time zipper table as claimed in any one of claims 1 to 5.
CN202310227373.1A 2023-03-10 2023-03-10 Time pull chain table construction method and related device Pending CN116108018A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310227373.1A CN116108018A (en) 2023-03-10 2023-03-10 Time pull chain table construction method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310227373.1A CN116108018A (en) 2023-03-10 2023-03-10 Time pull chain table construction method and related device

Publications (1)

Publication Number Publication Date
CN116108018A true CN116108018A (en) 2023-05-12

Family

ID=86259916

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310227373.1A Pending CN116108018A (en) 2023-03-10 2023-03-10 Time pull chain table construction method and related device

Country Status (1)

Country Link
CN (1) CN116108018A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383228A (en) * 2023-06-05 2023-07-04 建信金融科技有限责任公司 Data processing method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383228A (en) * 2023-06-05 2023-07-04 建信金融科技有限责任公司 Data processing method, device, computer equipment and storage medium
CN116383228B (en) * 2023-06-05 2023-08-25 建信金融科技有限责任公司 Data processing method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103714090B (en) More index data base transaction methods and database
CN101268439B (en) Database fragment cloning and management
CN102110121B (en) A kind of data processing method and system thereof
US6978284B2 (en) System and method for designating and deleting expired files
US7747589B2 (en) Transaction time indexing with version compression
US9183268B2 (en) Partition level backup and restore of a massively parallel processing database
CN116108018A (en) Time pull chain table construction method and related device
US20060242443A1 (en) Synchronization move support systems and methods
US7406489B2 (en) Apparatus, system and method for persistently storing data in a data synchronization process
JP4304194B2 (en) File system management apparatus and method
CN104598519B (en) A kind of database index system and processing method based on contiguous memory
CN102117303A (en) Patent data analysis method and system
CN103336792A (en) Method and device for data partition
JP4497691B2 (en) Database management method and management system
CN107526733A (en) A kind of slide fastener table date storage method and device
CN102819585A (en) Method for controlling document of extensive makeup language (XML) database
CN108875077A (en) Column storage method, device, server and the storage medium of database
CN113704277B (en) Breakpoint continuous transmission method based on database and related device
CN111625543A (en) HBase table-based method for realizing global monotonically increasing sequence
CN114840561B (en) Method, device, equipment and storage medium for realizing foreign key reference and connection inquiry based on array index
JP4314126B2 (en) Concurrent execution control method and apparatus
CN111061554B (en) Intelligent task scheduling method and device, computer equipment and storage medium
CN110413617B (en) Method for dynamically adjusting hash table group according to size of data volume
CN112417223B (en) Database retrieval method and related device
US20140279869A1 (en) Transaction-Based Traversal-Free Data Synchronization Among Multiple Sites

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination