Data Processing Method, Apparatus, Device, Medium and Program Product

The method improves data processing by updating timestamps with time cluster parameters to enhance precision, addressing inaccuracies and ensuring accurate execution of time-sensitive operations.

CN119226362BActive Publication Date: 2025-07-15TIANJIN NANKAI UNIV GENERAL DATA TECH
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the data time accuracy is low, resulting in timestamp errors, affecting the accuracy and reliability of business operations, and it is difficult to perform detailed measurements and comparisons.

Method used

By obtaining data tables and time cluster parameters, update the timestamps to improve time accuracy, use time functions to process the timestamps to achieve the target time accuracy, and perform corresponding business processing operations.

Benefits of technology

Improves the time accuracy and accuracy of the data, avoids timestamp errors, and ensures the correct execution of business operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226362B_ABST
    Figure CN119226362B_ABST
Patent Text Reader

Abstract

The present invention provides a data processing method, apparatus, device, medium and program product, which can be applied to the field of database technology. The method includes: in response to a target operation instruction, obtaining a data table and a time cluster parameter, where the data table includes an associated timestamp and service 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, where the time precision of the target timestamp is higher than that of the timestamp; and performing a service processing operation corresponding to the target operation instruction on the data table based on the target timestamp.
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 governance, 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 unit, and the time accuracy at this time is rough and vague. The inventor found that in this context, it is difficult for users to refine the measurement time when reading data. Secondly, the low data accuracy of stored data results in insufficient accuracy for other operations during calculations. Due to the low time accuracy, when performing business operations with high requirements for time accuracy, timestamp errors may occur, which may be triggered earlier or delayed by the system, thereby causing a series of problems. Summary of the Invention

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

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

[0005] Optionally, the time cluster parameter includes 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 accuracy of the timestamps in the data table, and the first time accuracy corresponding to the first target value is lower than the second time accuracy corresponding to the second target value; where updating the timestamps based on the time cluster parameter to obtain target timestamps includes: according to the second target value, calling a time function to process the timestamps corresponding to the business data to obtain target timestamps with the second time accuracy.

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

[0007] Optionally, based on the target timestamp, perform a business processing operation corresponding to the target operation instruction on the data table, including: sorting the target timestamps corresponding to multiple pieces of business data respectively to obtain a timestamp sorting result; performing a corresponding business processing operation on the multiple pieces of business data in the data table according to the timestamp sorting result.

[0008] Optionally, based on the target timestamp, perform a business processing operation corresponding to the target operation instruction on the data table, including: determining a first timestamp from the target timestamps corresponding to multiple pieces of business data respectively; using the first timestamp to determine a first piece of business data corresponding to the first timestamp from the data table; performing a business processing operation corresponding to the target operation instruction according to the first piece of business data.

[0009] Optionally, the data processing method further includes: querying the structure of the data table, where 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 for operating the business data.

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

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

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

[0013] A fourth aspect of the present invention further provides a computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor is caused to execute the above method.

[0014] A fifth aspect of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0015] Optionally, the present invention obtains a data table and time clustering parameters. Among them, the time clustering parameters can control the time accuracy of the timestamp column of the data table. The timestamp can be updated according to the time clustering parameters to obtain a target timestamp. The time accuracy of the target timestamp is higher than that of the timestamp. Finally, based on the target timestamp, a business processing operation corresponding to the target operation instruction can be performed on the data table. This process can control the time clustering parameters to obtain a timestamp with a target time accuracy, refine the measurement of time, and effectively improve the accuracy and clarity of data by improving the time accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Through the following description of the embodiments of the present invention with reference to the drawings, the above content and other objects, features, and advantages of the present invention will become clearer. In the drawings:

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

[0018] Figure 2 The flowchart of the data processing method according to the embodiment of the present invention is shown;

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

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

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

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

[0023] Figure 7 The block diagram of the electronic device suitable for implementing the data processing method according to the embodiment of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0024] Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, it should be understood that these descriptions are exemplary and not intended to limit the scope of the present invention. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present invention. However, obviously, one or more embodiments can be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present invention.

[0025] The terms used herein are for describing specific embodiments only and are not intended to limit the present invention. The terms "comprising", "including" and the like as used herein indicate the presence of the described features, steps, operations and / or components, but do not preclude the presence or addition of one or more other features, steps, operations or components.

[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those of ordinary skill 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] In cases where expressions such as "at least one of A, B, and C" are used, generally, it should be interpreted according to the meaning commonly understood by those of ordinary skill in the art (for example, "a system having at least one of A, B, and C" should include, but not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C).

[0028] In data products, hours, minutes, and seconds are usually used as the current time unit, and the time accuracy at this time is rough and vague. The inventors found that in this context, it is very difficult for users to refine the measurement time when reading data. Secondly, the low data accuracy obtained by storing data results in 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 earlier or delayed by the system, thus triggering a series of problems. In addition, if the data times are consistent on the basis of the second unit, it is very difficult to continue comparing the data times.

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

[0030] In the technical solution of the present invention, the user information involved (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 for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties. Moreover, the processing of relevant data, such as collection, storage, use, processing, transmission, provision, disclosure, and application, complies with relevant laws, regulations, and standards, takes necessary confidentiality measures, does not violate public order and good customs, and provides corresponding operation entrances for users to choose to authorize or refuse.

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

[0032] As Figure 1 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 as a medium to provide 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 fiber optic cables, etc.

[0033] Users 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 may 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 as examples).

[0034] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop portable computers, and desktop computers, etc.

[0035] The server 105 may be a server providing various services, such as a background management server that supports the websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (only as an example). The background management server may analyze and process data such as user requests received, and feedback 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 by the embodiments of the present invention can generally be executed by the server 105. Correspondingly, the data processing device provided by the embodiments of the present invention can generally be set in the server 105. The data processing method provided by the embodiments of the present invention can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Correspondingly, the data processing device provided by the embodiments of the present invention can also be set in a server or a server cluster different from the server 105 and capable of communicating 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 numbers of terminal devices, networks, and servers in

[0038] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. Figure 1 Based on the scenario described below Figure 2 and Figure 3 the data processing method of the disclosed embodiments will be described in detail.

[0039] Figure 2 shows a flowchart of the data processing method according to an embodiment of the present invention.

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

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

[0042] In operation S220, based on the time cluster parameters, the time stamp is updated to obtain a target time stamp, and the time accuracy of the target time stamp is higher than that of the time stamp.

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

[0044] Optionally, the data table may include associated time stamps and service data, and the time cluster parameters may be used to control the time accuracy of the time stamps, so as to determine whether the cluster needs to perform accuracy extension.

[0045] Optionally, the time stamp can be updated based on the time cluster parameters to obtain a target time stamp, and the time accuracy of the updated target time stamp is higher than that of the time stamp. A service processing operation corresponding to the target operation instruction can be performed on the data table based on the target time stamp.

[0046] Optionally, the time clustering parameter can support operating with the target time precision in Data Manipulation Language (DML), Load data (i.e., loading data), and Data Query Language (DQL).

[0047] Optionally, before the time clustering parameter updates the timestamp, a data table can be created, the timestamp column in the data table can be set to the datatime type (i.e., the type of date and time combination), and the default time function can be set. View the structure information of the data table, which includes the associated timestamp and business data. When the data table structure information is correct, a piece of business data and the timestamp corresponding to the operation of the business data can be inserted. After the insertion is completed, the precision of the timestamp corresponding to the business data can be queried to determine whether it meets the preset time precision.

[0048] Optionally, when modifying the time clustering parameter, the time precision can be increased. At this time, it should be noted that the cluster service needs to be restarted after modifying the time clustering parameter. The storage format of the cluster-modified timestamp is changed to: %Y-%m-%d %H:%i:%s.%f. It can be checked whether the structure information of the old table is the same as before modifying the time clustering parameter. If it is the same, a piece of business data and the timestamp corresponding to the operation of the business data can be re-inserted. After the insertion is completed, the precision of the timestamp corresponding to the business data can be queried to determine whether it meets the time precision corresponding to after modifying the time clustering parameter.

[0049] Optionally, the present invention obtains a data table and a time clustering parameter. Among them, the time clustering parameter can control the time precision of the timestamp column of the data table, and the timestamp can be updated according to the time clustering parameter to obtain a target timestamp. The time precision of the target timestamp is higher than that of the timestamp. Finally, based on the target timestamp, a business processing operation corresponding to the target operation instruction can be executed on the data table. This process can control the time clustering parameter to obtain a timestamp with the target time precision, refine the measurement of time, and effectively improve the accuracy and clarity of data by increasing the time precision.

[0050] Optionally, the time clustering 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. The first time precision corresponding to the first target value is lower than the second time precision corresponding to the second target value; among them, updating the timestamp according to the time clustering parameter to obtain a target timestamp includes: according to the second target value, calling a time function to process the timestamp corresponding to the business data to obtain a target timestamp with the second time precision.

[0051] Optionally, the time clustering parameter is equivalent to a switch for precision extension. The time clustering parameter may include a first target value and a second target value. When the time clustering parameter is the first target value, the time precision is ordinary time precision: hours, minutes, and seconds; when the time clustering parameter is the second target value, the time precision can be increased to milliseconds, and the time precision length is six - digit time precision (0 - 999999), but not limited to this. Embodiments of the present invention do not limit the specific length of the time precision. For example, if the original time is 2024 - 1 - 1 14:37:15, it is changed to the extended precision time 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 can be called to process the timestamp corresponding to the service data to obtain a target timestamp with the second time precision.

[0053] Optionally, the time function may include current_timestamp, now, localtime, and localtimestamp. current_timestamp and now can be used to obtain the current date and time in Structured Query Language (SQL), usually in Coordinated Universal Time. localtime can be used to obtain the current time in SQL, but does not include 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 in different time zones, the times returned by current_timestamp and localtimestamp may be different. In the present invention, a suitable time function can be selected according to the actual situation, and the present invention does not limit the use of specific time functions here.

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

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

[0056] Optionally, the precision parameter can be modified according to the second target value to obtain a 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, call the time function to process the timestamp corresponding to the business data, and obtain a target timestamp with the second time precision.

[0057] Figure 3 Shows a flowchart in DML according to an embodiment of the present invention.

[0058] As Figure 3 shown, the time clustering parameter can be set to the second target value S310. The precision parameter can be modified according to the second target value to obtain a target precision parameter. Based on the target precision parameter, the time precision of the timestamp column can be modified to the second time precision. Finally, call the time function to perform an operation of inserting values or selectively inserting or updating settings in the data table S320, and obtain a target timestamp S330 with the second time precision corresponding to the business data.

[0059] Figure 4 Shows a flowchart in loading and exporting according to another embodiment of the present invention.

[0060] As Figure 4 shown, the time clustering parameter can be set to the second target value S410. The precision parameter can be modified according to the second target value to obtain a target precision parameter. Based on the target precision parameter, the time precision of the timestamp column can be modified to the second time precision. Finally, call the time function to perform an operation of loading or exporting in the data table S420, insert a timestamp and determine whether the timestamp format is correct S430. If it is correct, a target timestamp S440 with the second time precision can be obtained. If it is incorrect, the timestamp can be loaded into the database according to a specific date and time format S450.

[0061] Figure 5 Shows a flowchart in DQL according to another embodiment of the present invention.

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

[0063] Optionally, based on the target timestamp, perform a business processing operation corresponding to the target operation instruction on the data table, including: sorting the target timestamps corresponding to multiple business data respectively to obtain a timestamp sorting result; 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 applied to the financial trading system, before the timestamp is updated, due to the low time accuracy, there will be timestamp errors. Some data transactions may be triggered earlier or delayed by the system, resulting in problems such as abnormal account balances, and even system deadlocks and database crashes, which may cause serious problems such as the entire trading system being unable to be used. Therefore, the timestamps corresponding to multiple business data can be updated to obtain target timestamps 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>, <100, 2024-1-1 14:37:15>, and it is impossible to sort according to the timestamps corresponding to various business data. Therefore, timestamps with higher time accuracy are required. Based on the time cluster parameter, the timestamp is updated to obtain the target timestamp, and 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>, <100, 2024-1-1 14:37:15.186761>. Therefore, the target timestamps corresponding to multiple business data can be sorted respectively to obtain a timestamp sorting result <1000, 2024-1-1 14:37:15.158344>, <100, 2024-1-1 14:37:15.186761>, <10000, 2024-1-1 14:37:15.462115>. Corresponding business processing operations can be performed on multiple business data in the data table according to the timestamp sorting result. The application scenarios can not only be in financial transactions, but also in medical record management, where the medical records of patients are managed in chronological order for condition tracking and treatment decision-making. Or in application scenarios such as event monitoring and response that require sorting by time.

[0065] Optionally, based on the target timestamp, perform a business processing operation corresponding to the target operation instruction on the data table, including: determining a first timestamp from the target timestamps corresponding to multiple pieces of business data; using the first timestamp to determine first business data corresponding to the first timestamp from the data table; and performing a 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 multiple pieces of business data, and based on the first timestamp, first business data corresponding to the first timestamp can be determined from the data table, and then a 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 for subsequent energy distribution, etc. When the accuracy of the target timestamp is sufficient, the specific moment to be checked can be determined first, and then the corresponding energy distribution is performed according to the power usage corresponding to the specific moment. However, this is not limited to this, and the embodiments of the present invention do not limit this.

[0067] Optionally, the data processing method further includes: querying the structure of the data table, where the structure includes the timestamp column and the data column of the data table, and the data column is used to store business data; and calling a time function to insert an initial timestamp corresponding to the business data into the timestamp column, where 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 the timestamp column and the data column of the data table, but this is not limited to this, and 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, where the initial timestamp represents the timestamp of operating the business data, for example, the timestamp corresponding to inserting the business data or the timestamp when deleting the business data. 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. The following will be combined with Figure 6 to describe this device in detail.

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

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

[0072] An acquisition module 610, configured to acquire a data table and time cluster parameters in response to a target operation instruction, where the data table includes associated timestamps and service data, and the time cluster parameters are used to control the time accuracy of the timestamps.

[0073] An update module 620, configured to update the timestamp based on the time cluster parameters to obtain a target timestamp, where the time accuracy of the target timestamp is higher than that of the timestamp.

[0074] An execution module 630, configured to perform a service processing operation corresponding to the target operation instruction on the data table based on the target timestamp.

[0075] Optionally, the present invention acquires a data table and time cluster parameters, where the time cluster parameters can control the time accuracy of the timestamp column of the data table, and the timestamp can be updated according to the time cluster parameters to obtain a target timestamp, where the time accuracy of the target timestamp is higher than that of the timestamp. Finally, a service processing operation corresponding to the target operation instruction can be performed on the data table based on the target timestamp. This process can control the time cluster parameters to obtain a timestamp with a target time accuracy, refine the measurement of time, and effectively improve the accuracy and clarity of data by improving the time accuracy.

[0076] Optionally, the time cluster parameters include a first target value and a second target value, where the first target value and the second target value are used to control the time accuracy of the timestamps in the data table, and the first time accuracy corresponding to the first target value is lower than the second time accuracy corresponding to the second target value.

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

[0078] The second time accuracy obtaining unit is configured to call a time function to process the timestamp corresponding to the service data according to the second target value to obtain a target timestamp with the second time accuracy.

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

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

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

[0082] The second time accuracy obtaining subunit is configured to call a time function to process the timestamp corresponding to the service data to obtain a target timestamp with the second time accuracy.

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

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

[0085] The first operation unit is configured to perform corresponding service processing operations on the multiple service 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 service data determination unit, and a second operation unit.

[0087] The first timestamp determination unit is configured to determine a first timestamp from the target timestamps corresponding to multiple service data respectively.

[0088] The first service data determination unit is configured to use the first timestamp to determine first service data corresponding to the first timestamp from the data table.

[0089] The second operation unit is configured to perform a service processing operation corresponding to the target operation instruction according to the first service data.

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

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

[0092] The initial timestamp insertion module is configured to call a time function to insert an initial timestamp corresponding to the service data into the timestamp column, and the initial timestamp represents the timestamp of operating the service data.

[0093] Optionally, any one or more of the obtaining module 610, the updating module 620, and the executing module 630 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. Optionally, at least one of the obtaining module 610, the updating module 620, and the executing module 630 may 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 chip, a system on a substrate, a system in a package, an application specific integrated circuit (ASIC), or may be implemented by any other reasonable means of integrating or packaging circuits, etc., in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the obtaining module 610, the updating module 620, and the executing module 630 may be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding functions.

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

[0095] As Figure 7 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 section 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 701 may also include on-board 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 the RAM 703, various programs and data required for the operation of the electronic device 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. The processor 701 performs various operations of the method flow according to an embodiment of the present invention by executing the programs in the ROM 702 and / or the RAM 703. It should be noted that the program may also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 may also perform various operations of the method flow according to an 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, for example, 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. The 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 from it can be 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 / device / system described in the above embodiments; or may exist separately without being assembled into the device / device / 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 embodiments of the present invention is implemented.

[0099] Optionally, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it 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 of the above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, optionally, the computer-readable storage medium may include one or more memories other than the above-described ROM 702 and / or RAM 703 and / or ROM 702 and RAM 703.

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

[0101] When the computer program is executed by the processor 701, the above functions defined in the system / apparatus of the embodiments of the present invention are executed. Optionally, the above-described systems, apparatuses, modules, units, etc. can be implemented by computer program modules.

[0102] In one embodiment, the computer program can rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program can also be transmitted and distributed in the form of signals on a network medium, and be downloaded and installed through the communication part 709, and / or be installed from the removable medium 711. The program code included in the computer program can be transmitted by any suitable 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 be 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 embodiments of the present invention are executed. Optionally, the above-described systems, devices, apparatuses, modules, units, etc. can be implemented by computer program modules.

[0104] Optionally, the program code for executing the computer program provided by the embodiments 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 procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include but are not limited to, such as Java, C++, python, the "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 a remote computing device, or entirely on a 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 (for example, by using an Internet service provider to connect through the Internet).

[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

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

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

Claims

1. A data processing method, characterized in that, The method includes: In response to a target operation instruction, obtaining a data table and time cluster parameters, where the data table includes associated timestamps and service data, the time cluster parameters are used to control the time accuracy of the timestamps, the time cluster parameters include a first target value and a second target value, the first target value and the second target value are used to control the time accuracy of the timestamps in the data table, and the first time accuracy corresponding to the first target value is lower than the second time accuracy corresponding to the second target value; According to the second target value, calling a time function to process the timestamp corresponding to the service data, obtaining a target timestamp with the second time accuracy, and the time accuracy of the target timestamp is higher than that of the timestamp; Sorting the target timestamps corresponding to multiple pieces of the service data respectively to obtain a timestamp sorting result; Performing corresponding service processing operations on multiple pieces of service data in the data table according to the timestamp sorting result.

2. The method according to claim 1, characterized in that The step of, according to the second target value, calling a time function to process the timestamp corresponding to the service data, obtaining a target timestamp with the second time accuracy, includes: Modifying a precision parameter according to the second target value to obtain a target precision parameter; Based on the target precision parameter, modifying the time accuracy of the timestamp column in the data table to the second time accuracy; Calling the time function to process the timestamp corresponding to the service data to obtain a target timestamp with the second time accuracy.

3. The method according to claim 1, characterized in that, The method further includes: Determining a first timestamp from the target timestamps corresponding to multiple pieces of the service data respectively; Using the first timestamp to determine first service data corresponding to the first timestamp from the data table; Performing a service processing operation corresponding to the target operation instruction according to the first service data.

4. The method according to claim 1, wherein It further includes: Querying the structure of the data table, where the structure includes the timestamp column and data column of the data table, and the data column is used to store the service data; Calling the time function to insert an initial timestamp corresponding to the service data into the timestamp column, and the initial timestamp represents the timestamp for operating the service data.

5. A data processing device, characterized in that, The apparatus includes: An obtaining module, configured to obtain a data table and time cluster parameters in response to a target operation instruction, where the data table includes associated timestamps and service data, the time cluster parameters are used to control the time accuracy of the timestamps, the time cluster parameters include a first target value and a second target value, the first target value and the second target value are used to control the time accuracy of the timestamps in the data table, and the first time accuracy corresponding to the first target value is lower than the second time accuracy corresponding to the second target value; An updating module, configured to, according to the second target value, call a time function to process the timestamp corresponding to the service data, obtaining a target timestamp with the second time accuracy, and the time accuracy of the target timestamp is higher than that of the timestamp; and An execution module, configured to perform a service processing operation corresponding to the target operation instruction on the data table based on the target timestamp. The execution module includes a sorting unit and a first operation unit. The sorting unit is configured to sort the target timestamps respectively corresponding to multiple pieces of the service data to obtain a timestamp sorting result. The first operation unit is configured to perform corresponding service processing operations on multiple pieces of service data in the data table according to the timestamp sorting result.

6. 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 4.

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

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

Citation Information

Patent Citations

  • Information processing method, terminal equipment and network side equipment

    CN111277351A

  • Timestamp mode determination method and device for database management system

    CN114328546A

  • Method and device for determining timestamp and relay protection device

    CN115765906A

  • Time series data acquisition method and device, electronic equipment and storage medium

    CN116756216A

  • Method, device, equipment and medium for integrating high-precision time

    CN117792558A