Method, apparatus, electronic device, and storage medium for data processing

By automatically splitting database operations and matching the results based on page turning parameters and operation quantity thresholds, the problem of complex and inefficient batch database operations is solved, achieving efficient data processing.

CN116701449BActive Publication Date: 2026-07-07CHINA CONSTRUCTION BANK +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2023-06-19
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In existing technologies, when performing batch database operations, the large number of operations requires manual splitting into multiple batches, resulting in a complex and inefficient process.

Method used

By receiving database operation instructions, obtaining data information, calling the operation object class to determine pagination parameters and operation parameters, automatically splitting batch operations, and determining whether batch execution has ended based on the operation result records and quantity threshold matching results.

Benefits of technology

It enables the automatic splitting and batch execution of database operations without manual intervention when dealing with large amounts of data, simplifying the operation process and improving data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116701449B_ABST
    Figure CN116701449B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method and device, electronic equipment and storage medium, and relates to the technical field of computers. A specific embodiment of the method comprises the following steps: receiving an operation instruction of a database operation, obtaining data information of to-be-processed data corresponding to the operation instruction, determining a page turning parameter and an operation parameter of the data operation based on a preset strategy and the data information, in response to the page turning parameter being a preset value, obtaining an operation type of the database operation, executing an operation program corresponding to the operation type based on the operation parameter, obtaining an operation result record corresponding to the operation program, matching the operation result record with a preset operation quantity threshold, generating an operation result of the data operation based on a matching result, and returning the operation result. The embodiment can solve the problems that the number of operations is large, the batch operations are first split into multiple batches by a manual method, and then the data operation is executed for each batch, and the operation process is complex and inefficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] In data processing, storing data in databases is a common technique. To accelerate data processing, batch operations can be performed on the database to achieve batch changes to the data. However, since database batch operations cannot be executed indefinitely, current technologies require manually splitting the batch operations into multiple batches before performing data operations on each batch if the number of operations is large. This process is not only complex but also inefficient. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a data processing method, apparatus, electronic device, and storage medium, which can solve the problem that when the number of operations is large, batch operations are first manually divided into multiple batches, and data operations are performed on each batch separately, resulting in a complex and inefficient operation process.

[0004] To achieve the above objectives, according to one aspect of the present invention, a data processing method is provided.

[0005] A data processing method according to an embodiment of the present invention includes: receiving an operation instruction for a database operation, obtaining data information of the data to be processed corresponding to the operation instruction, and calling an operation object class corresponding to the operation instruction to determine the pagination parameters and operation parameters of the data operation based on a preset strategy and the data information;

[0006] In response to the page turning parameter being a preset value, the operation type of the database operation is obtained, and the operation program corresponding to the operation type is executed based on the operation parameter;

[0007] Obtain the operation result record corresponding to the operation procedure, match it with the preset operation quantity threshold, obtain the matching result, generate the operation result of the data operation based on the matching result, and return the operation result.

[0008] In one embodiment, generating the operation result of the data operation based on the matching result includes:

[0009] In response to a successful match, the operation result of the data operation is generated; in response to an unsuccessful match, the operation procedure corresponding to the operation type is executed again based on the preset operation parameters, and a new operation result record is obtained, until the new operation result record successfully matches the operation quantity threshold, and the operation result of the data operation is generated.

[0010] In another embodiment, the operation result record corresponding to the operation procedure is obtained, matched with a preset operation quantity threshold, and a matching result is obtained, including:

[0011] Obtain the operation result record corresponding to the operation procedure to determine the number of operations executed in the operation result record;

[0012] If the number is less than the number of operations threshold, the matching result is determined to be successful; if the number is equal to the number of operations threshold, the matching result is determined to be unsuccessful.

[0013] In yet another embodiment, the operation parameters include a data start identifier and the number of pages per page;

[0014] Execute the operation procedure corresponding to the operation type based on the operation parameters, including:

[0015] Obtain the data start identifier, determine the current operation end identifier based on the number of pages, and execute the operation program corresponding to the operation type based on the data start identifier and the current operation end identifier;

[0016] Update the current operation end identifier to the data start identifier.

[0017] In yet another embodiment, determining the page-turning parameters for data operations based on a preset strategy and the data information includes:

[0018] The amount of data to be processed is determined based on the data information.

[0019] In response to the data volume exceeding the operation quantity threshold, the page turning parameter is determined to be a preset value;

[0020] or,

[0021] Obtain the execution type from the operation instruction, and in response to the execution type being a preset type, determine the page turning parameter to a preset value.

[0022] In yet another embodiment, before determining the page-turning parameters and operation parameters for the data operation based on the preset strategy and the data information, the method further includes:

[0023] Obtain a preset operation quantity threshold. If the operation quantity threshold falls within an abnormal range, terminate the data operation, generate a prompt message, and send it.

[0024] In yet another embodiment, it further includes:

[0025] In response to the pagination parameter not being a preset value, the operation type of the database operation is obtained, and the operation program corresponding to the operation type is executed based on the operation parameter to obtain the operation result, generate the operation result, and return it.

[0026] To achieve the above objectives, according to another aspect of the present invention, a data processing apparatus is provided.

[0027] An embodiment of the present invention provides a data processing apparatus comprising: a receiving unit, configured to receive an operation instruction for a database operation, acquire data information of data to be processed corresponding to the operation instruction, and call an operation object class corresponding to the operation instruction to determine page-turning parameters and operation parameters for the data operation based on a preset strategy and the data information;

[0028] The processing unit is configured to respond to the page turning parameter being a preset value, obtain the operation type of the database operation, and execute the operation program corresponding to the operation type based on the operation parameter;

[0029] The generation unit is used to obtain the operation result record corresponding to the operation procedure, match it with a preset operation quantity threshold, obtain a matching result, generate the operation result of the data operation based on the matching result, and return the operation result.

[0030] In one embodiment, the generating unit is specifically used for:

[0031] In response to a successful match, the operation result of the data operation is generated; in response to an unsuccessful match, the operation procedure corresponding to the operation type is executed again based on the preset operation parameters, and a new operation result record is obtained, until the new operation result record successfully matches the operation quantity threshold, and the operation result of the data operation is generated.

[0032] In yet another embodiment, the generating unit is specifically used for:

[0033] Obtain the operation result record corresponding to the operation procedure to determine the number of operations executed in the operation result record;

[0034] If the number is less than the number of operations threshold, the matching result is determined to be successful; if the number is equal to the number of operations threshold, the matching result is determined to be unsuccessful.

[0035] In yet another embodiment, the operation parameters include a data start identifier and the number of pages per page;

[0036] The processing unit is specifically used for:

[0037] Obtain the data start identifier, determine the current operation end identifier based on the number of pages, and execute the operation program corresponding to the operation type based on the data start identifier and the current operation end identifier;

[0038] Update the current operation end identifier to the data start identifier.

[0039] In yet another embodiment, the receiving unit is specifically used for:

[0040] The amount of data to be processed is determined based on the data information.

[0041] In response to the data volume exceeding the operation quantity threshold, the page turning parameter is determined to be a preset value;

[0042] or,

[0043] Obtain the execution type from the operation instruction, and in response to the execution type being a preset type, determine the page turning parameter to a preset value.

[0044] In another embodiment, the generating unit is further configured to obtain a preset operation quantity threshold, and in response to the operation quantity threshold being in an abnormal range, terminate the data operation, generate a prompt message, and send it.

[0045] In another embodiment, the generation unit is further configured to respond to the page turning parameter not being a preset value, obtain the operation type of the database operation, execute the operation program corresponding to the operation type based on the operation parameter, obtain the operation result, generate the operation result, and return it.

[0046] To achieve the above objectives, according to another aspect of the present invention, an electronic device is provided.

[0047] An electronic device according to an embodiment of the present invention includes: one or more processors; and a storage device 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 implement the data processing method provided in the embodiment of the present invention.

[0048] To achieve the above objectives, according to another aspect of the present invention, a computer-readable medium is provided.

[0049] An embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the data processing method provided in the embodiment of the present invention.

[0050] To achieve the above objectives, according to another aspect of the present invention, a computer program product is provided.

[0051] A computer program product according to an embodiment of the present invention includes a computer program that, when executed by a processor, implements the data processing method provided in the embodiment of the present invention.

[0052] One embodiment of the above invention has the following advantages or beneficial effects: In this embodiment, after receiving the operation instruction for database operation, the data information of the data to be processed corresponding to the operation instruction is obtained, and the operation object class corresponding to the operation instruction is called. Based on the preset strategy and data information, the pagination parameters and operation parameters of the data operation are determined, thereby realizing the automatic splitting of batch operations. When the pagination parameter is determined to be a preset value, it indicates that the data operation needs to be performed in batches. Therefore, after executing the operation program corresponding to the operation type, it can be determined whether the data operation is completed based on the matching result of the operation result record and the operation quantity threshold, and the operation result is generated after it is determined that the data operation is completed. In this embodiment, the operation object class corresponding to the operation instruction can automatically split the data to be processed, and in the execution of the operation program, it can determine whether the batch execution is over based on the matching result of each operation result record and the operation quantity threshold. Thus, when the amount of data to be processed is large, it can also be automatically split and executed in batches without manual intervention, simplifying the operation process and improving the efficiency of data processing.

[0053] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description

[0054] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:

[0055] Figure 1 This is a schematic diagram of a main flow of a data processing method according to an embodiment of the present invention;

[0056] Figure 2 This is a schematic diagram of another main flow of a data processing method according to an embodiment of the present invention;

[0057] Figure 3 This is a schematic diagram of another main flow of a data processing method according to an embodiment of the present invention;

[0058] Figure 4 This is a schematic diagram of the main units of a data processing apparatus according to an embodiment of the present invention;

[0059] Figure 5 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;

[0060] Figure 6 This is a schematic diagram of the structure of a computer system suitable for implementing embodiments of the present invention. Detailed Implementation

[0061] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0062] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.

[0063] This invention provides a data processing method, which can be executed by a data processing system, such as... Figure 1 As shown, the method includes:

[0064] S101: Receive the operation instruction for database operation, obtain the data information of the data to be processed corresponding to the operation instruction, call the operation object class corresponding to the operation instruction, and determine the pagination parameters and operation parameters of the data operation based on the preset strategy and data information.

[0065] The database operation instructions can be sent externally. Database operations can include various operation types, such as data deletion, data insertion, and data update. The operation instructions can include data information about the data to be processed, specifically the amount of data to be processed, the data identifier of the data to be processed, the data table corresponding to the data to be processed, etc. The data to be processed represents the data corresponding to the database operation.

[0066] In this embodiment of the invention, an operation object class can be preset, specifically a BaseDo object. Parameters for data operations, such as operation parameters and pagination parameters, can be set in the operation object class.

[0067] The operation object class is used to process database operations, splitting the data to be processed into multiple pages, and then performing operations on the data based on these pages. Operation parameters include the data used to perform the operation, which may include a data start identifier, a data end identifier, the amount of data per page, etc. The pagination parameter indicates whether pagination is required for the data operation. If the operation object class has split the data to be processed, then pagination is required, and the pagination parameter can be set to a preset value. If the operation object class has not split the data to be processed, then pagination is not required, and the pagination parameter can be set to a value different from the preset value.

[0068] In this embodiment of the invention, the decision to split the data can be determined by the amount of data to be processed. Specifically, this can be achieved by: determining the amount of data to be processed based on data information; and determining the pagination parameter to a preset value in response to the data amount exceeding the operation quantity threshold. Alternatively, the decision to split the data can be determined based on the execution type in the operation instruction. Specifically, this can be achieved by: obtaining the execution type in the operation instruction; and determining the pagination parameter to a preset value in response to the execution type being a preset type. The operation quantity threshold can be pre-configured and can represent the maximum amount of data that can be processed in a single batch operation. The execution type indicates whether the data to be processed is split during operation execution. If the execution type is a preset type, it means that the data to be processed is split during operation execution, so the pagination parameter is determined to be a preset value. If the execution type is not a preset type, it means that the data to be processed is not split during operation execution, so the pagination parameter is determined not to be a preset value.

[0069] It should be noted that, in this embodiment of the invention, the operation object class can be set based on the operation type, that is, a corresponding operation object class is configured for each operation type, and a correspondence between operation types and operation object classes is established. Alternatively, in this embodiment of the invention, a general operation object class can also be set, that is, an operation object class that is used by all operation types.

[0070] It should be noted that in this embodiment of the invention, an operation quantity threshold is usually preset, and this threshold is typically chosen to be a large value. Therefore, an abnormal range can be set for the operation quantity threshold. In this step, after calling the operation object class corresponding to the operation instruction, the preset operation quantity threshold can be obtained to determine whether it belongs to the abnormal range. If it does, the data operation can be terminated, a prompt message can be generated and sent to indicate that the operation quantity threshold is abnormal. In this embodiment of the invention, the abnormal range can be a range of 0-1, or it can include only 0.

[0071] S102: In response to the page turning parameter being a preset value, obtain the operation type of the database operation, and execute the operation program corresponding to the operation type based on the operation parameter.

[0072] The page turning parameter is a preset value, indicating that the data to be processed has been split and needs to be processed in batches. Therefore, in this step, the operation type of the database operation is obtained so as to execute the operation program corresponding to the operation type based on the operation parameter.

[0073] It should be noted that, since batch data processing needs to be performed in batches, the operation procedure corresponding to the operation type can be executed based on the operation parameters in this step to achieve batch processing of the first batch and obtain the corresponding processing result record.

[0074] In this embodiment of the invention, the operation parameters include a data start identifier and the number of pages per page. Therefore, the operation procedure corresponding to the operation type based on the operation parameters can be executed as follows: obtain the data start identifier, determine the current operation end identifier based on the number of pages per page, execute the operation procedure corresponding to the operation type based on the data start identifier and the current operation end identifier, and update the current operation end identifier to the data start identifier.

[0075] To increase the amount of data processed in each batch, the number of pages is typically set to a threshold for the number of operations. After obtaining the data start identifier and determining the current operation end identifier based on the number of pages, the data from the data start identifier to the current operation end identifier constitutes the data processed in this execution of the operation program. Executing the operation program completes the processing of the data between the data start identifier and the current operation end identifier. After this data processing, the current operation end identifier can be updated to the data start identifier to facilitate the execution of the next batch of data processing.

[0076] It should be noted that, in this embodiment of the invention, in order to ensure accurate batch splitting, it is necessary to first determine whether the data start identifier and data end identifier are the same each time the operation procedure is executed. If they are the same, it means that the data to be processed has been completed, so there is no need to execute the operation again and the process can be returned to end. If they are different, it means that the data to be processed has not been completed, and the steps of the operation procedure corresponding to the operation type based on the operation parameters can continue to be executed.

[0077] In this embodiment of the invention, if the pagination parameter is not a preset value, it indicates that the data to be processed needs to be executed all at once. Therefore, the operation type of the database operation is directly obtained, and the operation program corresponding to the operation type is executed based on the operation parameter to obtain the operation result, generate the operation result, and return it.

[0078] It should be noted that when the operation type in this embodiment of the invention is data update, the operation program usually backs up the data that needs to be updated first, and then uses a cursor to perform the data update.

[0079] S103: Obtain the operation result record corresponding to the operation procedure, match it with the preset operation quantity threshold, obtain the matching result, generate the operation result of the data operation based on the matching result, and return the operation result.

[0080] Each execution of the operation procedure returns an operation result record, which records the operation result corresponding to each data point in this batch operation. In this step, the operation result record is retrieved and matched against a preset operation quantity threshold.

[0081] Since pagination of pending data is typically batch-split based on an operation quantity threshold, after executing an operation procedure once, if the number of pending data processed equals the operation quantity threshold, it indicates a high probability that there is still a batch of pending data that has not been processed. In this case, the steps for executing the operation procedure corresponding to the operation type based on the operation parameters can be executed again until all pending data is processed to generate a processing result. If the number of pending data processed is less than the operation quantity threshold, it means that the pending data has been processed, and a processing result can be generated at this time.

[0082] Therefore, in this step, the step of generating the operation result of the data operation based on the matching result can be executed as follows: in response to the matching result being successful, generate the operation result of the data operation; in response to the matching result being unsuccessful, execute the operation program corresponding to the operation type again based on each preset operation parameter, and obtain a new operation result record, until the new operation result record successfully matches the operation quantity threshold, and generate the operation result of the data operation.

[0083] In this embodiment of the invention, the operation result record is matched with a preset operation quantity threshold to obtain a matching result, which can be executed as follows: determining the number of operations executed in the operation result record based on the operation result record; determining the matching result as successful if the number is less than the operation quantity threshold; and determining the matching result as unsuccessful if the number is equal to the operation quantity threshold.

[0084] It should be noted that, in this embodiment of the invention, the operation result can be generated by summarizing the operation results generated by executing the operation program to generate a total operation result.

[0085] In this embodiment of the invention, the data to be processed can be automatically split by the operation object class corresponding to the operation instruction, and the batch execution is determined based on the matching result of each operation result record and the operation quantity threshold during the execution of the operation program. In this way, when the amount of data to be processed is large, it can also be automatically split and executed in batches without manual intervention, simplifying the operation process and improving the efficiency of data processing.

[0086] The following is combined with Figure 1The illustrated embodiment provides a detailed description of the data processing method in this invention, such as... Figure 2 As shown, the method includes:

[0087] S201: Receive the database operation instruction and obtain the data information of the data to be processed corresponding to the operation instruction.

[0088] S202: Invoke the operation object class corresponding to the operation instruction to determine the page turning parameters and operation parameters of the data operation based on the preset strategy and data information.

[0089] S203: In response to the page turning parameter being a preset value, obtain the operation type of the database operation, and execute the operation procedure corresponding to the operation type based on the operation parameter.

[0090] S204: Obtain the operation result record corresponding to the operation procedure, match it with the preset operation quantity threshold, and obtain the matching result.

[0091] S206: In response to an unsuccessful matching result, the operation procedure corresponding to the operation type is executed again based on each preset operation parameter.

[0092] After completing this step, you can proceed to step S204.

[0093] S205: In response to a successful match, generate the result of the data operation and return the result.

[0094] It should be noted that the data processing principle in the embodiments of the present invention is the same as... Figure 1 The data processing principles in the illustrated embodiments are the same and will not be repeated here.

[0095] The following is combined with Figure 1 The illustrated embodiment provides a detailed description of the data processing method in this invention, such as... Figure 3 As shown, the method includes:

[0096] S301: Receive the operation instructions for database operations and obtain the data information of the data to be processed corresponding to the operation instructions.

[0097] S302: Call the operation object class corresponding to the operation instruction to determine the page turning parameters and operation parameters of the data operation based on the preset strategy and data information.

[0098] S303: In response to the page turning parameter being a preset value, obtain the operation type of the database operation, and execute the operation procedure corresponding to the operation type based on the operation parameter.

[0099] S304: Obtain the operation result record corresponding to the operation procedure to determine the number of operations executed in the operation result record.

[0100] S305: In response to the quantity being equal to the operation quantity threshold, the operation procedure corresponding to the operation type is executed again based on each preset operation parameter.

[0101] After completing this step, you can proceed to step S304.

[0102] S306: In response to the quantity being less than the operation quantity threshold, generate the operation result of the data operation and return the operation result.

[0103] It should be noted that the data processing principle in the embodiments of the present invention is the same as... Figure 1 The data processing principles in the illustrated embodiments are the same and will not be repeated here.

[0104] To address the problems existing in the prior art, embodiments of the present invention provide a data processing apparatus 400, such as... Figure 4 As shown, the device 400 includes:

[0105] The receiving unit 401 is used to receive the operation instructions for database operations, obtain the data information of the data to be processed corresponding to the operation instructions, and call the operation object class corresponding to the operation instructions to determine the pagination parameters and operation parameters of the data operation based on the preset strategy and the data information.

[0106] Processing unit 402 is configured to respond to the page turning parameter being a preset value, obtain the operation type of the database operation, and execute the operation program corresponding to the operation type based on the operation parameter;

[0107] The generation unit 403 is used to obtain the operation result record corresponding to the operation procedure, match it with a preset operation quantity threshold, obtain a matching result, generate the operation result of the data operation based on the matching result, and return the operation result.

[0108] It should be understood that the manner in which embodiments of the present invention are implemented is different from the implementation method. Figure 1 The embodiments shown are the same and will not be described again here.

[0109] In one embodiment, the generating unit is specifically used for:

[0110] In response to a successful match, the operation result of the data operation is generated; in response to an unsuccessful match, the operation procedure corresponding to the operation type is executed again based on the preset operation parameters, and a new operation result record is obtained, until the new operation result record successfully matches the operation quantity threshold, and the operation result of the data operation is generated.

[0111] In yet another embodiment, the generating unit is specifically used for:

[0112] Obtain the operation result record corresponding to the operation procedure to determine the number of operations executed in the operation result record;

[0113] If the number is less than the number of operations threshold, the matching result is determined to be successful; if the number is equal to the number of operations threshold, the matching result is determined to be unsuccessful.

[0114] In yet another embodiment, the operation parameters include a data start identifier and the number of pages per page;

[0115] The processing unit is specifically used for:

[0116] Obtain the data start identifier, determine the current operation end identifier based on the number of pages, and execute the operation program corresponding to the operation type based on the data start identifier and the current operation end identifier;

[0117] Update the current operation end identifier to the data start identifier.

[0118] In yet another embodiment, the receiving unit is specifically used for:

[0119] The amount of data to be processed is determined based on the data information.

[0120] In response to the data volume exceeding the operation quantity threshold, the page turning parameter is determined to be a preset value;

[0121] or,

[0122] Obtain the execution type from the operation instruction, and in response to the execution type being a preset type, determine the page turning parameter to a preset value.

[0123] In another embodiment, the generating unit is further configured to obtain a preset operation quantity threshold, and in response to the operation quantity threshold being in an abnormal range, terminate the data operation, generate a prompt message, and send it.

[0124] In another embodiment, the generation unit is further configured to respond to the page turning parameter not being a preset value, obtain the operation type of the database operation, execute the operation program corresponding to the operation type based on the operation parameter, obtain the operation result, generate the operation result, and return it.

[0125] It should be understood that the manner in which embodiments of the present invention are implemented is different from the implementation method. Figure 1 , 2 The same method is used in the embodiments shown in 1 and 3, and will not be described again here.

[0126] In this embodiment of the invention, the data to be processed can be automatically split by the operation object class corresponding to the operation instruction, and the batch execution is determined based on the matching result of each operation result record and the operation quantity threshold during the execution of the operation program. In this way, when the amount of data to be processed is large, it can also be automatically split and executed in batches without manual intervention, simplifying the operation process and improving the efficiency of data processing.

[0127] According to embodiments of the present invention, an electronic device and a readable storage medium are also provided.

[0128] An electronic device according to an embodiment of the present invention includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the data processing method provided in the embodiment of the present invention.

[0129] Figure 5 An exemplary system architecture 500 is shown, in which a data processing method or data processing apparatus to which embodiments of the present invention can be applied is illustrated.

[0130] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, and 503, a network 504, and a server 505. Network 504 serves as the medium for providing communication links between terminal devices 501, 502, and 503 and server 505. Network 504 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0131] Users can use terminal devices 501, 502, and 503 to interact with server 505 via network 504 to receive or send messages, etc. Various client applications can be installed on terminal devices 501, 502, and 503.

[0132] Terminal devices 501, 502, and 503 can be, but are not limited to, smartphones, tablets, laptops, and desktop computers, etc.

[0133] Server 505 can be a server that provides various services. The server can analyze and process data such as received product information query requests, and feed back the processing results (such as product information - just an example) to the terminal device.

[0134] It should be noted that the data processing method provided in the embodiments of the present invention is generally executed by server 505, and correspondingly, the data processing device is generally located in server 505.

[0135] It should be understood that Figure 5The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0136] The following is for reference. Figure 6 It shows a schematic diagram of the structure of a computer system 600 suitable for implementing embodiments of the present invention. Figure 6 The computer system shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0137] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the system 600. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0138] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.

[0139] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined above in the system of this invention.

[0140] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

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

[0142] The units described in the embodiments of the present invention can be implemented in software or in hardware. The described units can also be located in a processor; for example, a processor can be described as including a receiving unit, a processing unit, and a generating unit. The names of these units do not necessarily limit the specific unit; for example, a receiving unit can also be described as a "unit with instruction receiving function."

[0143] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to perform the data processing method provided by the present invention.

[0144] In another aspect, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the data processing method provided in the embodiments of the present invention.

[0145] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A data processing method, characterized in that, include: The system receives database operation instructions, obtains data information of the data to be processed corresponding to the operation instructions, and calls the operation object class corresponding to the operation instructions to determine the pagination parameters and operation parameters of the data operation based on a preset strategy and the data information. The operation object class is used to process the database operation by splitting the data to be processed into multiple pages, and then performing operations on the data based on the split pages. The operation parameters include the data used to execute the operation. The pagination parameters indicate whether the data operation requires pagination; if the operation object class has split the data to be processed, then the data operation requires pagination. In response to the page turning parameter being a preset value, the operation type of the database operation is obtained, and the operation program corresponding to the operation type is executed based on the operation parameter; Obtain the operation result record corresponding to the operation procedure, match it with the preset operation quantity threshold, obtain the matching result, generate the operation result of the data operation based on the matching result, and return the operation result.

2. The method according to claim 1, characterized in that, The operation result of the data operation is generated based on the matching result, including: In response to a successful match, the operation result of the data operation is generated; in response to an unsuccessful match, the operation procedure corresponding to the operation type is executed again based on each preset operation parameter, and a new operation result record is obtained, until the new operation result record successfully matches the operation quantity threshold, and the operation result of the data operation is generated.

3. The method according to claim 1 or 2, characterized in that, Obtain the operation result record corresponding to the operation procedure, match it with a preset operation quantity threshold, and obtain the matching result, including: Obtain the operation result record corresponding to the operation procedure to determine the number of operations executed in the operation result record; If the number is less than the number of operations threshold, the matching result is determined to be successful; if the number is equal to the number of operations threshold, the matching result is determined to be unsuccessful.

4. The method according to claim 1, characterized in that, The operation parameters include the data start identifier and the number of pages per page; Execute the operation procedure corresponding to the operation type based on the operation parameters, including: Obtain the data start identifier, determine the current operation end identifier based on the number of pages, and execute the operation program corresponding to the operation type based on the data start identifier and the current operation end identifier; Update the current operation end identifier to the data start identifier.

5. The method according to claim 1, characterized in that, The step of determining the page-turning parameters for data operations based on the preset strategy and the data information includes: The amount of data to be processed is determined based on the data information. In response to the data volume exceeding the operation quantity threshold, the page turning parameter is determined to be a preset value; or, Obtain the execution type from the operation instruction, and in response to the execution type being a preset type, determine the page turning parameter to a preset value.

6. The method according to claim 1, characterized in that, Before determining the page-turning parameters and operation parameters for data operations based on the preset strategy and the data information, the process also includes: Obtain a preset operation quantity threshold. If the operation quantity threshold falls within an abnormal range, terminate the data operation, generate a prompt message, and send it.

7. The method according to claim 1, characterized in that, Also includes: In response to the pagination parameter not being a preset value, the operation type of the database operation is obtained, and the operation program corresponding to the operation type is executed based on the operation parameter to obtain the operation result, generate the operation result, and return it.

8. A data processing apparatus, characterized in that, include: A receiving unit is configured to receive database operation instructions, obtain data information of the data to be processed corresponding to the operation instructions, and call the operation object class corresponding to the operation instructions to determine the pagination parameters and operation parameters of the data operation based on a preset strategy and the data information. The operation object class is used to process the database operation by splitting the data to be processed into multiple pages, and then performing operations on the data based on the split pages. The operation parameters include the data used to execute the operation. The pagination parameters indicate whether the data operation requires pagination; if the operation object class has split the data to be processed, then the data operation requires pagination. The processing unit is configured to respond to the page turning parameter being a preset value, obtain the operation type of the database operation, and execute the operation program corresponding to the operation type based on the operation parameter; The generation unit is used to obtain the operation result record corresponding to the operation procedure, match it with a preset operation quantity threshold, obtain a matching result, generate the operation result of the data operation based on the matching result, and return the operation result.

9. The apparatus according to claim 8, characterized in that, The generation unit is specifically used for: In response to a successful match, the operation result of the data operation is generated; in response to an unsuccessful match, the operation procedure corresponding to the operation type is executed again based on each preset operation parameter, and a new operation result record is obtained, until the new operation result record successfully matches the operation quantity threshold, and the operation result of the data operation is generated.

10. The apparatus according to claim 8 or 9, characterized in that, The generation unit is specifically used for: Obtain the operation result record corresponding to the operation procedure to determine the number of operations executed in the operation result record; If the number is less than the number of operations threshold, the matching result is determined to be successful; if the number is equal to the number of operations threshold, the matching result is determined to be unsuccessful.

11. The apparatus according to claim 8, characterized in that, The operation parameters include the data start identifier and the number of pages per page; The processing unit is specifically used for: Obtain the data start identifier, determine the current operation end identifier based on the number of pages, and execute the operation program corresponding to the operation type based on the data start identifier and the current operation end identifier; Update the current operation end identifier to the data start identifier.

12. The apparatus according to claim 8, characterized in that, The receiving unit is specifically used for: The amount of data to be processed is determined based on the data information. In response to the data volume exceeding the operation quantity threshold, the page turning parameter is determined to be a preset value; or, Obtain the execution type from the operation instruction, and in response to the execution type being a preset type, determine the page turning parameter to a preset value.

13. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

14. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.

15. A computer program product, comprising a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.