Table division method and device, electronic equipment and storage medium

By defining the rules for the master table and target sub-tables, and adopting diverse sub-table methods and models, the problem of a single sub-table rule was solved, and the accuracy and efficiency of sub-tables were improved.

CN121597690APending Publication Date: 2026-03-03SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511764197.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing table partitioning techniques use overly simplistic partitioning rules, making it difficult to freely choose partitioning methods and compromising the accuracy of the partitioning results.

Method used

By determining the first master table and the target partitioning rules, including the partitioning table name and the data in the partitioning table, the master table is divided using various partitioning methods. The partitioning model is then used for automated execution to achieve diverse partitioning operations.

Benefits of technology

It enables diverse table partitioning methods, improving the accuracy and efficiency of table partitioning and avoiding the difficulty of free choice caused by a single table partitioning rule.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597690A_ABST
    Figure CN121597690A_ABST
Patent Text Reader

Abstract

The invention discloses a table dividing method and device, electronic equipment and a storage medium. The method comprises the following steps: determining a first general table and a target sub-table rule; the sub-table rule comprises a sub-table name and data of the sub-table; and performing table division on the first general table according to a target table division rule to obtain at least one sub-table. According to the technical scheme of the invention, the method comprises the steps: determining a first general table and a target sub-table rule; the sub-table rule comprises a sub-table name and data of the sub-table; the first general table is divided according to the target table division rule, at least one sub-table is obtained, and therefore diversified table division modes are achieved, and the situation that the table division rule is too single, and the table division modes are difficult to freely select is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of database table management technology, and in particular to a table partitioning method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of internet businesses, enterprise systems face the challenge of rapidly expanding data volumes when processing data. Single-table storage can no longer meet the performance requirements of high concurrency and large data volume scenarios. Therefore, the "database sharding and table partitioning" technology is commonly used to distribute data across multiple sub-tables or databases according to certain rules in order to improve query efficiency and system performance. Existing table partitioning technologies are mostly focused on the unified management methods of database middleware, but the table partitioning rules of these technologies are too simplistic and make it difficult to freely choose the table partitioning method. Summary of the Invention

[0003] This invention provides a table partitioning method, apparatus, electronic device, and storage medium to address the problem that traditional table partitioning rules are too simplistic and make it difficult to guarantee the accuracy of the partitioning results.

[0004] According to one aspect of the present invention, a table partitioning method is provided, the method comprising:

[0005] Determine the primary master table and the target table partitioning rules; the table partitioning rules include the table name and the data in the respective table.

[0006] The first master table is partitioned according to the target partitioning rules to obtain at least one sub-table.

[0007] According to another aspect of the present invention, a metering device is provided, the device comprising:

[0008] The data determination module is used to determine the first master table and the target table partitioning rules; the table partitioning rules include the table name and the data in the respective table.

[0009] The table partitioning module is used to partition the first master table according to the target table partitioning rules to obtain at least one sub-table.

[0010] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0011] At least one processor; and

[0012] A memory that is communicatively connected to at least one processor; wherein,

[0013] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the table partitioning method of any embodiment of the present invention.

[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the table partitioning method of any embodiment of the present invention.

[0015] The technical solution of this invention determines a first master table and target table partitioning rules; the table partitioning rules include the table name and the data of the table to which the table belongs; the first master table is partitioned according to the target table partitioning rules to obtain at least one sub-table, thereby realizing diverse table partitioning methods and avoiding the table partitioning rules being too singular and difficult to freely choose the table partitioning method.

[0016] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of a table partitioning method provided in Embodiment 1 of the present invention;

[0019] Figure 2 This is a flowchart of another table partitioning method provided in Embodiment 2 of the present invention;

[0020] Figure 3 This is a schematic diagram of the structure of a meter splitting device according to Embodiment 3 of the present invention;

[0021] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the table partitioning method of this invention. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0024] Example 1

[0025] Figure 1 The flowchart of a table partitioning method is provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where it is necessary to customize the selection of table partitioning rules to divide the table. This method can be executed by a table partitioning device, which can be implemented in hardware and / or software and can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:

[0026] S110. Determine the first master table and the target sub-table rules; the sub-table rules include the sub-table name and the data of the sub-table.

[0027] The first master table can be a table that needs to be partitioned. A table is a collection of similar entity data stored in a two-dimensional tabular format of "rows (records) + columns (fields)". Table partitioning rules are the principles or conditions for dividing a table.

[0028] Optionally, before determining the first master table and the target sub-table rules, it also includes...

[0029] Provide at least one candidate table partitioning rule to the target object.

[0030] Candidate table partitioning rules can be pre-generated rules for partitioning tables.

[0031] Since some table partitioning rules may be used frequently, they will be stored as candidate partitioning rules so that they can be used directly in subsequent use.

[0032] For example, by time rules: such as year-month or year-month-day, automatically generate sub-table suffixes (e.g., user_202501, user_20250129).

[0033] 2) By region rule: Automatically generate sub-table suffixes (such as order_SZ, order_GZ) based on region code.

[0034] Optionally, define the target table partitioning rules, including:

[0035] Based on the instructions of the target object, the target table partitioning rule is determined from each candidate table partitioning rule.

[0036] After providing multiple candidate table partitioning rules, the target object can issue a selection instruction to specify the selected candidate table partitioning rule as the target table partitioning rule.

[0037] Optionally, the process of constructing candidate partitioning rules includes:

[0038] Determine the table partitioning requirements for the target object;

[0039] Based on the table partitioning requirements of the target object, construct candidate table partitioning rules.

[0040] Candidate table partitioning rules can be constructed in advance or by the target object itself.

[0041] To address this, we can first determine the table partitioning requirements of the target object, and then construct candidate table partitioning rules based on those requirements.

[0042] Optionally, table partitioning requirements may include at least time-based partitioning and region-based partitioning.

[0043] S120. Divide the first master table into at least one sub-table according to the target table partitioning rules.

[0044] After obtaining the target partitioning rules, the first master table is partitioned according to the target partitioning rules, with custom prefixes and suffixes (such as region_province, region_year, etc.); based on the target partitioning rules, partition names with business semantics are dynamically generated; the target partitioning rules and the generated partition names are stored for subsequent data routing, thereby realizing the division of the first master table and obtaining at least one sub-table.

[0045] By adopting the technical solution of this application, a first master table and target sub-table rules are determined; the sub-table rules include the sub-table name and the data of the sub-table; the first master table is subdivided according to the target sub-table rules to obtain at least one sub-table, thereby realizing a variety of sub-table methods, thus avoiding the sub-table rules being too simple and difficult to freely choose the sub-table method.

[0046] Example 2

[0047] Figure 2 This embodiment provides a flowchart of another table partitioning method for this invention. Based on the above embodiments, this embodiment further optimizes the process of partitioning the first master table according to the target partitioning rules to obtain at least one sub-table. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the table partitioning method in this embodiment may include the following steps:

[0048] S210. Determine the first master table and the target sub-table rules; the sub-table rules include the sub-table name and the data of the sub-table.

[0049] S220. Input the target table partitioning rule and the first total table into the pre-trained table partitioning model to obtain at least one sub-table.

[0050] The table partitioning model can be a pre-trained model capable of partitioning a table. The table partitioning model can be trained from any model; this application does not impose any restrictions on this.

[0051] By inputting the target table partitioning rules and the first master table into a pre-trained table partitioning model, the table partitioning model divides the first master table, thereby automating the execution of table partitioning operations and improving table partitioning efficiency.

[0052] Optionally, the table-splitting model includes a semantic understanding sub-model and a table-splitting sub-model;

[0053] Specifically, the target table partitioning rule and the first master table are input into a pre-trained table partitioning model to obtain at least one sub-table, including:

[0054] The target table segmentation rule is input into a pre-trained semantic understanding sub-model, and the table segmentation understanding result is generated.

[0055] Input the results of the table partitioning and the first master table into the table partitioning sub-model to obtain at least one sub-table.

[0056] Considering that the target table partitioning rules input by the target object may be quite colloquial, a semantic understanding sub-model is used to understand the target table partitioning rules and generate table partitioning understanding results to ensure that the target table partitioning rules can be accurately understood by the table partitioning model. The table partitioning understanding results and the first master table are then input into the table partitioning sub-model so that the scoring table sub-model can understand them accurately.

[0057] By adopting the technical solution of this application, a first master table and a target table partitioning rule are determined. The table partitioning rule includes the table name and the data of the table to which it belongs. The target table partitioning rule and the first master table are input into a pre-trained table partitioning model to obtain at least one sub-table. The table partitioning model then divides the first master table, thereby realizing the automated execution of table partitioning operations and improving table partitioning efficiency.

[0058] Example 3

[0059] Figure 3This invention provides a structural block diagram of a table partitioning device, applicable to situations requiring customized selection of partitioning rules for table division. This partitioning device can be implemented in hardware and / or software and can be configured in an electronic device with data processing capabilities. Figure 3 As shown, the table partitioning device of this embodiment may include: a data determination module 310 and a table partitioning module 320. Wherein:

[0060] The data determination module 310 is used to determine the first master table and the target table partitioning rules; the table partitioning rules include the table name and the data in the respective table.

[0061] The table partitioning module 320 is used to partition the first master table according to the target table partitioning rules to obtain at least one sub-table.

[0062] Based on the above embodiments, optionally, before determining the first master table and the target sub-table rules, it also includes...

[0063] Provide at least one candidate table partitioning rule to the target object.

[0064] Based on the above embodiments, optionally, the target table partitioning rules are determined, including:

[0065] Based on the instructions of the target object, the target table partitioning rule is determined from each candidate table partitioning rule.

[0066] Based on the above embodiments, optionally, the process of constructing candidate table partitioning rules includes:

[0067] Determine the table partitioning requirements for the target object;

[0068] Based on the table partitioning requirements of the target object, construct candidate table partitioning rules.

[0069] Based on the above embodiments, optionally, the table partitioning requirements may include at least time-based partitioning and region-based partitioning.

[0070] Based on the above embodiments, optionally, the first master table can be partitioned according to the target partitioning rules to obtain at least one sub-table, including:

[0071] The target table partitioning rule and the first master table are input into the pre-trained table partitioning model to obtain at least one sub-table.

[0072] Based on the above embodiments, optionally, the table partitioning model includes a semantic understanding sub-model and a table partitioning sub-model;

[0073] Specifically, the target table partitioning rule and the first master table are input into a pre-trained table partitioning model to obtain at least one sub-table, including:

[0074] The target table segmentation rule is input into a pre-trained semantic understanding sub-model, and the table segmentation understanding result is generated.

[0075] Input the results of the table partitioning and the first master table into the table partitioning sub-model to obtain at least one sub-table.

[0076] The table partitioning device provided in the embodiments of the present invention can execute the table partitioning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0077] Example 4

[0078] Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0079] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0080] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0081] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the table partitioning method.

[0082] In some embodiments, the table partitioning method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the table partitioning method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the table partitioning method by any other suitable means (e.g., by means of firmware).

[0083] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0084] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0085] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0086] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0087] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0088] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0089] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0090] 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 be made according to 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 table partitioning method, characterized in that, include: Determine the primary master table and the target table partitioning rules; the table partitioning rules include the table name and the data in the respective table. The first master table is partitioned according to the target partitioning rules to obtain at least one sub-table.

2. The method according to claim 1, characterized in that, Before determining the first master table and the target sub-table rules, the following also includes: Provide at least one candidate table partitioning rule to the target object.

3. The method according to claim 2, characterized in that, Define the target table partitioning rules, including: Based on the instructions of the target object, the target table partitioning rule is determined from each candidate table partitioning rule.

4. The method according to claim 2, characterized in that, The process of constructing the candidate table partitioning rules includes: Determine the table partitioning requirements for the target object; Based on the table partitioning requirements of the target object, candidate table partitioning rules are constructed.

5. The method according to claim 4, characterized in that, The table partitioning requirements include at least time-based partitioning and region-based partitioning.

6. The method according to claim 1, characterized in that, The first master table is partitioned according to the target partitioning rules to obtain at least one sub-table, including: The target table partitioning rule and the first master table are input into a pre-trained table partitioning model to obtain at least one sub-table.

7. The method according to claim 6, characterized in that, The table-splitting model includes a semantic understanding sub-model and a table-splitting sub-model; Specifically, the target table partitioning rule and the first master table are input into a pre-trained table partitioning model to obtain at least one sub-table, including: The target table segmentation rule is input into a pre-trained semantic understanding sub-model, and table segmentation understanding results are generated. The results of the table segmentation understanding and the first master table are input into the table segmentation sub-model to obtain at least one sub-table.

8. A metering device, characterized in that, include: The data determination module is used to determine the first master table and the target table partitioning rules; the table partitioning rules include the table name and the data in the respective table. The table partitioning module is used to partition the first master table according to the target table partitioning rules to obtain at least one sub-table.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the table partitioning method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the table partitioning method according to any one of claims 1-7.