Execution statement processing method and device, equipment and medium

By obtaining the statement to be executed in the database and judging its security level, and updating the delete statement to a rename statement, the problem of accidentally deleting the protected object is solved and data security is improved.

CN120067131APending Publication Date: 2025-05-30THE BANK OF CHONGQING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510131622.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the database of the financial industry, important data will often be deleted by human negligence, resulting in the loss of key data and affecting the security of the database.

Method used

By obtaining the statement to be executed, determine its statement type and execution object, and judge the security level of the execution object based on the preset security table. If the statement type is a preset delete type and the execution object is a protected object, the statement to be executed is updated to generate an update statement to avoid dangerous deletion operations.

Benefits of technology

It effectively prevents the risk of accidentally deleting objects to protect, improves data security, and ensures the integrity of important data in the database.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067131A_ABST
    Figure CN120067131A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an execution statement processing method and device, equipment and a medium, and the method comprises the steps that a to-be-executed statement is obtained, and fields of the to-be-executed statement comprise statement types and execution objects; determining a statement type and an execution object of the to-be-executed statement according to the field of the to-be-executed statement; according to a preset security table, the security level of the execution object is determined, the preset security table comprises the security level corresponding to the execution object, and the security level represents whether the execution object is a protection object; and if the statement type is a preset deletion type, performing statement updating on the to-be-executed statement according to the security level to generate an updated statement. According to the technical scheme provided by the invention, mistaken deletion of the protected object can be avoided, and the data security is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method, device, equipment and medium for processing execution statements. Background Art

[0002] In the financial industry, the preservation of database data is of great importance. Banks process a huge amount of transactions every day, involving sensitive information such as customer deposits, loans and transfers. The database ensures the accurate and secure storage of this data, facilitating real-time querying and analysis, and guaranteeing the smooth operation of business. It supports key operations such as risk assessment and credit approval in banks, is the cornerstone of the stable operation and compliance supervision of banks, and has far-reaching significance for maintaining financial stability and improving service quality.

[0003] However, due to human negligence, some important data is often accidentally deleted, which in turn leads to the loss of key data and affects the security of the database. Summary of the Invention

[0004] Embodiments of the present invention provide a method, device, equipment and medium for processing execution statements. Through the technical solutions of the embodiments of the present invention, the protected objects in the database can be effectively protected against accidental deletion.

[0005] In a first aspect, embodiments of the present invention provide a method for processing execution statements, including:

[0006] Obtain a to-be-executed statement, where the fields of the to-be-executed statement include a statement type and an execution object;

[0007] Determine the statement type and execution object of the to-be-executed statement according to the fields of the to-be-executed statement;

[0008] Determine the security level of the execution object according to a preset security table, where the preset security table includes the security level corresponding to the execution object, and the security level indicates whether the execution object is a protected object;

[0009] If the statement type is a preset deletion type, update the to-be-executed statement according to the security level to generate an updated statement.

[0010] In a second aspect, embodiments of the present invention provide a device for processing execution statements, including:

[0011] An obtaining module, configured to obtain a to-be-executed statement, where the fields of the to-be-executed statement include a statement type and an execution object;

[0012] An analysis module, configured to determine the statement type and execution object of the to-be-executed statement according to the fields of the to-be-executed statement;

[0013] A judgment module, configured to determine the security level of the execution object according to a preset security table, where the preset security table includes the security level corresponding to the execution object, and the security level indicates whether the execution object is a protected object;

[0014] An update module, configured to, if the statement type is a preset deletion type, update the to-be-executed statement according to the security level to generate an updated statement.

[0015] In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes:

[0016] At least one processor; and,

[0017] A memory communicatively connected to the at least one processor; where

[0018] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the processing method of the execution statement according to any one of the embodiments of the present invention.

[0019] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the processing method of the execution statement according to any one of the embodiments of the present invention is implemented.

[0020] An embodiment of the present invention provides a method, device, equipment and medium for processing an execution statement. The method includes: obtaining a to-be-executed statement, where the fields of the to-be-executed statement include a statement type and an execution object; determining the statement type and the execution object of the to-be-executed statement according to the fields of the to-be-executed statement; determining the security level of the execution object according to a preset security table, where the preset security table includes the security level corresponding to the execution object, and the security level indicates whether the execution object is a protected object; if the statement type is a preset deletion type, updating the to-be-executed statement according to the security level to generate an updated statement. Specifically, if the statement type of the to-be-executed statement is a preset deletion type, the to-be-executed statement can be updated according to the security level to generate an updated statement. In this way, dangerous deletion statements can be avoided, and updated statements can be executed, avoiding the accidental deletion of protected objects and improving data security. Description of the Drawings

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0022] Figure 1 It is a flowchart of a method for processing execution statements provided in Embodiment 1 of the present invention;

[0023] Figure 2 It is a flowchart of a method for processing execution statements provided in Embodiment 2 of the present invention;

[0024] Figure 3 It is a schematic diagram of preventing accidental deletion provided in the embodiments of the present invention;

[0025] Figure 4 It is a schematic diagram of a rename operation provided in the embodiments of the present invention;

[0026] Figure 5 It is a schematic diagram of data recovery provided in the embodiments of the present invention;

[0027] Figure 6 It is a schematic structural diagram of a device for processing execution statements provided in Embodiment 3 of the present invention;

[0028] Figure 7 It is a schematic structural diagram of an electronic device provided in Embodiment 4 of the present invention. Detailed implementation manners

[0029] In order to enable those skilled in the art of the present technology to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0030] It should be noted that in the description and claims of the present invention and the above-mentioned drawings, the terms "first", "second", etc. are used to distinguish similar objects and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0031] It should be noted that in the technical solutions of the present disclosure, the processing of the user's personal information, such as collection, storage, use, processing, transmission, provision, and disclosure, all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0032] Embodiment 1

[0033] Figure 1 FIG. 10 is a flowchart of a method for processing execution statements provided in Embodiment 1 of the present invention. This method can be applied to avoid executing deletion-type execution statements and avoid the situation of accidentally deleting protected objects. This method can be executed by a processing device for execution statements. This device can be composed of software and / or hardware and is configured in a computer or a server.

[0034] As Figure 1 shown, it includes:

[0035] Step 110: Obtain the statement to be executed. Among them, the fields of the statement to be executed include the statement type and the execution object.

[0036] Among them, the statement to be executed is the code statement sent by the user to perform a target operation. The fields of the statement to be executed include the statement type and the execution object. Among them, the statement type represents the operation type corresponding to the statement to be executed, such as operations such as adding, deleting, querying, and modifying a database. The execution object is the database object targeted by the statement to be executed, such as a data table in the database. Exemplarily, the statement to be executed can be an SQL statement.

[0037] Step 120: Determine the statement type and the execution object of the statement to be executed according to the fields of the statement to be executed.

[0038] Specifically, since the statement to be executed can be a code statement, it has a specific writing format. For example, the statement to be executed includes a type field indicating the statement type. For example, in the statement to be executed of the deletion type, there is a "drop" or "delate" field. Further, according to the writing format of the "delate" operation, there is a field indicating the execution object following the "delate" field. For example, "delate A" indicates deleting data A.

[0039] Step 130: Determine the security level of the execution object according to a preset security table, where the preset security table includes the security level corresponding to the execution object, and the security level indicates whether the execution object is a protected object.

[0040] Among them, the preset security table includes the security level corresponding to the execution object, and the security level indicates whether the execution object is a protected object. Further, the preset security table can be customized by the user according to the importance of the execution object in the database. The security level can also include the protected time of the execution object. For example, for important documents, the preset protection time can be permanent, and for ordinary documents, the preset protection time can be one week.

[0041] Specifically, if the security level of the protected object indicates that the execution object is a protected object, it should be protected to avoid accidental deletion. For the specific method of avoiding accidental deletion, see the following content.

[0042] Step 140: If the statement type is a preset deletion type, update the statement to be executed according to the security level to generate an updated statement.

[0043] Among them, the preset deletion type indicates the statement type of various deletion operations, such as "delate" or "drop", etc.

[0044] Specifically, if the statement type of the statement to be executed is a preset deletion type, it is necessary to determine whether the execution object should be a protected object according to the security level. If it is a protected object, the statement to be executed should be avoided from being executed to achieve the purpose of avoiding accidental deletion. Specifically, the updated statement can be generated corresponding to the statement to be executed, and the code of the statement to be executed can be modified to the updated statement so that the updated statement received by the database does not contain the deletion operation for the protected object.

[0045] Optionally, after generating the updated statement, it further includes:

[0046] Generate a response indicating successful deletion to the sender of the statement to be executed.

[0047] Specifically, by generating a response indicating successful deletion, the sender can be made to think that the execution object has been deleted, simulating a phenomenon of "pseudo-deletion" to avoid the sender from repeatedly executing the deletion operation.

[0048] An embodiment of the present invention provides a method for processing an execution statement. The method includes: obtaining an execution statement to be executed, where the fields of the execution statement to be executed include a statement type and an execution object; determining the statement type and the execution object of the execution statement to be executed according to the fields of the execution statement to be executed; determining the security level of the execution object according to a preset security table, where the preset security table includes the security level corresponding to the execution object, and the security level indicates whether the execution object is a protected object; if the statement type is a preset deletion type, then update the execution statement according to the security level to generate an updated statement. Specifically, if the execution object is a protected object and the execution statement to be executed represents a deletion operation on the execution object, the execution statement to be executed can be modified into an updated statement, and then the updated statement is executed instead of the deletion statement, so as to avoid accidentally deleting the protected object and improve the security of data.

[0049] Embodiment Two

[0050] Figure 2 The flowchart of a method for processing an execution statement provided by Embodiment Two of the present invention. This embodiment further refines the steps based on the above embodiments and can be applied to each of the above embodiments.

[0051] As Figure 2 shown, it includes:

[0052] Step 210: Obtain an execution statement to be executed, where the fields of the execution statement to be executed include a statement type and an execution object.

[0053] Step 220: Match the fields of the execution statement to be executed with preset statement fields, and determine the statement type of the execution statement to be executed according to the result of the field matching.

[0054] Among them, the preset statement fields include field contents representing various execution actions. Specifically, due to the particularity of programming code, the field contents representing different execution actions have specific writing formats in different execution statements. For example, for a deletion operation, in each execution statement to be executed, it contains "delate" or "drop".

[0055] Therefore, based on the above content, a field library containing field contents representing various execution actions can be generated, and then the fields of the execution statement to be executed are matched with the preset statement fields in the field library, and the statement type of the code is determined according to the result of the field matching. Exemplarily, if the result of the field matching indicates that the fields of the execution statement to be executed include the "delate" field, it indicates that the statement type of the execution statement to be executed is a deletion type.

[0056] Step 230: Generate a corresponding statement tree according to the fields of the to-be-executed statement, where the node path of the statement tree represents the execution process of the execution object.

[0057] Step 240: Determine the leaf nodes of the statement tree as the execution objects of the to-be-executed statement.

[0058] Among them, each node of the statement tree of the to-be-executed statement is generated by each field of the to-be-executed statement. At the same time, the node path of the statement tree represents the execution process of the execution object. For example, starting from the root node to the leaf node, each step required for the execution process of the execution object can be determined. Further, the leaf nodes of the statement tree are determined as the execution objects of the to-be-executed statement. It should be noted that there is no limitation on the generation method of the statement tree here.

[0059] Exemplarily, for the parsing of the to-be-executed statement, the capabilities of natural language translation, annotation information capture, and raw data sampling analysis can be combined to achieve accurate identification of table names and field names in the to-be-executed statement. Further, the parsing of the to-be-executed statement may include the following steps:

[0060] Lexical analysis: Decompose the input SQL statement into a series of tokens, which can be keywords, identifiers, constants, operators, etc., and check the legality of the tokens. For example, check whether a reserved word is used as an identifier or whether there are spelling mistakes.

[0061] Syntax analysis: According to the syntax rules of the SQL language, organize the lexical units into a nested syntax tree structure. This process usually uses a bottom-up or top-down parsing algorithm to ensure that the SQL statement conforms to the SQL syntax rules, such as checking whether a keyword is missing or whether parentheses are used correctly.

[0062] Semantic analysis: Verify whether the data types in the SQL statement match. For example, ensure that the operand types are consistent in arithmetic operations, resolve the identifiers (such as table names and column names) in the SQL statement into actual objects in the database, and check whether these objects exist.

[0063] Step 250: If the statement type is a preset deletion type and the security level indicates that the execution object is a protected object, modify the field corresponding to the statement type of the to-be-executed statement to a field representing a rename operation to generate a rename statement.

[0064] Optionally, the update operation on the to-be-executed statement includes an operation of renaming the statement type of the to-be-executed statement.

[0065] Specifically, if the statement type is a preset deletion type, it indicates that the statement to be executed is a deletion operation. At the same time, if the security level of the execution object indicates that the execution object is a protected object, it means that the operation content of the statement to be executed is to delete the protected object. Therefore, to avoid accidental deletion, the statement to be executed can be updated. Specifically, the field corresponding to the statement type of the statement to be executed is modified to a field representing a rename operation, such as modifying the "delate" field to the "rename" field. So that the operation content of the statement to be executed is modified to rename the protected object.

[0066] Step 260: Obtain a preset backup statement template, fill the backup statement template according to the execution object, and generate a backup statement, where the backup statement template includes a target address.

[0067] Optionally, the update operation on the statement to be executed includes an operation of backing up and storing the execution object of the statement to be executed.

[0068] Specifically, the backup statement template can be a preset code template, including a name field to be filled and a target address. Specifically, if the name of the execution object is filled into the backup statement template, a code statement for backing up the execution object to the target address will be generated.

[0069] In this way, the protected object can be safely backed up to ensure security. Further, even if an accidental deletion operation occurs, the data can be restored through the backed-up execution object, ensuring the security of the data.

[0070] Step 270: Determine an update statement according to the rename statement and the backup statement.

[0071] Optionally, after step 270, it further includes:

[0072] Execute the update statement to back up the execution object in the database to the target address and rename the initial name of the execution object in the database to a preset name, where the preset name is an associated name of the initial name of the execution object.

[0073] Specifically, through the backup statement of the update statement, the execution object can be backed up to the target address. At the same time, to facilitate the annotation of the renamed file or data, the preset name can be an associated name of the initial name, and its association can be that the fields of the preset name include the initial name. Exemplarily, if the initial name is A, the preset name can be A', or it can also be A_rename.

[0074] Optionally, the security level includes the protected time of the execution object;

[0075] Execute the update statement to back up the execution object in the database to the target address, including:

[0076] Determine the storage time of the execution object according to the protected time of the execution object, and add the storage time to the update statement, where the storage time is used to represent the storage duration of the execution object in the storage area corresponding to the target address.

[0077] Specifically, data or files with different security levels have different protection times. For example, a certain file is a protected file within 1 month. After one month, it has passed the protection period and becomes an unprotected file. Therefore, the storage time can be set according to the protected time of the execution object to represent the storage duration of the execution object in the storage area corresponding to the target address. If the storage time is exceeded, there is no need to store it in the storage area anymore, and it can be transferred or deleted to save storage space.

[0078] Execute the update statement to back up the execution object in the database to the storage area corresponding to the target address.

[0079] Exemplarily, by setting the protected time, determine the protection effective time point and the maintenance time. Monitor the access and operation behaviors of the existing database in real time, analyze the relevant execution statements, and record them in real time; when sensitive data is accidentally deleted using the DROP command, the system should promptly record information such as the operation time, database name, operation type, object type of the operation, SCHEMA name, object name, current status, and the SQL statement used, and provide a one-key recovery function to assist in quickly recovering the data to support the system to return to normal.

[0080] Optionally, if a recovery command for the execution object is received, obtain the execution log corresponding to the execution object, where the execution log includes the initial name, preset name, and the target address of the execution object.

[0081] Restore the execution object at the target address to the database according to the execution log, or rename the execution object with the preset name in the database to the initial name according to the execution log.

[0082] Specifically, the execution log is the log generated when the statement to be executed is executed, which can record the initial name, preset name, and backup target address of the execution object. If a statement to be executed for a protected object is received, the above-mentioned backup operation and renaming operation will be triggered. Therefore, it is necessary to restore the files in the database to restore the database to its original state. Among them, the restore command is the restoration command for the protected object that has been renamed and backed up. Further, according to the content recorded in the execution log, the execution object at the target address can be restored to the database, or, according to the execution log, the execution object with the preset name in the database can be renamed to the initial name.

[0083] Exemplarily, it can be overall displayed through a visual interface, such as displaying the operation time, operation object, operator identity, operator address, and executed statement situation of the statement to be executed. Through the information of the visual interface, it can assist the user in judging whether to perform a restoration operation.

[0084] Exemplarily, Figure 3 FIG. is a schematic diagram of preventing accidental deletion provided by an embodiment of the present invention. Among them, when the GATEWAY gateway receives a deletion statement for the execution object A from the operation and maintenance client, it will determine the security level of the A table according to the data type and sensitivity level of the A table. Further, if A is a protected object, the deletion statement will be updated to a renaming statement. Further, after executing the renaming statement, the database will return a successful execution response to the gateway, and the gateway will return a successful execution response to the client. Further, due to the decisiveness of the drop statement, it is almost impossible to perform data recovery by rolling back the transaction log. Therefore, it is necessary to adopt a trash can mechanism to back up the deleted data table and retain it for a period of time instead of completely deleting it. When recovery is needed, one-key recovery can be performed from the backup space. Exemplarily, Figure 4 FIG. is a schematic diagram of the renaming operation provided by an embodiment of the present invention. Specifically, when an operation to delete table A from the database is performed, the statement will be rewritten, and the instruction to delete table A will be modified to rename A. At this time, table A no longer exists for the business, thus achieving the effect of "fake deletion". Exemplarily, Figure 5 FIG. is a schematic diagram of data recovery provided by an embodiment of the present invention. Specifically, after logging in to the recovery page, the table A that needs to be recovered can be determined according to the execution log, and then a renaming instruction for table A can be issued to restore the name of table A from A' to A.

[0085] An embodiment of the present invention provides a method for processing execution statements. Through this method, when a deletion statement for a protected object is obtained, the protected object can be renamed and backed up to avoid accidental deletion and improve data security.

[0086] Embodiment III

[0087] Figure 6 This is a schematic structural diagram of a processing device for execution statements provided in Embodiment 3 of the present invention. As Figure 6 shown, the device includes:

[0088] An acquisition module 310, configured to acquire a statement to be executed, where the fields of the statement to be executed include a statement type and an execution object;

[0089] An analysis module 320, configured to determine the statement type and the execution object of the statement to be executed according to the fields of the statement to be executed;

[0090] A judgment module 330, configured to determine the security level of the execution object according to a preset security table, where the preset security table includes the security level corresponding to the execution object, and the security level represents whether the execution object is a protected object;

[0091] An update module 340, configured to, if the statement type is a preset deletion type, update the statement to be executed according to the security level to generate an updated statement.

[0092] Embodiment of the present invention provides a processing device for execution statements. The device acquires a statement to be executed, where the fields of the statement to be executed include a statement type and an execution object; determines the statement type and the execution object of the statement to be executed according to the fields of the statement to be executed; determines the security level of the execution object according to a preset security table, where the preset security table includes the security level corresponding to the execution object, and the security level represents whether the execution object is a protected object; if the statement type is a preset deletion type, updates the statement to be executed according to the security level to generate an updated statement. Specifically, if the statement type of the statement to be executed is a preset deletion type, the statement to be executed can be updated according to the security level to generate an updated statement. In this way, dangerous deletion statements can be avoided from being executed, and the updated statement can be executed, avoiding accidental deletion and improving data security.

[0093] Optionally, the analysis module 320 includes:

[0094] A matching unit, configured to match the fields of the statement to be executed with preset statement fields, and determine the statement type of the statement to be executed according to the result of the field matching;

[0095] A statement tree unit, configured to generate a corresponding statement tree according to the fields of the statement to be executed, where the node path of the statement tree represents the execution process of executing the execution object;

[0096] An execution object determination unit, configured to determine the leaf node of the statement tree as the execution object of the statement to be executed.

[0097] Optionally, the determination module 330 includes:

[0098] A renamed statement determination subunit, configured to, if the statement type is a preset deletion type and the security level indicates that the execution object is a protected object, modify the field corresponding to the statement type of the to-be-executed statement to a field representing a renaming operation, and generate a renamed statement.

[0099] A backup subunit, configured to obtain a preset backup statement template, fill the backup statement template according to the execution object, and generate a backup statement, where the backup statement template includes a target address.

[0100] An update statement determination unit, configured to determine an update statement according to the renamed statement and the backup statement.

[0101] Optionally, the determination module 330 further includes:

[0102] An execution unit, configured to execute the update statement to back up the execution object in the database to the target address, and rename the initial name of the execution object in the database to a preset name, where the preset name is an associated name of the initial name of the execution object.

[0103] Optionally, the security level includes the protected time of the execution object; the execution unit includes:

[0104] An addition subunit, configured to determine the storage time of the execution object according to the protected time of the execution object, and add the storage time to the update statement, where the storage time is used to represent the storage duration of the execution object in the storage area corresponding to the target address.

[0105] An execution subunit, configured to execute the update statement to back up the execution object in the database to the storage area corresponding to the target address.

[0106] Optionally, the processing device for execution statements further includes: a recovery module, configured to, if a recovery command for the execution object is received, obtain the execution log corresponding to the execution object, where the execution log includes the initial name, the preset name, and the target address of the execution object.

[0107] Restore the execution object at the target address to the database according to the execution log, or rename the execution object with the preset name in the database to the initial name according to the execution log.

[0108] Optionally, the processing device for execution statements further includes a sending module, configured to generate a response indicating successful deletion to the sending end of the to-be-executed statement.

[0109] The processing device for execution statements provided by the embodiments of the present invention can execute the processing method for execution statements provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0110] Embodiment 4

[0111] Figure 7 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. 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, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0112] As Figure 7 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

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

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

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

[0116] 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 (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), system-on-a-chip systems (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, and the programmable processor can be a special or general programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0117] The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0118] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0119] To provide for 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 a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, the 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 acoustic input, voice input, or tactile input).

[0120] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0121] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on 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 a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0122] It should be understood that various forms of processes shown above can be used, steps can be reordered, added or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

[0123] The above specific embodiments do not constitute a limitation on the protection scope of the present 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 principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for processing an execution statement, characterized in that: include: Obtaining a statement to be executed, wherein the fields of the statement to be executed include a statement type and an execution object; Determine the statement type and execution object of the statement to be executed according to the field of the statement to be executed; Determine the security level of the execution object according to a preset security table, wherein the preset security table includes the security level corresponding to the execution object, and the security level indicates whether the execution object is a protected object; If the statement type is a preset deletion type, the statement to be executed is updated according to the security level to generate an update statement.

2. The method according to claim 1, characterized in that The step of determining the statement type and execution object of the statement to be executed according to the field of the statement to be executed includes: Performing field matching on the field of the statement to be executed and the preset statement field, and determining the statement type of the statement to be executed according to the result of the field matching; Generate a corresponding statement tree according to the fields of the statement to be executed, wherein the node path of the statement tree represents the execution flow of executing the execution object; The leaf nodes of the statement tree are determined as execution objects of the statements to be executed.

3. The method according to claim 1, characterized in that: include: If the statement type is a preset deletion type, then updating the statement to be executed according to the security level to generate an update statement includes: If the statement type is a preset deletion type, and the security level indicates that the execution object is a protected object, the field corresponding to the statement type of the statement to be executed is modified to a field indicating a rename operation, and a rename statement is generated. Obtaining a preset backup statement template, filling the backup statement template according to the execution object, and generating a backup statement, wherein the backup statement template includes a target address; An update statement is determined according to the rename statement and the backup statement.

4. The method according to claim 3, characterized in that: Also includes: The update statement is executed to back up the execution object in the database to the target address, and the initial name of the execution object in the database is renamed to a preset name, wherein the preset name is a name associated with the initial name of the execution object.

5. The method according to claim 4, characterized in that The security level includes the protected time of the execution object; The executing the update statement to back up the execution object in the database to the target address includes: Determine the storage time of the execution object according to the protection time of the execution object, and add the storage time to the update statement, wherein the storage time is used to represent the storage time of the execution object in the storage area corresponding to the target address; The update statement is executed to back up the execution object in the database to a storage area corresponding to the target address.

6. The method according to claim 4, further comprising: If a recovery command for the execution object is received, an execution log corresponding to the execution object is obtained, wherein the execution log includes an initial name, a preset name and the target address of the execution object, According to the execution log, the execution object of the target address is restored to the database, or, according to the execution log, the execution object with a preset name in the database is renamed to an initial name.

7. The method according to claim 1, characterized in that Also includes: Generate a successful deletion response to the sending end of the statement to be executed.

8. A processing device for executing a statement, characterized in that: include: An acquisition module, used for acquiring a statement to be executed, wherein the fields of the statement to be executed include a statement type and an execution object; A parsing module, used to determine the statement type and execution object of the statement to be executed according to the fields of the statement to be executed; A judgment module, used to determine the security level of the execution object according to a preset security table, wherein the preset security table includes the security level corresponding to the execution object, and the security level indicates whether the execution object is a protected object; The update module is used to update the statement to be executed according to the security level and generate an update statement if the statement type is a preset deletion type.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for processing execution statements according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for processing execution statements according to any one of claims 1 to 7 when the processor executes the instructions.