Method and device for complementing codes in batches

By processing and sorting the encoding tables, batch-completion encoding tables are generated, which solves the problem of encoding exceeding the fixed range and frequent database access, and improves the efficiency of batch encoding generation.

CN119476201APending Publication Date: 2025-02-18E SURFING VISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411608499.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

When the prior art generates encoding in batches, it is easy to cause encoding to exceed the fixed range and frequently request a relational database, affecting the program execution efficiency.

Method used

By obtaining the table that needs to be completed in batches and the number of unique encodings n that needs to be generated, the first table, the second table and the third table are generated, encoding exclusion and sorting are performed, and batch completion encoding tables are generated.

Benefits of technology

It realizes batch-fast generation and completion of discontinuous unique encodings within a fixed range, reduces the number of relational database accesses and trial and error costs, and improves the execution efficiency of the program.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476201A_ABST
    Figure CN119476201A_ABST
Patent Text Reader

Abstract

The invention relates to a batch completion coding method and device, and belongs to the technical field of code completion, and the method comprises the steps: obtaining a table needing batch completion coding and a unique code number n needing to be generated; processing the table needing batch completion coding and the unique code number n needing to be generated to generate a first table; generating a second table according to the unique code number n; generating a third table according to the first table and the second table; performing code elimination on the third table according to the table needing batch completion coding; sorting the tables after the codes are eliminated, and obtaining the first n codes after sorting; and generating a batch completion coding table according to the sorted first n codes and the table needing batch completion coding. According to the method, discontinuous unique codes within a fixed range can be quickly generated and complemented in batches, the access frequency and trial and error cost of the relational database are reduced, and the execution efficiency of a batch complementation coding program is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of batch completion coding, and in particular, relates to a method and device for batch completion coding. Background Art

[0002] For the convenience of reading and querying, unique identification marks such as device codes are usually set in a fixed format, such as the device number "31000000001320000392", where the last seven digits are continuously incremented codes. At present, the common practice of batch generation of codes is to match the previous code and then find the maximum value of the code that needs to be incremented, and then perform cyclic increment according to the maximum value to generate codes in batches.

[0003] Since the code is always incremented in batches by the maximum value, and the code has a fixed range limit, some businesses also have operations to delete old code data in batches, or there is abnormal data that causes the generated code maximum value to be close to the design upper limit, and this part of the business data is strongly associated with each module and cannot be easily deleted. Therefore, the code is likely to exceed the code range in advance without reaching the design quantity. If batch generation is not performed to separately verify the missing code data in the relational database, there will be a problem of frequent requests to the relational database, which in turn affects the efficiency of program execution. Summary of the invention

[0004] In view of the above deficiencies in the prior art, the purpose of the invention is to provide a method and device for batch completion coding, which is convenient for batch rapid generation of discontinuous unique codes within a fixed range, reduces the number of relational database accesses and trial and error costs, and improves the execution efficiency of batch completion coding programs.

[0005] A first aspect of the present invention provides a method for batch completion encoding, comprising:

[0006] Get the table that needs to be batch-completed and the number of unique codes n that need to be generated;

[0007] Processing the table that needs to be batch-completed and the number n of unique codes that need to be generated to generate a first table;

[0008] Generate a second table according to the number of unique codes n;

[0009] Generate a third table according to the first table and the second table;

[0010] The third table is coded and excluded according to the table that needs to complete the coding in batches;

[0011] Sort the table after the code exclusion, and obtain the first n codes after sorting;

[0012] Generate a batch completion encoding table based on the sorted first n encodings and the table of encodings that need to be batch completed.

[0013] Furthermore, in the above-mentioned method for batch complementary coding, the table requiring batch complementary coding is processed to generate a first table according to the number of unique codes n required to be generated, including:

[0014] The first table is generated by summing up the table that needs to be batch-completed and the number n of unique codes that need to be generated.

[0015] Furthermore, in the above-mentioned method for batch completion coding, generating a second table according to the number of unique codes n includes: generating a second table of codes in consecutive order from 1 to n.

[0016] Furthermore, in the above-mentioned batch completion encoding method, generating a third table according to the first table and the second table includes:

[0017] The first table and the second table are combined to generate the third table.

[0018] Furthermore, in the above-mentioned method for batch completion coding, data exclusion is performed on the third table according to the table that needs batch completion coding, including:

[0019] The third table is associated with a table query that requires batch completion of codes, excluding codes that can be associated.

[0020] Furthermore, in the above-mentioned method for batch completion coding, generating a batch completion coding table according to the sorted first n codes and the table requiring batch completion coding includes:

[0021] Insert the first n sorted codes into the table of codes that need to be batch-completed to generate a batch-completed code table.

[0022] Furthermore, in the above-mentioned batch completion encoding method, generating a second table of 1 to n consecutively ordered encodings includes:

[0023] A second table of 1 to n consecutively ordered codes is recursively generated using a relational database function.

[0024] A second aspect of the present invention further provides a device for batch encoding completion, comprising:

[0025] Acquisition module: used to obtain the table that needs to be batch-completed and the number of unique codes n that need to be generated;

[0026] Processing module: used for processing the table requiring batch completion encoding and the number n of unique encodings requiring generation to generate a first table;

[0027] A first generating module: used to generate a second table according to the number of unique codes n;

[0028] The second generating module is used to generate a third table according to the first table and the second table;

[0029] Coding exclusion module: used for performing coding exclusion on the third table according to the table that needs to complete the coding in batches;

[0030] Sorting module: used to sort the table after code exclusion and obtain the first n codes after sorting;

[0031] The third generation module is used to generate a batch completion encoding table according to the sorted first n encodings and the table of encodings that need to be batch completed.

[0032] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory;

[0033] The processor is used to execute any one of the above batch completion encoding methods by calling the program or instruction stored in the memory.

[0034] In a fourth aspect of the present invention, a computer-readable storage medium is further proposed, wherein the computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute any one of the above batch completion encoding methods.

[0035] The beneficial effects of the present invention are as follows: the present invention obtains a table that needs to be batch-completed and a number of unique codes n that need to be generated; processes the table that needs to be batch-completed and the number of unique codes n that need to be generated to generate a first table; generates a second table according to the number of unique codes n; generates a third table according to the first table and the second table; excludes codes from the third table according to the table that needs to be batch-completed; sorts the table after code exclusion to obtain the first n codes after sorting; generates a batch-completed code table according to the first n codes after sorting and the table that needs to be batch-completed. The present invention facilitates batch and rapid generation of discontinuous unique codes within a fixed range, reduces the number of relational database accesses and trial-and-error costs, and improves the execution efficiency of the program in this scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0037] Figure 1 A method diagram of batch completion encoding provided by an embodiment of the present invention;

[0038] Figure 2 An example of a method for batch encoding provided by an embodiment of the present invention Figure 1 ;

[0039] Figure 3 An example of a method for batch encoding provided by an embodiment of the present invention Figure 2 ;

[0040] Figure 4 An example of a method for batch encoding provided by an embodiment of the present invention Figure 3 ;

[0041] Figure 5 A diagram of a device for batch encoding completion provided by an embodiment of the present invention;

[0042] Figure 6 A schematic block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.

[0044] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.

[0045] In the description of the present invention, the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be internal communication between two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.

[0047] The present invention proposes a method, device, electronic device and storage medium for batch coding completion, which are convenient for batch rapid generation of discontinuous unique codes within a fixed range, reduce the number of relational database accesses and trial and error costs, and improve the execution efficiency of batch coding completion programs.

[0048] Before introducing the embodiments of the present invention, professional terms involved in the present invention are first introduced.

[0049] A relational database (RDBMS) is a database used to store and access interrelated data points. It uses a relational model to display data directly and intuitively in a table. In a relational database, each row in a table represents a record. Each record has a unique ID (also known as a key), and the columns in the table are used to store the attributes of the data. Each attribute of each record usually has a value, so that users can easily establish associations between data points.

[0050] Unique encoding refers to an identifier or code that is used to ensure that each item or record in a data set is unique. In computer science and database management, unique encoding is often used to ensure the integrity and consistency of data.

[0051] Method Embodiment

[0052] Figure 1 A method diagram for batch completion encoding provided by an embodiment of the present invention.

[0053] Figure 2 An example of a method for batch encoding provided by an embodiment of the present invention Figure 1 .

[0054] Figure 3 An example of a method for batch encoding provided by an embodiment of the present invention Figure 2 .

[0055] In the first aspect of the present invention, a method for batch completion encoding is proposed, combining Figure 1 , including seven steps from S1 to S7:

[0056] S1: Get the table that needs to be batch-completed and the number n of unique codes that need to be generated.

[0057] Specifically, in the embodiments of the present invention, exemplary, combined Figure 2 , the table that needs to be batch-completed is Table 1, and the number of unique codes that need to be generated is n; combined with Figure 3, the table that needs to be completed in batches is [2, 4, 6, 7, 8, 9, 12, 16], and the missing codes in the table that needs to be completed in batches are [1, 3, 5, 10, 11, 13, 14, 15]. 5 codes and 2 codes need to be inserted respectively, that is, the number of unique codes that need to be generated is 5 and 2.

[0058] S2: Processing the table that needs batch completion encoding and the number n of unique encodings that need to be generated to generate a first table.

[0059] Specifically, in the embodiment of the present invention, the table of codes that need to be batch-completed and the number n of unique codes that need to be generated are processed to generate the first table by performing a summation process.

[0060] S3: Generate a second table according to the number n of unique codes.

[0061] Specifically, in the embodiment of the present invention, generating the second table according to the number n of unique codes is generating the second table of codes in consecutive order of 1 to n according to the number n of unique codes.

[0062] S4: Generate a third table according to the first table and the second table.

[0063] Specifically, in the embodiment of the present invention, generating the third table according to the first table and the second table is to merge the first table and the second table.

[0064] S5: Encoding and excluding the third table according to the tables that need to be batch-completed.

[0065] Specifically, in the embodiment of the present invention, the third table is coded exclusion according to the table that needs to complete the codes in batches. The third table is associated with the table that needs to complete the codes in batches for query, and the codes that can be associated are excluded.

[0066] S6: Sort the table after the codes are excluded, and obtain the first n codes after sorting.

[0067] Specifically, in an embodiment of the present invention, a method for sorting the table after code exclusion and obtaining the first n codes after sorting is described in detail below.

[0068] S7: Generate a batch completion code table according to the sorted first n codes and the table of codes that need to be batch completed.

[0069] Specifically, in an embodiment of the present invention, a method for generating a batch completion code table according to the sorted first n codes and a table of codes that need to be batch completed is described in detail below.

[0070] Furthermore, in the above-mentioned method for batch complementary coding, the table requiring batch complementary coding is processed to generate a first table according to the number of unique codes n required to be generated, including:

[0071] The first table is generated by summing up the table that needs to be batch-completed and the number n of unique codes that need to be generated.

[0072] Specifically, in the embodiments of the present invention, exemplary, combined Figure 2 , sum up the table 1 that needs to be batch-completed and the number of unique codes n that need to be generated to generate the first table, i.e., table 2; Figure 3 , the table [2, 4, 6, 7, 8, 9, 12, 16] that needs to be batch-completed and the number of unique codes that need to be generated 5 are summed to obtain [7, 9, 11, 12, 13, 14, 17, 21].

[0073] Furthermore, in the above-mentioned method for batch completion coding, generating a second table according to the number of unique codes n includes: generating a second table of codes in consecutive order from 1 to n.

[0074] Specifically, in the embodiments of the present invention, exemplary, combined Figure 2 , according to the number of unique codes n, generate a second table of codes from 1 to n in continuous order, namely Table 3; combined with Figure 3 , generate a continuous sorting code table 3 from 1 to 5 according to the number of unique codes 5.

[0075] Furthermore, in the above-mentioned batch completion encoding method, generating a third table according to the first table and the second table includes:

[0076] The first table and the second table are combined to generate the third table.

[0077] Specifically, in the embodiments of the present invention, exemplary, combined Figure 2 , merge the first table, i.e., Table 2, and the second table, i.e., Table 3, to obtain the third table, i.e., Table 4; Figure 3 , merge the first table [7, 9, 11, 12, 13, 14, 17, 21] and the second table of consecutive sorting codes from 1 to 5 to obtain [1, 2, 3, 4, 5, 7, 9, 11, 12, 13, 14, 17, 21].

[0078] Furthermore, in the above-mentioned method for batch completion coding, data exclusion is performed on the third table according to the table that needs batch completion coding, including:

[0079] The third table is associated with a table query that requires batch completion of codes, excluding codes that can be associated.

[0080] Specifically, in the embodiments of the present invention, exemplary, combined Figure 2 , according to the need to batch complete the encoded table, that is, Table 1, the third table, Table 4, is encoded and excluded; combined Figure 3According to the third table [2, 4, 6, 7, 8, 9, 12, 16], the table [1, 2, 3, 4, 5, 7, 9, 11, 12, 13, 14, 17, 21] that needs batch completion encoding is excluded to obtain [1, 3, 5, 11, 13, 14, 17, 21].

[0081] Furthermore, in the above-mentioned method for batch completion coding, generating a batch completion coding table according to the sorted first n codes and the table requiring batch completion coding includes:

[0082] Insert the first n sorted codes into the table of codes that need to be batch-completed to generate a batch-completed code table.

[0083] Specifically, in the embodiments of the present invention, exemplary, combined Figure 2 , sort the table after the code exclusion, obtain the first n codes after sorting to obtain Table 5, insert the codes in Table 5 into the table that needs batch completion code to generate a batch completion code table; combine Figure 3 , sort [1, 3, 5, 11, 13, 14, 17, 21], get the first 5 codes [1, 3, 5, 11, 13], and combine Figure 3 , generate a batch completion encoding table [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] based on the sorted first 5 encodings [1, 3, 5, 11, 13] and the table of encodings that need to be batch completed [2, 4, 6, 7, 8, 9, 12, 16].

[0084] Furthermore, in the above-mentioned batch completion encoding method, generating a second table of 1 to n consecutively ordered encodings includes:

[0085] A second table of 1 to n consecutively ordered codes is recursively generated using a relational database function.

[0086] Specifically, in the embodiments of the present invention, exemplary, combined Figure 2 , use the relational database function to recursively generate the second table of 1 to n consecutive sorting codes, namely Table 3; combined Figure 3 , use the relational database function to recursively generate a continuous sorting code table 3 from 1 to 5.

[0087] Figure 4 An example of a method for batch encoding provided by an embodiment of the present invention Figure 3 .

[0088] Combination Figure 4 , perform batch completion encoding operations on the tables that need batch completion encoding to obtain Figure 4 .

[0089] Device Embodiment

[0090] Figure 5 A diagram of a device for batch encoding completion provided in an embodiment of the present invention.

[0091] In a second aspect of the present invention, a device for batch completion coding is also proposed, combining Figure 4 ,include:

[0092] The acquisition module 51 is used to acquire a table of codes that need to be batch-completed and the number n of unique codes that need to be generated.

[0093] Specifically, in the embodiment of the present invention, the acquisition module 51 acquires a table of codes that need to be batch-completed and the number n of unique codes that need to be generated.

[0094] The processing module 52 is used to process the table that needs batch completion coding and the number n of unique codes that need to be generated to generate a first table.

[0095] Specifically, in the embodiment of the present invention, the processing module 52 performs a summation process on the table of codes that need to be batch-completed and the number n of unique codes that need to be generated to generate the first table.

[0096] The first generating module 53 is used to generate a second table according to the number n of unique codes.

[0097] Specifically, in the embodiment of the present invention, the first generating module 53 generates the second table according to the number of unique codes n by generating the second table of codes in consecutive order from 1 to n according to the number of unique codes n.

[0098] The second generating module 54 is configured to generate a third table according to the first table and the second table.

[0099] Specifically, in the embodiment of the present invention, the second generating module 54 generates the third table according to the first table and the second table by merging the first table and the second table.

[0100] The coding exclusion module 55 is used to exclude the coding of the third table according to the table of batch completion coding as needed.

[0101] Specifically, in the embodiment of the present invention, the code exclusion module 55 excludes codes from the third table according to the table that needs to complete codes in batches, that is, the third table is associated with the table that needs to complete codes in batches, and the associated codes are excluded.

[0102] The sorting module 56 is used to sort the table after the codes are excluded, and obtain the first n codes after sorting.

[0103] Specifically, in the embodiment of the present invention, the sorting module 56 sorts the table after the codes are excluded, and obtains the first n codes after the sorting.

[0104] The third generating module 57 is used to generate a batch completion code table according to the sorted first n codes and the table of codes that need to be batch completed.

[0105] Specifically, in the embodiment of the present invention, the third generating module 57 generates a batch completion code table according to the sorted first n codes and the table of codes that need to be batch completed.

[0106] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory;

[0107] The processor is used to execute any one of the above batch completion encoding methods by calling the program or instruction stored in the memory.

[0108] In a fourth aspect of the present invention, a computer-readable storage medium is further proposed, wherein the computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute any one of the above batch completion encoding methods.

[0109] Figure 6 It is a schematic block diagram of an electronic device provided by an embodiment of the present invention.

[0110] like Figure 6 As shown, the electronic device includes: at least one processor 601, at least one memory 602 and at least one communication interface 603. The various components in the electronic device are coupled together through a bus system 604. The communication interface 603 is used to transmit information between external devices. It can be understood that the bus system 604 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 604 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 6 Various buses are labeled as bus system 604 .

[0111] It can be understood that the memory 602 in this embodiment can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.

[0112] In some implementations, the memory 602 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system and application programs.

[0113] The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. A program that implements any method in a batch completion encoding method provided in an embodiment of the present invention can be included in the application.

[0114] In an embodiment of the present invention, the processor 601 calls a program or instruction stored in the memory 602, specifically, a program or instruction stored in an application, and the processor 601 is used to execute the steps of each embodiment of a method for batch completion encoding provided in an embodiment of the present invention.

[0115] Get the table that needs to be batch-completed and the number of unique codes n that need to be generated;

[0116] Processing the table requiring batch completion encoding and the number n of unique encodings requiring generation to generate a first table;

[0117] Generate a second table according to the number of unique codes n;

[0118] Generate a third table according to the first table and the second table;

[0119] The third table is coded and excluded according to the table that needs to complete the coding in batches;

[0120] Sort the table after the code exclusion, and obtain the first n codes after sorting;

[0121] Generate a batch completion encoding table based on the sorted first n encodings and the table of encodings that need to be batch completed.

[0122] Any method in a method for batch completion encoding provided by an embodiment of the present invention can be applied to a processor 601, or implemented by a processor 601. The processor 601 can be an integrated circuit chip having signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 601 or an instruction in the form of software. The above-mentioned processor 601 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0123] The steps of any method in a method for batch completion coding provided by an embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software units in a decoding processor. The software unit can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602, and completes the steps of the method in combination with its hardware.

[0124] Those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present invention and to form different embodiments.

[0125] Those skilled in the art will appreciate that the description of each embodiment has its own emphasis, and for parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0126] Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

[0127] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for batch completion encoding, characterized in that: include: Get the table that needs to be batch-completed and the number of unique codes n that need to be generated; Processing the table requiring batch completion encoding and the number n of unique encodings requiring generation to generate a first table; Generate a second table according to the number of unique codes n; Generate a third table according to the first table and the second table; The third table is coded and excluded according to the table that needs to complete the coding in batches; Sort the table after the code exclusion, and obtain the first n codes after sorting; Generate a batch completion encoding table based on the sorted first n encodings and the table of encodings that need to be batch completed.

2. A method for batch completion encoding according to claim 1, characterized in that: The step of processing the table requiring batch completion encoding to generate a first table according to the number n of unique codes required to be generated includes: The first table is generated by summing the table that needs batch completion coding and the number n of unique codes that need to be generated.

3. A method for batch completion encoding according to claim 1, characterized in that: The generating of the second table according to the number n of unique codes includes: generating a second table of codes sequentially ordered from 1 to n.

4. A method for batch completion encoding according to claim 1, characterized in that: The generating a third table according to the first table and the second table comprises: The first table and the second table are combined to generate a third table.

5. The method for batch encoding completion according to claim 1, characterized in that: The data in the third table is excluded according to the table of batch-completing codes as needed, including: The third table is associated with a table query that requires batch completion of codes, excluding codes that can be associated.

6. A method for batch completion encoding according to claim 1, characterized in that: The step of generating a batch completion coding table according to the sorted first n codes and the table of codes that need to be batch completed includes: Insert the first n codes after sorting into the table of codes that need to be batch-completed to generate a batch-completed code table.

7. A method for batch encoding completion according to claim 3, characterized in that: The step of generating a second table of 1 to n consecutively ordered codes comprises: A second table of 1 to n consecutively ordered codes is recursively generated using a relational database function.

8. A device for batch coding completion, characterized in that: include: Acquisition module: used to obtain the table that needs to be batch-completed and the number of unique codes n that need to be generated; Processing module: used for processing the table requiring batch completion encoding and the number n of unique encodings requiring generation to generate a first table; A first generating module: used to generate a second table according to the number of unique codes n; A second generating module: used to generate a third table according to the first table and the second table; Coding exclusion module: used for performing coding exclusion on the third table according to the table that needs to complete the coding in batches; Sorting module: used to sort the table after code exclusion and obtain the first n codes after sorting; The third generation module is used to generate a batch completion encoding table according to the sorted first n encodings and the table of encodings that need to be batch completed.

9. An electronic device, characterized in that: include: Processor and memory; The processor is used to execute the batch completion encoding method as described in any one of claims 1 to 7 by calling the program or instruction stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the batch completion encoding method as described in any one of claims 1 to 7.