Data processing method and device, equipment, medium and program product

By acquiring and updating the time cluster parameters of the data table, improving the accuracy of the timestamp, the problem of insufficient data time accuracy in the existing technology is solved, and higher data accuracy and clarity are achieved, and it is suitable for high-precision business operations.

CN119226362AActive Publication Date: 2024-12-31TIANJIN NANKAI UNIV GENERAL DATA TECH
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411748828.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2024-12-31
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

In the prior art, the data time accuracy is low, making it difficult for users to refine the measurement time and perform high-precision business operations, which may cause timestamp errors and trigger a series of problems.

Method used

By obtaining data tables and time cluster parameters, update timestamps based on these parameters, improve the accuracy of timestamps, and perform business processing operations based on high-precision timestamps, refine time measurements and improve data accuracy and clarity.

Benefits of technology

It improves the accuracy of timestamps, solves the problem of timestamp error, enhances the accuracy and clarity of data, and is suitable for business operations with high requirements for time accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226362A_ABST
    Figure CN119226362A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, equipment, a medium and a program product, which can be applied to the technical field of databases. The method comprises the steps that in response to a target operation instruction, a data table and a time cluster parameter are obtained, the data table comprises a timestamp and service data which are associated, and the time cluster parameter is used for controlling the time precision of the timestamp; the timestamp is updated based on the time cluster parameters, a target timestamp is obtained, and the time precision of the target timestamp is higher than that of the timestamp; and based on the target timestamp, executing a service processing operation corresponding to the target operation instruction on the data table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of time series data management, and more specifically to a data processing method, device, equipment, medium and program product. Background Art

[0002] In data products, hours, minutes, and seconds are usually used as the current time units, and the time accuracy is rough and fuzzy. The inventors found that in this context, it is difficult for users to further refine the measurement time when reading data. Secondly, the low data accuracy obtained by storing data leads to insufficient accuracy for other operations when performing calculations. Due to the low time accuracy, when performing business operations with high requirements for time accuracy, timestamp errors will occur, which may be triggered by the system in advance or delayed, leading to a series of problems. Summary of the invention

[0003] In view of the above problems, the present invention provides a data processing method, apparatus, device, medium and program product.

[0004] According to a first aspect of the present invention, there is provided a data processing method, comprising: in response to a target operation instruction, obtaining a data table and a time cluster parameter, wherein the data table comprises associated timestamps and business data, and the time cluster parameter is used to control the time precision of the timestamp; updating the timestamp based on the time cluster parameter to obtain a target timestamp, wherein the time precision of the target timestamp is higher than the time precision of the timestamp; and performing a business processing operation corresponding to the target operation instruction on the data table based on the target timestamp.

[0005] Optionally, the time cluster parameters include a first target value and a second target value, and the first target value and the second target value are used to control the time precision of the timestamp in the data table, and the first time precision corresponding to the first target value is lower than the second time precision corresponding to the second target value; wherein, updating the timestamp based on the time cluster parameters to obtain the target timestamp includes: according to the second target value, calling the time function to process the timestamp corresponding to the business data to obtain the target timestamp with the second time precision.

[0006] Optionally, according to the second target value, a time function is called to process the timestamp corresponding to the business data to obtain a target timestamp with a second time precision, including: modifying the precision parameter according to the second target value to obtain the target precision parameter; modifying the time precision of the timestamp column to the second time precision based on the target precision parameter; calling the time function to process the timestamp corresponding to the business data to obtain a target timestamp with the second time precision.

[0007] Optionally, based on the target timestamp, a business processing operation corresponding to the target operation instruction is performed on the data table, including: sorting the target timestamps corresponding to multiple business data to obtain a timestamp sorting result; and performing corresponding business processing operations on multiple business data in the data table according to the timestamp sorting result.

[0008] Optionally, based on the target timestamp, a business processing operation corresponding to the target operation instruction is performed on the data table, including: determining a first timestamp from the target timestamps corresponding to each of a plurality of business data; using the first timestamp, determining first business data corresponding to the first timestamp from the data table; and performing the business processing operation corresponding to the target operation instruction according to the first business data.

[0009] Optionally, the data processing method also includes: querying the structure of a data table, wherein the structure includes a timestamp column and a data column of the data table, and the data column is used to store business data; calling a time function to insert an initial timestamp corresponding to the business data into the timestamp column, and the initial timestamp represents the timestamp of operating the business data.

[0010] A second aspect of the present invention provides a data processing device, comprising:

[0011] An acquisition module is used to acquire a data table and a time cluster parameter in response to a target operation instruction, wherein the data table includes associated timestamps and business data, and the time cluster parameter is used to control the time precision of the timestamp; an update module is used to update the timestamp based on the time cluster parameter to obtain a target timestamp, wherein the time precision of the target timestamp is higher than the time precision of the timestamp; and an execution module is used to execute a business processing operation corresponding to the target operation instruction on the data table based on the target timestamp.

[0012] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above method.

[0013] The fourth aspect of the present invention also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above method.

[0014] The fifth aspect of the present invention also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0015] Optionally, the present invention obtains a data table and time cluster parameters, wherein the time cluster parameters can control the time precision of the timestamp column of the data table, and can update the timestamp according to the time cluster parameters to obtain a target timestamp, wherein the time precision of the target timestamp is higher than the time precision of the timestamp, and finally, based on the target timestamp, executes a business processing operation corresponding to the target operation instruction on the data table. This process can obtain a timestamp of the target time precision by controlling the time cluster parameters, refines the measurement time, and can effectively improve the accuracy and clarity of the data by improving the time precision. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0017] Figure 1 An application scenario diagram of a data processing method and device according to an embodiment of the present invention is shown;

[0018] Figure 2 A flow chart of a data processing method according to an embodiment of the present invention is shown;

[0019] Figure 3 A flowchart in DML according to an embodiment of the present invention is shown;

[0020] Figure 4 A flowchart of loading and exporting according to another embodiment of the present invention is shown;

[0021] Figure 5 A flowchart in DQL according to another embodiment of the present invention is shown;

[0022] Figure 6 A structural block diagram of a data processing device according to an embodiment of the present invention is shown;

[0023] Figure 7 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0024] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.

[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

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

[0027] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0028] In data products, hours, minutes, and seconds are usually used as the current time units, and the time accuracy at this time is rough and vague. The inventors found that in this context, it is difficult for users to further refine the measurement time when reading data. Secondly, the low data accuracy obtained by storing data leads to insufficient accuracy to support other operations when performing calculations. Due to the low time accuracy, when performing business operations with high requirements for time accuracy, timestamp errors will occur, which may be triggered by the system in advance or delayed, causing a series of problems. In addition, if the data time is consistent based on the unit of seconds, it is difficult to continue to compare the data time.

[0029] In view of this, the present invention provides a data processing method, device, electronic device and medium, the method comprising: in response to a target operation instruction, obtaining a data table and a time cluster parameter, wherein the data table comprises associated timestamps and business data, and the time cluster parameter is used to control the time accuracy of the timestamp; updating the timestamp based on the time cluster parameter to obtain a target timestamp, the time accuracy of the target timestamp being higher than the time accuracy of the timestamp; and performing a business processing operation corresponding to the target operation instruction on the data table based on the target timestamp.

[0030] In the technical solution of the present invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0031] Figure 1 A diagram showing an application scenario of a data processing method and device according to an embodiment of the present invention is shown.

[0032] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0033] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0034] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0035] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0036] It should be noted that the data processing method provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the data processing device provided in the embodiment of the present invention can generally be set in the server 105. The data processing method provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the data processing device provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0037] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0038] The following will be based on Figure 1 The scene described by Figure 2 and Figure 3 The data processing method of the disclosed embodiment is described in detail.

[0039] Figure 2 A flow chart of a data processing method according to an embodiment of the present invention is shown.

[0040] like Figure 2 As shown, the data processing method of this embodiment includes operations S210 to S230.

[0041] In operation S210 , in response to a target operation instruction, a data table and a time cluster parameter are acquired.

[0042] In operation S220 , the timestamp is updated based on the time cluster parameter to obtain a target timestamp, where the time precision of the target timestamp is higher than the time precision of the timestamp.

[0043] In operation S230, based on the target timestamp, a business processing operation corresponding to the target operation instruction is performed on the data table.

[0044] Optionally, the data table may include associated timestamps and service data, and the time cluster parameter may be used to control the time precision of the timestamp, thereby determining whether the cluster needs to perform precision expansion.

[0045] Optionally, the timestamp may be updated based on the time cluster parameter to obtain a target timestamp, the time precision of the updated target timestamp being higher than the time precision of the timestamp. A business processing operation corresponding to the target operation instruction may be performed on the data table based on the target timestamp.

[0046] Optionally, the time cluster parameter can support operations with target time precision in Data Manipulation Language (DML), Load data, and Data Query Language (DQL).

[0047] Optionally, before the time cluster parameter updates the timestamp, you can create a data table, set the timestamp column in the data table to the datatime type (i.e., the type of date and time combination), and set the default time function. View the structure information of the data table, which includes the associated timestamp and business data. If the data table structure information is correct, you can insert a piece of business data and operate the timestamp corresponding to the business data. After the insertion is completed, you can query the accuracy of the timestamp corresponding to the business data to determine whether it meets the preset time accuracy.

[0048] Optionally, modify the time cluster parameters to increase the time precision. In this case, please note that you need to restart the cluster service after modifying the time cluster parameters. The storage format of the cluster modification timestamp is changed to: %Y-%m-%d %H:%i:%s.%f. You can check whether the structure information of the old table is consistent with that before modifying the time cluster parameters. If consistent, you can reinsert a piece of business data and operate the timestamp corresponding to the business data. After the insertion is completed, you can query the precision of the timestamp corresponding to the business data to determine whether it meets the time precision corresponding to the modified time cluster parameters.

[0049] Optionally, the present invention obtains a data table and time cluster parameters, wherein the time cluster parameters can control the time precision of the timestamp column of the data table, and can update the timestamp according to the time cluster parameters to obtain a target timestamp, wherein the time precision of the target timestamp is higher than the time precision of the timestamp, and finally, based on the target timestamp, executes a business processing operation corresponding to the target operation instruction on the data table. This process can obtain a timestamp of the target time precision by controlling the time cluster parameters, refines the measurement time, and can effectively improve the accuracy and clarity of the data by improving the time precision.

[0050] Optionally, the time cluster parameters include a first target value and a second target value, and the first target value and the second target value are used to control the time precision of the timestamp in the data table, and the first time precision corresponding to the first target value is lower than the second time precision corresponding to the second target value; wherein, updating the timestamp based on the time cluster parameters to obtain the target timestamp includes: according to the second target value, calling the time function to process the timestamp corresponding to the business data to obtain the target timestamp with the second time precision.

[0051] Optionally, the time cluster parameter is equivalent to a switch for precision expansion. The time cluster parameter may include a first target value and a second target value. When the time cluster parameter is the first target value, the time precision is ordinary time precision: hours, minutes, and seconds; when the time cluster parameter is the second target value, the time precision may be increased to milliseconds, and the time precision length is six-digit time precision (0~999999), but is not limited thereto. The embodiments of the present invention do not limit the specific length of the time precision. For example, the original time of 2024-1-1 14:37:15 is changed to the extended precision time of 2024-1-1 14:37:15.343956. The first time precision corresponding to the first target value is lower than the second time precision corresponding to the second target value.

[0052] Optionally, according to the second target value, a time function may be called to process the timestamp corresponding to the business data to obtain a target timestamp with a second time precision.

[0053] Optionally, time functions may include current_timestamp, now, localtime and localtimestamp. current_timestamp and now can be used in Structured Query Language (SQL) to obtain the current date and time, usually based on Coordinated Universal Time. localtime can be used to obtain the current time in SQL, but does not contain date information, and only returns the time part (hours, minutes, seconds, milliseconds). localtimestamp can return the current date and time according to the local time zone of the server, which means that if the server is located in a different time zone, the time returned by current_timestamp and localtimestamp may be different. In the present invention, a suitable time function can be selected according to actual conditions. Here, the present invention does not limit the use of specific time functions.

[0054] Optionally, the time cluster parameter corresponding to the first target value can be set to 0, in which case the time precision of the timestamp in the data table is hours, minutes, and seconds; the time cluster parameter corresponding to the second target value can be set to 1, in which case the time precision of the timestamp in the data table is hours, minutes, seconds, and milliseconds; the time cluster parameter can control the number of digits of the time precision of the timestamp. Although high time precision can meet more business needs, at the same time, the use of high time precision data often requires more storage space, more computing resources, and time; therefore, when the time precision requirement is not high, use low time precision, and use high time precision when necessary.

[0055] Optionally, according to the second target value, a time function is called to process the timestamp corresponding to the business data to obtain a target timestamp with a second time precision, including: modifying the precision parameter according to the second target value to obtain the target precision parameter; modifying the time precision of the timestamp column to the second time precision based on the target precision parameter; calling the time function to process the timestamp corresponding to the business data to obtain a target timestamp with the second time precision.

[0056] Optionally, the precision parameter can be modified according to the second target value to obtain the target precision parameter. Based on the target precision parameter, the time precision of the timestamp column can be modified to the second time precision, and finally the time function is called to process the timestamp corresponding to the business data to obtain the target timestamp with the second time precision.

[0057] Figure 3 A flowchart in DML according to an embodiment of the present invention is shown.

[0058] like Figure 3 As shown, the time cluster parameter can be set to the second target value S310, and the precision parameter can be modified according to the second target value to obtain the target precision parameter. Based on the target precision parameter, the time precision of the timestamp column can be modified to the second time precision, and finally the time function is called to perform the operation of inserting a value or selectively inserting or updating a setting in the data table S320, and obtain the target timestamp with the second time precision corresponding to the business data S330.

[0059] Figure 4 A flowchart of loading and exporting according to another embodiment of the present invention is shown.

[0060] like Figure 4 As shown, the time cluster parameter can be set to the second target value S410, and the precision parameter can be modified according to the second target value to obtain the target precision parameter. Based on the target precision parameter, the time precision of the timestamp column can be modified to the second time precision, and finally the time function is called to perform the load or export operation in the data table S420, insert the timestamp and determine whether the timestamp format is correct S430. If it is correct, the target timestamp with the second time precision can be obtained S440. If it is not correct, the timestamp can be loaded into the database according to a specific date and time format S450.

[0061] Figure 5 A flowchart in DQL according to another embodiment of the present invention is shown.

[0062] like Figure 5As shown, the time cluster parameter can be set to the second target value S510, and the precision parameter can be modified according to the second target value to obtain the target precision parameter. Based on the target precision parameter, the time precision of the timestamp column can be modified to the second time precision, and finally the time function is called to perform the operation S520 of querying the timestamp corresponding to the business data in the data table to obtain the target timestamp with the second time precision S530.

[0063] Optionally, based on the target timestamp, a business processing operation corresponding to the target operation instruction is performed on the data table, including: sorting the target timestamps corresponding to multiple business data to obtain a timestamp sorting result; and performing corresponding business processing operations on multiple business data in the data table according to the timestamp sorting result.

[0064] Optionally, if the database is used in a financial transaction system, before the timestamp is updated, due to the low time accuracy, timestamp errors will occur, and some data transactions may be triggered by the system in advance or delayed, causing problems such as abnormal account balances, and even causing system deadlocks and database crashes, resulting in serious problems such as the entire transaction system being unusable. Therefore, the timestamps corresponding to multiple business data can be updated to obtain a target timestamp with higher time accuracy. For example, before the update, the data in the data table is <1000, 2024-1-1 14:37:15>, <10000, 2024-1-1 14:37:15>, and <100, 2024-1-1 14:37:15>, and cannot be sorted according to the corresponding timestamps of the business data. Therefore, a timestamp with higher time precision is required. The timestamp is updated based on the time cluster parameter to obtain the target timestamp. The data in the data table is updated to <1000, 2024-1-1 14:37:15.158344>, <10000, 2024-1-1 14:37:15.462115>, and <100, 2024-1-1 14:37:15.186761>. Thus, the target timestamps corresponding to the multiple business data can be sorted to obtain the timestamp sorting results <1000, 2024-1-1 14:37:15.158344>, <100, 2024-1-1 14:37:15.186761>, <10000, 2024-1-1 14:37:15.462115>. The corresponding business processing operations can be performed on the multiple business data in the data table according to the timestamp sorting results. The application scenarios can be not only in financial transactions, but also in medical record management, to find the time sequence to manage the patient's medical records for disease tracking and treatment decision-making. Or in application scenarios such as event monitoring and response that require time sorting.

[0065] Optionally, based on the target timestamp, a business processing operation corresponding to the target operation instruction is performed on the data table, including: determining a first timestamp from the target timestamps corresponding to each of a plurality of business data; using the first timestamp, determining first business data corresponding to the first timestamp from the data table; and performing the business processing operation corresponding to the target operation instruction according to the first business data.

[0066] Optionally, a first timestamp can be determined from the target timestamps corresponding to each of the multiple business data, and based on the first timestamp, the first business data corresponding to the first timestamp can be determined from the data table, and then the business processing operation related to the target operation instruction is performed according to the first business data. For example, in energy management, power companies and smart grid systems need to check whether the power usage at a certain moment exceeds the standard, so as to perform subsequent energy allocation, etc. If the target timestamp is accurate enough, the specific moment of the check can be determined first, and then the corresponding energy allocation can be performed according to the power usage corresponding to the specific moment. However, it is not limited to this, and the embodiments of the present invention are not limited to this.

[0067] Optionally, the data processing method also includes: querying the structure of a data table, wherein the structure includes a timestamp column and a data column of the data table, and the data column is used to store business data; calling a time function to insert an initial timestamp corresponding to the business data into the timestamp column, and the initial timestamp represents the timestamp of operating the business data.

[0068] Optionally, after obtaining the data table, the structure of the data table can be viewed. The structure of the data table includes a timestamp column and a data column of the data table, but is not limited thereto. The present invention does not specifically limit the structure of the data table. The data column can be used to store business data. When the structure of the data table is correct, a time function can be called to insert an initial timestamp corresponding to the business data into the timestamp column. The initial timestamp represents the timestamp of the business data operation, for example, the timestamp corresponding to the insertion of business data or the timestamp when the business data is deleted. Here, the present invention does not limit the specific operation.

[0069] Based on the above data processing method, the present invention also provides a data processing device. Figure 6 The device is described in detail.

[0070] Figure 6 A structural block diagram of a data processing device according to an embodiment of the present invention is shown.

[0071] like Figure 6 As shown, the data processing device 600 of this embodiment includes an acquisition module 610 , an update module 620 and an execution module 630 .

[0072] The acquisition module 610 is used to acquire a data table and a time cluster parameter in response to a target operation instruction, wherein the data table includes associated timestamps and business data, and the time cluster parameter is used to control the time accuracy of the timestamp.

[0073] The updating module 620 is configured to update the timestamp based on the time cluster parameter to obtain a target timestamp, wherein the time precision of the target timestamp is higher than the time precision of the timestamp.

[0074] The execution module 630 is used to execute the business processing operation corresponding to the target operation instruction on the data table based on the target timestamp.

[0075] Optionally, the present invention obtains a data table and time cluster parameters, wherein the time cluster parameters can control the time precision of the timestamp column of the data table, and can update the timestamp according to the time cluster parameters to obtain a target timestamp, wherein the time precision of the target timestamp is higher than the time precision of the timestamp, and finally, based on the target timestamp, executes a business processing operation corresponding to the target operation instruction on the data table. This process can obtain a timestamp of the target time precision by controlling the time cluster parameters, refines the measurement time, and can effectively improve the accuracy and clarity of the data by improving the time precision.

[0076] Optionally, the time cluster parameter includes a first target value and a second target value, the first target value and the second target value are used to control the time precision of the timestamp in the data table, and a first time precision corresponding to the first target value is lower than a second time precision corresponding to the second target value.

[0077] Optionally, the updating module 620 includes: a second time accuracy obtaining unit.

[0078] The second time precision obtaining unit is used to call the time function to process the timestamp corresponding to the business data according to the second target value, so as to obtain a target timestamp with the second time precision.

[0079] Optionally, the second time accuracy obtaining unit includes: a first modifying subunit, a second modifying subunit and a second time accuracy obtaining subunit.

[0080] The first modification subunit is used to modify the accuracy parameter according to the second target value to obtain the target accuracy parameter.

[0081] The second modification subunit is used to modify the time precision of the timestamp column to a second time precision based on the target precision parameter.

[0082] The second time precision obtaining subunit is used to call the time function, process the timestamp corresponding to the business data, and obtain the target timestamp with the second time precision.

[0083] Optionally, the execution module 630 includes: a sorting unit and a first operation unit.

[0084] The sorting unit is used to sort the target timestamps corresponding to the multiple business data to obtain a timestamp sorting result.

[0085] The first operation unit is used to perform corresponding business processing operations on multiple business data in the data table according to the timestamp sorting result.

[0086] Optionally, the execution module 630 includes: a first timestamp determination unit, a first business data determination unit and a second operation unit.

[0087] The first timestamp determining unit is used to determine a first timestamp from target timestamps corresponding to each of the plurality of business data.

[0088] The first business data determining unit is used to determine the first business data corresponding to the first timestamp from the data table by using the first timestamp.

[0089] The second operation unit is used to execute the business processing operation corresponding to the target operation instruction according to the first business data.

[0090] Optionally, the data processing device 600 of this embodiment includes: a query module and an initial timestamp insertion module.

[0091] The query module is used to query the structure of the data table, wherein the structure includes a timestamp column and a data column of the data table, and the data column is used to store business data.

[0092] The initial timestamp insertion module is used to call the time function to insert the initial timestamp corresponding to the business data into the timestamp column, and the initial timestamp represents the timestamp of the operation business data.

[0093] Optionally, any multiple modules among the acquisition module 610, the update module 620 and the execution module 630 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. Optionally, at least one of the acquisition module 610, the update module 620 and the execution module 630 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Or at least one of the acquisition module 610, the update module 620 and the execution module 630 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0094] Figure 7 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present invention is shown.

[0095] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present invention includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0096] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present invention by executing the programs in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present invention by executing the programs stored in the one or more memories.

[0097] Optionally, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.

[0098] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.

[0099] Optionally, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, optionally, the computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.

[0100] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the data processing method provided by the embodiment of the present invention.

[0101] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when it is executed by the processor 701. Optionally, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0102] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0103] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present invention are performed. Optionally, the system, device, apparatus, module, unit, etc. described above can be implemented by a computer program module.

[0104] Optionally, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages, specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, such as Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0105] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0106] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in various ways, even if such combinations and / or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All of these combinations and / or combinations fall within the scope of the present invention.

[0107] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination. The scope of the present invention is defined by the attached claims and their equivalents. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.

Claims

1. A data processing method, characterized in that: The method comprises: In response to the target operation instruction, a data table and a time cluster parameter are acquired, wherein the data table includes associated timestamps and service data, and the time cluster parameter is used to control the time accuracy of the timestamp; updating the timestamp based on the time cluster parameter to obtain a target timestamp, wherein the time precision of the target timestamp is higher than the time precision of the timestamp; and Based on the target timestamp, a business processing operation corresponding to the target operation instruction is performed on the data table.

2. The method according to claim 1, characterized in that The time cluster parameter includes a first target value and a second target value, the first target value and the second target value are used to control the time precision of the timestamp in the data table, and a first time precision corresponding to the first target value is lower than a second time precision corresponding to the second target value; The updating of the timestamp based on the time cluster parameter to obtain a target timestamp includes: According to the second target value, a time function is called to process the timestamp corresponding to the business data to obtain the target timestamp with the second time precision.

3. The method according to claim 2, characterized in that The calling of a time function to process a timestamp corresponding to the service data according to the second target value to obtain the target timestamp with the second time precision includes: Modify the accuracy parameter according to the second target value to obtain a target accuracy parameter; Modify the time precision of the timestamp column in the data table to the second time precision based on the target precision parameter; The time function is called to process the timestamp corresponding to the business data to obtain the target timestamp with the second time precision.

4. The method according to claim 1, characterized in that: The performing, based on the target timestamp, a business processing operation corresponding to the target operation instruction on the data table includes: Sort the target timestamps corresponding to the plurality of business data to obtain a timestamp sorting result; According to the timestamp sorting result, corresponding business processing operations are performed on the multiple business data in the data table.

5. The method according to claim 1, characterized in that: The performing, based on the target timestamp, a business processing operation corresponding to the target operation instruction on the data table includes: Determine a first timestamp from target timestamps corresponding to each of the plurality of business data; Using the first timestamp, determining first service data corresponding to the first timestamp from the data table; A business processing operation corresponding to the target operation instruction is executed according to the first business data.

6. The method according to claim 2, characterized in that Also includes: Querying the structure of the data table, wherein the structure includes a timestamp column and a data column of the data table, and the data column is used to store the business data; The time function is called to insert an initial timestamp corresponding to the business data into the timestamp column, where the initial timestamp represents a timestamp for operating the business data.

7. A data processing device, characterized in that: The device comprises: An acquisition module, configured to acquire a data table and a time cluster parameter in response to a target operation instruction, wherein the data table includes associated timestamps and service data, and the time cluster parameter is used to control the time accuracy of the timestamp; an updating module, configured to update the timestamp based on the time cluster parameter to obtain a target timestamp, wherein the time precision of the target timestamp is higher than the time precision of the timestamp; and An execution module is used to execute a business processing operation corresponding to the target operation instruction on the data table based on the target timestamp.

8. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Methods and devices of realizing data updating and data snapshot at OLAP (Online Analytical Processing) database

    CN108073595A

  • Control system, control device, combination method and recording medium

    CN109143989A

  • Information processing method, terminal equipment and network side equipment

    CN111277351A

  • Method and device for determining primary key of data table and electronic equipment

    CN113656409A

  • Table-level data synchronization method and device in database

    CN114064629A