A database-based partition archiving method and device, storage medium and equipment

By receiving command-line input instructions, extracting target parameters, and determining target partitions and archive files, the problem of inflexible existing database partition archiving methods is solved, achieving automated and efficient partition archiving.

CN115687360BActive Publication Date: 2026-07-03PINGAN YIQIANBAO E COMMERCE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PINGAN YIQIANBAO E COMMERCE CO LTD
Filing Date
2022-11-15
Publication Date
2026-07-03

Smart Images

  • Figure CN115687360B_ABST
    Figure CN115687360B_ABST
Patent Text Reader

Abstract

This application relates to the field of data processing technology, and discloses a database-based partitioned archiving method and apparatus, storage medium, and computer device. The method includes: receiving a command-line input instruction; extracting target parameters from the command-line input instruction, the target parameters including a partition name, a minimum partition time, and a maximum partition time; determining a target partition from multiple partitions in the database based on the target parameters, and determining a target archive file from files to be archived; and storing the target archive file in the target partition. This application allows for specifying partitions for archiving, no longer solely relying on metadata archiving and retention strategies, making archiving more flexible and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a database-based partitioned archiving method and apparatus, storage medium, and computer equipment. Background Technology

[0002] As the amount of data in a table increases, the speed of querying data in the table will slow down, and the performance of the application will degrade. At this time, you should consider partitioning the table. After partitioning, the table is still a complete table logically, but the data in the table is physically stored in multiple tablespaces (physical files). This can greatly improve the speed of data querying.

[0003] Currently, when Oracle databases and other databases automatically archive partitions, they can only archive according to a defined time range. However, in a real production environment, the actual need may be to archive only a portion of the partitions or a single partition. In this case, manual operation is required, or the metadata needs to be adjusted before archiving, which is a cumbersome and inefficient process. Summary of the Invention

[0004] In view of this, this application provides a database-based partitioned archiving method, apparatus, storage medium, and computer device, which can specify partitions for archiving and no longer rely solely on metadata archiving and retention strategies, making the archiving method more flexible and convenient.

[0005] According to one aspect of this application, a database-based partitioned archiving method is provided, comprising:

[0006] Receive command line input instructions and extract target parameters from the command line input instructions. The target parameters include partition name, minimum partition time, and maximum partition time.

[0007] Based on the target parameters, the target partition is determined from multiple partitions of the database, and the target archive file is determined from the files to be archived;

[0008] The target archive file is stored in the target partition.

[0009] According to another aspect of this application, a database-based partitioned archiving apparatus is provided, comprising:

[0010] The instruction receiving module is used to receive command line input instructions and extract target parameters from the command line input instructions. The target parameters include partition name, minimum partition time, and maximum partition time.

[0011] The target partition determination module is used to determine the target partition from multiple partitions of the database based on the target parameters, and to determine the target archive file from the files to be archived;

[0012] A storage module is used to store the target archive file into the target partition.

[0013] According to another aspect of this application, a storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described database-based partitioning and archiving method.

[0014] According to another aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described database-based partitioning and archiving method.

[0015] By employing the above technical solution, this application provides a database-based partitioned archiving method, apparatus, storage medium, and computer device. First, target parameters can be extracted from received command-line input instructions. These target parameters may include the partition name, minimum partition time, and maximum partition time. After determining the target parameters, the target partition can be found from multiple partitions in the database. Furthermore, files whose generation time falls between the minimum and maximum partition times can be selected as target archive files. After determining the target archive file and target partition, the target archive file can be stored in the target partition. This application allows for specifying partitions for archiving, moving beyond reliance solely on metadata archiving retention strategies, thus making archiving more flexible and convenient.

[0016] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 A schematic flowchart of a database-based partitioning and archiving method provided in an embodiment of this application is shown.

[0019] Figure 2 A flowchart illustrating another database-based partitioning and archiving method provided in an embodiment of this application is shown.

[0020] Figure 3 A flowchart illustrating another database-based partitioning and archiving method provided in an embodiment of this application is shown.

[0021] Figure 4 A flowchart illustrating another database-based partitioning and archiving method provided in an embodiment of this application is shown.

[0022] Figure 5 A schematic diagram of a database-based partitioned archiving device provided in an embodiment of this application is shown. Detailed Implementation

[0023] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0024] This embodiment provides a database-based partitioned archiving method, such as... Figure 1 As shown, the method includes:

[0025] Step 101: Receive command line input instructions and extract target parameters from the command line input instructions. The target parameters include partition name, minimum partition time, and maximum partition time.

[0026] The database-based partition archiving method provided in this application embodiment can automatically archive any partition, which is simple and convenient. The database can be an Oracle database, etc. When a user selects a partition for archiving, they can do so by calling a command line. First, the user can input target parameters such as the partition name, minimum partition time, and maximum partition time into the command line, generating a command line input command. Then, the execution entity of this application can extract the target parameters from the command line input command. The partition name can be a unique identifier for each partition, such as "SYS_P5015". The minimum and maximum partition times can be input in the form of year, month, and day, such as "20210415" and "20210515", where the first four digits represent the year, the fifth and sixth digits represent the month, and the seventh and eighth digits represent the day.

[0027] Step 102: Based on the target parameters, determine the target partition from multiple partitions of the database, and determine the target archive file from the files to be archived;

[0028] In this embodiment, after determining the target parameters, the target partition can be found from multiple partitions in the database based on the target parameters. For example, the target partition can be found from multiple partitions in the database based on the partition name, and the partition time corresponding to the target partition can be determined. Then, the found target partition can be further verified using the minimum partition time and the maximum partition time. If the minimum partition time and the maximum partition time are consistent with the partition time corresponding to the target partition, it indicates that the target partition is indeed the target partition that the user wants to archive separately. This embodiment of the application can perform a secondary verification of the target partition determination using the minimum partition time and the maximum partition time, thereby improving the accuracy of the target partition determination. Subsequently, files whose generation time is between the minimum partition time and the maximum partition time can also be found from the files to be archived based on the target parameters as target archive files. Specifically, the files to be archived can be tables to be archived.

[0029] Step 103: Store the target archive file in the target partition.

[0030] In this embodiment, after determining the target archive file and the target partition, the target archive file can be stored in the target partition.

[0031] By applying the technical solution of this embodiment, firstly, target parameters can be extracted from the received command line input instructions. Here, target parameters may include partition name, minimum partition time, and maximum partition time. After determining the target parameters, the target partition can be found from multiple partitions in the database based on the target parameters. Furthermore, files whose generation time falls between the minimum and maximum partition times can be selected as target archive files from the files to be archived. After determining the target archive file and the target partition, the target archive file can be stored in the target partition. This application allows for specifying partitions for archiving, rather than solely relying on metadata archiving and retention strategies, making the archiving method more flexible and convenient.

[0032] Furthermore, as a refinement and extension of the specific implementation methods of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, another database-based partitioning and archiving method is provided, such as... Figure 2 As shown, the method includes:

[0033] Step 201: Receive command line input instructions;

[0034] In this embodiment, firstly, the user can generate command-line input instructions by entering target parameters such as partition name, minimum partition time, and maximum partition time in the command line. Then, the entity executing this application can receive these command-line input instructions.

[0035] Step 202: Determine the parent process of the process corresponding to the command line input instruction, and determine whether the parent process belongs to a preset process list;

[0036] In this embodiment, after receiving a command-line input instruction, the corresponding parent process can be determined based on the process corresponding to the command-line input instruction. Specifically, the PID (Process Identifier) ​​of the process corresponding to the command-line input instruction can be determined. Each created process corresponds to a PID, which is a unique identifier for the process. After determining the PID of the process corresponding to the command-line input instruction, the PPID (Parent Process Identifier) ​​corresponding to that PID can be determined. After determining the PPID, the parent process of the process corresponding to the command-line input instruction can be determined. Then, it can be further determined whether the parent process belongs to a preset process list. Here, the preset process list can store preset parent process identifiers. The preset parent process identifiers included in the preset process list are the parent process identifiers that can continue to execute the following operations, that is, the parent process identifiers corresponding to the parent processes of verified safe operations.

[0037] Step 203: When the parent process does not belong to the preset process list, terminate the process corresponding to the command line input instruction;

[0038] In this embodiment, if the parent process is not found in the preset process list, it indicates that the parent process of the process corresponding to the command-line input command is likely a process created by malicious software. This means that unauthorized personnel may be attempting to modify the database's partitioning and archiving logic via command-line input. In this case, for database security, the process corresponding to the command-line input command can be terminated. Subsequently, the parent process identifier of the parent process of the process corresponding to the command-line input command can be sent to the monitoring platform. The platform staff can then determine whether the parent process was created by malicious software. If not, the parent process identifier can be added to the preset process list. This embodiment of the application, by using a preset process list to determine whether the parent process of the process corresponding to the command-line input command is created by malicious software, can effectively prevent unauthorized users from modifying the database's archiving logic, thus contributing to database security.

[0039] Step 204: When the parent process belongs to the preset process list, extract the target parameters from the command line input instructions. The target parameters include the partition name, the minimum partition time, and the maximum partition time.

[0040] In this embodiment, if the parent process is found to be in the preset process list, it means that the parent process of the process corresponding to the command line input instruction is safe. At this time, the target parameters can be extracted from the command line input instruction. The partition name can be a unique identifier for each partition, such as "SYS_P5015". The minimum and maximum partition times can be entered in the form of year, month, and day, such as "20210415" or "20210515". The first four digits represent the year, the fifth and sixth digits represent the month, and the seventh and eighth digits represent the day.

[0041] Step 205: Based on the target parameters, determine the target partition from multiple partitions of the database, and determine the target archive file from the files to be archived;

[0042] In this embodiment, after determining the target parameters, the target partition can be found from multiple partitions in the database based on the target parameters. For example, the target partition can be found from multiple partitions in the database based on the partition name, and the partition time corresponding to the target partition can be determined. Then, the found target partition can be further verified using the minimum partition time and the maximum partition time. If the minimum partition time and the maximum partition time are consistent with the partition time corresponding to the target partition, it indicates that the target partition is indeed the target partition that the user wants to archive separately. This embodiment of the application can perform a secondary verification of the target partition determination using the minimum partition time and the maximum partition time, thereby improving the accuracy of the target partition determination. Subsequently, files whose generation time is between the minimum partition time and the maximum partition time can also be found from the files to be archived based on the target parameters as target archive files. Specifically, the files to be archived can be tables to be archived.

[0043] Step 206: Store the target archive file in the target partition.

[0044] In this embodiment, after determining the target archive file and the target partition, the target archive file can be stored in the target partition.

[0045] Furthermore, as a refinement and extension of the specific implementation methods of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, another database-based partitioning and archiving method is provided, such as... Figure 3 As shown, the method includes:

[0046] Step 301: Receive command line input instructions and extract target parameters from the command line input instructions. The target parameters include partition name, minimum partition time, and maximum partition time.

[0047] In this embodiment, firstly, the user can generate command-line input instructions by entering target parameters such as partition name, minimum partition time, and maximum partition time in the command line. Then, the executable entity of this application can extract the target parameters from the command-line input instructions.

[0048] Step 302: Obtain the preset partitioning rules from the configuration file of the database, and perform validity verification on the target parameters according to the preset partitioning rules;

[0049] In this embodiment, the preset partitioning rules can then be retrieved from the database configuration file to further determine whether the target parameter meets the preset partitioning rules. If it does, the validity check passes, meaning the target parameter entered by the user via the command line is valid and can be recognized. Otherwise, the validity check fails, and a verification failure message can be output. The verification failure message can be implemented through voice prompts, text prompts, or other methods.

[0050] Step 303: When the validity check passes, based on the target parameters, determine the target partition from multiple partitions of the database, and determine the target archive file from the files to be archived;

[0051] In this embodiment, if the validity check passes, the target partition can be found from multiple partitions in the database based on the target parameters. Then, files whose generation time falls between the minimum and maximum time of the partition can be selected as target archive files from the files to be archived, based on the target parameters.

[0052] Step 304: Store the target archive file in the target partition.

[0053] In this embodiment, after determining the target archive file and the target partition, the target archive file can be stored in the target partition.

[0054] Optionally, in this embodiment of the application, the step 302 of "performing validity verification of the target parameter according to the preset partitioning rule" includes: calculating the time difference between the maximum partition time and the minimum partition time in the target parameter, and determining whether the time difference satisfies the preset difference in the preset partitioning rule based on the preset partitioning rule, and determining that the validity verification is passed when it is satisfied.

[0055] In this embodiment, the specific steps for validating the target parameters using preset partitioning rules are as follows: First, the time difference is obtained by subtracting the minimum partition time from the maximum partition time in the target parameters. Next, a preset difference is determined from the preset partitioning rules, and then the relationship between the calculated time difference and the preset difference is judged. If the time difference is equal to the preset difference, the validity check passes; if the time difference is not equal to the preset difference, the validity check fails. That is, if the time difference between the maximum and minimum partition times is equal to the preset difference in the preset partitioning rules, the time difference satisfies the preset difference in the preset partitioning rules. For example, if the preset partitioning rules indicate that each partition corresponds to one month (i.e., the preset difference is one month), and the calculated time difference is also one month, then the validity check passes. However, if the calculated time difference is 45 days, then the validity check fails. This embodiment improves the validity verification of target parameters by comparing the time difference between the maximum and minimum partition times with the preset difference, avoiding archiving errors caused by human input errors.

[0056] Furthermore, as a refinement and extension of the specific implementation methods of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, another database-based partitioning and archiving method is provided, such as... Figure 4 As shown, the method includes:

[0057] Step 401: In response to the command line call instruction, output the permission verification interface;

[0058] In this embodiment, when the target user invokes the command line, a corresponding command line invocation instruction can be generated. Then, in response to this command line invocation instruction, a permission verification interface can be output. Specifically, the permission verification interface can display a user account name input box; the permission verification interface can also verify the target user's permissions through other methods, which are not limited here.

[0059] Step 402: Extract target user information from the permission verification interface, and based on the target user information, determine whether the target user indicated by the target user information has command line call permission for the database;

[0060] In this embodiment, after the permission verification interface is displayed, the target user can fill in user information on the interface. Then, the target user information can be extracted from the interface, and it can be determined whether the target user has command-line access permissions to the database. Specifically, a target user identifier can be extracted from the target user information. This identifier can be a unique identifier for the target user. The identifier is checked against a preset list of user identifiers; if it is, the target user has command-line access permissions. Here, the target user identifier can be a user account name, such as a mobile phone number or employee ID. This embodiment, by determining whether the target user has command-line access permissions before invoking the database, and allowing access only when permissions are granted, effectively reduces unauthorized modifications to the database's partitioning and archiving logic, thus improving the security of partitioning and archiving.

[0061] Step 403: When the target user has the command line call permission, receive the command line input instruction, and extract the target parameters from the command line input instruction. The target parameters include the partition name, the minimum partition time, and the maximum partition time.

[0062] In this embodiment, if the target user has command-line access permission to the database, then they can receive command-line input instructions and extract the target parameters from the command-line input instructions.

[0063] Step 404: Based on the target parameters, determine the target partition from multiple partitions of the database, and determine the target archive file from the files to be archived;

[0064] In this embodiment, the target partition can be found from multiple partitions of the database based on the target parameters. Then, files whose generation time falls between the minimum and maximum time of the partition can be selected as target archive files from the files to be archived, based on the target parameters.

[0065] Step 405: Store the target archive file in the target partition;

[0066] In this embodiment, after determining the target archive file and the target partition, the target archive file can be stored in the target partition.

[0067] Step 406: When storage fails, output a storage failure message, which includes the reason for the storage failure.

[0068] In this embodiment, if storage fails, a storage failure message can be output, which can be either voice or text. Regardless of the output method, the reason for the storage failure can be inserted into the message, such as insufficient target partition space or communication abnormality. This allows the target user to quickly understand the reason for the storage failure, reducing the time spent troubleshooting.

[0069] Optionally, in this embodiment of the application, the method further includes: when the target partition does not exist among the multiple partitions of the database, outputting a partition creation query window; extracting feedback information from the partition creation query window; and when the feedback information indicates that a partition should be created, creating the target partition based on the target parameters.

[0070] In this embodiment, if a search based on the target parameters reveals that no matching target partition exists among multiple partitions in the database, a partition creation query window can be output to prompt the target user whether to create a new partition. Specifically, the partition creation query window can prompt "Do you need to create a new partition?" with corresponding "Yes □" or "No □" options. Next, feedback information entered by the target user can be extracted from the partition creation query window. If the extracted feedback indicates that the target user needs to create a partition, then the corresponding target partition can be created directly based on the target parameters; if the extracted feedback indicates that the target user does not need to create a partition, then the operation can be terminated. This embodiment allows the user to determine whether to create the corresponding partition when the target partition corresponding to the target parameters does not exist in the database partitions, making it simple and convenient.

[0071] Furthermore, as Figure 1 In terms of specific implementation, this application provides a database-based partitioning and archiving device, such as... Figure 5 As shown, the device includes:

[0072] The instruction receiving module is used to receive command line input instructions and extract target parameters from the command line input instructions. The target parameters include partition name, minimum partition time, and maximum partition time.

[0073] The target partition determination module is used to determine the target partition from multiple partitions of the database based on the target parameters, and to determine the target archive file from the files to be archived;

[0074] A storage module is used to store the target archive file into the target partition.

[0075] Optionally, the device further includes:

[0076] The verification module is used to extract the target parameters from the command line input instructions, obtain the preset partitioning rules from the database configuration file, and verify the validity of the target parameters according to the preset partitioning rules.

[0077] The target partition determination module is further configured to, when the validity check passes, execute the step of determining the target partition from multiple partitions of the database based on the target parameters.

[0078] Optionally, the verification module is used for:

[0079] Calculate the time difference between the maximum time and the minimum time of the partition in the target parameters, and determine whether the time difference meets the preset difference in the preset partition rules based on the preset partition rules. If it does, the validity check is determined to be passed.

[0080] Optionally, the device further includes:

[0081] The interface output module is used to output an authorization verification interface in response to the command line call command before receiving the command line input command;

[0082] The permission determination module is used to extract target user information from the permission verification interface, and based on the target user information, determine whether the target user indicated by the target user information has command line call permission for the database.

[0083] Optionally, the device further includes:

[0084] The window output module is used to output a partition creation query window when the target partition does not exist in multiple partitions of the database.

[0085] The information extraction module is used to extract feedback information from the partition creation query window;

[0086] The partition creation module is used to create the target partition based on the target parameters when the feedback information indicates that a partition should be created.

[0087] Optionally, the device further includes:

[0088] The parent process determination module is used to determine the parent process of the process corresponding to the command line input instruction after receiving the command line input instruction, and to determine whether the parent process belongs to a preset process list.

[0089] The instruction receiving module is further configured to perform the step of extracting the target parameter from the command line input instruction when the parent process belongs to the preset process list;

[0090] The process termination module is used to terminate the process corresponding to the command line input instruction when the parent process does not belong to the preset process list.

[0091] Optionally, the device further includes:

[0092] The prompt output module is used to output a storage failure prompt when the storage fails after the target archive file is stored in the target partition. The storage failure prompt includes the reason for the storage failure.

[0093] It should be noted that other corresponding descriptions of the functional units involved in the database-based partitioned archiving device provided in this application embodiment can be found by referring to... Figures 1 to 4 The corresponding descriptions in the method will not be repeated here.

[0094] Based on the above, Figures 1 to 4 Accordingly, this application also provides a storage medium storing a computer program, which, when executed by a processor, implements the above-described method. Figures 1 to 4 The database-based partitioned archiving method is shown.

[0095] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.

[0096] Based on the above, Figures 1 to 4 The method shown, and Figure 5 To achieve the above objectives, the present application also provides a computer device, specifically a personal computer, server, network device, etc., as shown in the virtual device embodiment. This computer device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to achieve the above-described objectives. Figures 1 to 4 The database-based partitioned archiving method is shown.

[0097] Optionally, the computer device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, Wi-Fi interfaces), etc.

[0098] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or combine certain components, or have different component arrangements.

[0099] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and stores the hardware and software resources of a computer device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software within the physical device.

[0100] Through the above description of the implementation methods, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented using hardware. First, target parameters can be extracted from the received command-line input instructions. Here, target parameters may include the partition name, the minimum partition time, and the maximum partition time. After determining the target parameters, the target partition can be found from multiple partitions in the database based on the target parameters. Furthermore, files whose generation time falls between the minimum and maximum partition times can be selected as target archive files from the files to be archived. After determining the target archive file and the target partition, the target archive file can be stored in the target partition. This application allows for specifying partitions for archiving, no longer solely relying on metadata archiving and retention strategies, making the archiving method more flexible and convenient.

[0101] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.

[0102] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A database-based partitioned archiving method, characterized in that, include: Receive command line input instructions and extract target parameters from the command line input instructions. The target parameters include partition name, minimum partition time, and maximum partition time. Based on the partition name, the target partition is found from multiple partitions in the database, and the partition time corresponding to the target partition is determined. The minimum partition time and the maximum partition time are used to further verify the found target partition. If the minimum partition time and the maximum partition time are consistent with the partition time corresponding to the target partition, then the archived files whose generation time is between the minimum partition time and the maximum partition time are found from the archived files according to the target parameters and used as the target archived files. Store the target archive file in the target partition; After extracting the target parameters from the command line input instructions, the method further includes: Obtain preset partitioning rules from the configuration file of the database, calculate the time difference between the maximum time of the partition and the minimum time of the partition in the target parameters, and determine whether the time difference satisfies the preset difference in the preset partitioning rules based on the preset partitioning rules. If it does, determine that the validity check has passed. When the validity check passes, the target partition is determined from multiple partitions of the database based on the target parameters; The method further includes: When the target partition does not exist in any of the multiple partitions of the database, a partition creation query window is output. Extract the feedback information from the partition creation query window; When the feedback information indicates that a partition should be created, the target partition is created based on the target parameters; After receiving the command line input instruction, the method further includes: Determine the parent process of the process corresponding to the command line input instruction, and determine whether the parent process belongs to a preset process list; When the parent process belongs to the preset process list, the step of extracting the target parameter from the command line input instruction is executed; When the parent process is not in the preset process list, the process corresponding to the command line input instruction is terminated.

2. The method according to claim 1, characterized in that, Before receiving command-line input instructions, the method further includes: In response to command-line invocation, output the permission verification interface; Extract target user information from the permission verification interface, and based on the target user information, determine whether the target user indicated by the target user information has command line call permission for the database.

3. The method according to claim 1, characterized in that, After storing the target archive file in the target partition, the method further includes: When storage fails, a storage failure message is output, which includes the reason for the storage failure.

4. A database-based partitioned archiving device, characterized in that, include: The instruction receiving module is used to receive command line input instructions and extract target parameters from the command line input instructions. The target parameters include partition name, minimum partition time, and maximum partition time. The target partition determination module is used to find the target partition from multiple partitions in the database according to the partition name, and determine the partition time corresponding to the target partition. The found target partition is further verified using the minimum partition time and the maximum partition time. If the minimum partition time and the maximum partition time are consistent with the partition time corresponding to the target partition, then the archived files whose generation time is between the minimum partition time and the maximum partition time are found from the archived files according to the target parameters and used as the target archived files. A storage module is used to store the target archive file into the target partition; The device further includes: The verification module is used to extract target parameters from the command line input instructions, obtain preset partitioning rules from the configuration file of the database, calculate the time difference between the maximum time of the partition and the minimum time of the partition in the target parameters, and determine whether the time difference meets the preset difference in the preset partitioning rules based on the preset partitioning rules. When it meets the preset difference, the validity verification is determined to be successful. The target partition determination module is further configured to determine the target partition from multiple partitions of the database based on the target parameters when the validity check passes. The device further includes: The window output module is used to output a partition creation query window when the target partition does not exist in multiple partitions of the database. The information extraction module is used to extract feedback information from the partition creation query window; A partition creation module is used to create the target partition based on the target parameters when the feedback information indicates that a partition should be created. The device further includes: The parent process determination module is used to determine the parent process of the process corresponding to the command line input instruction after receiving the command line input instruction, and to determine whether the parent process belongs to a preset process list. The instruction receiving module is further configured to perform the step of extracting the target parameter from the command line input instruction when the parent process belongs to the preset process list; The process termination module is used to terminate the process corresponding to the command line input instruction when the parent process does not belong to the preset process list.

5. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 3.

6. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 3.