CN116483860A - Data processing method and device, database development tool and electronic equipment - Google Patents

Data processing method and device, database development tool and electronic equipment Download PDF

Info

Publication number
CN116483860A
CN116483860A CN202310476839.1A CN202310476839A CN116483860A CN 116483860 A CN116483860 A CN 116483860A CN 202310476839 A CN202310476839 A CN 202310476839A CN 116483860 A CN116483860 A CN 116483860A
Authority
CN
China
Prior art keywords
sql
request
auditing
audit
return value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310476839.1A
Other languages
Chinese (zh)
Inventor
肖杨
陈小伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Oceanbase Technology Co Ltd
Original Assignee
Beijing Oceanbase Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Oceanbase Technology Co Ltd filed Critical Beijing Oceanbase Technology Co Ltd
Priority to CN202310476839.1A priority Critical patent/CN116483860A/en
Publication of CN116483860A publication Critical patent/CN116483860A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

One or more embodiments of the present disclosure provide a data processing method and apparatus, a database development tool, and an electronic device, where the method is applied to the database development tool, the database development tool has a parameter template, and is preconfigured with interaction parameters for communicating with an SQL auditing system, the method includes: responding to the generation of the SQL sentence to be executed, generating an SQL audit request by utilizing the interaction parameter, and sending the SQL audit request to the SQL audit system, wherein the SQL audit request is configured to request the SQL audit system to audit the SQL sentence to be executed; receiving a return value for the SQL audit request sent by the SQL audit system, and decoding the return value by utilizing the interaction parameter to obtain an audit result of the SQL statement to be executed; and processing the SQL sentence according to the auditing result.

Description

Data processing method and device, database development tool and electronic equipment
Technical Field
One or more embodiments of the present disclosure relate to the field of database technologies, and in particular, to a data processing method and apparatus, a database development tool, and an electronic device.
Background
Today, the development of the internet and informatization is rapid, and the generation of data is explosively increasing, so that the requirements for databases and management thereof are increasing. The database is currently managed by database development tools, such as by executing SQL statements to process data within the database. The management authorities of different users to the database are often different, so that authority auditing is needed before the users execute SQL sentences, and only SQL sentences with authorities can be executed. Often, the database development tool and the auditing system for auditing the user's database management rights exist independently, for example, the auditing system is office approval software of a merchant to which the database belongs; in the related art, the integration difficulty of the database development tool and the auditing system is high, and the database development tool and the auditing system cannot coordinate and process SQL sentences of users.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a data processing method and apparatus, a database development tool, and an electronic device.
In order to achieve the above object, one or more embodiments of the present disclosure provide the following technical solutions:
according to a first aspect of one or more embodiments of the present specification, there is provided a data processing method applied to a database development tool having a parameter template and preconfigured with interaction parameters generated according to the parameter template for communication with an SQL auditing system, the method comprising:
Responding to the generation of the SQL sentence to be executed, generating an SQL audit request by utilizing the interaction parameter, and sending the SQL audit request to the SQL audit system, wherein the SQL audit request is configured to request the SQL audit system to audit the SQL sentence to be executed;
receiving a return value for the SQL audit request sent by the SQL audit system, and decoding the return value by utilizing the interaction parameter to obtain an audit result of the SQL statement to be executed;
and processing the SQL sentence according to the auditing result.
In one embodiment of the present specification, the audit result includes executable, non-executable;
the processing the SQL sentence according to the auditing result comprises the following steps:
executing the SQL sentence in response to the auditing result being executable;
and generating a prompt message in response to the checking result being non-executable, wherein the prompt message is used for prompting the SQL statement to execute without permission.
In one embodiment of the present specification, the auditing result includes to-be-approved;
the processing the SQL sentence according to the auditing result comprises the following steps:
responding to the auditing result as to-be-approved, generating a new work order request by utilizing the interaction parameter, and sending the new work order request to the SQL auditing system, wherein the new work order request is configured to request the SQL auditing system to newly create a work order for approving the execution authority of the SQL sentence to be executed;
Receiving a return value sent by the SQL auditing system and aiming at the newly built work order request, and decoding the return value by utilizing the interaction parameter to obtain a work order identifier;
generating an approval result acquisition request by utilizing the interaction parameters, and sending the approval result acquisition request to the SQL auditing system, wherein the approval result acquisition request is configured to request the SQL auditing system to send an approval result of an approval work order to which the work order identifier belongs;
receiving a return value which is sent by the SQL auditing system and aims at the approval result acquisition request, and decoding the return value by utilizing the interaction parameter to obtain an approval result;
and processing the SQL sentence according to the approval result.
In one embodiment of the present specification, the generating the new work order request by using the interaction parameter includes:
and acquiring an initiator of the SQL sentence to be executed, and generating a new work order request by utilizing the interaction parameters and the initiator, wherein the new work order request is configured to request the SQL auditing system to newly establish a work order for checking whether the initiator has the execution authority of the SQL sentence to be executed.
In one embodiment of the present specification, the approval result includes pass or fail;
the processing the SQL sentence according to the approval result comprises the following steps:
responding to the approval result to be passed, and executing the SQL sentence;
and generating a prompt message in response to the approval result being failed, wherein the prompt message is used for prompting that the SQL sentence fails the approval.
In one embodiment of the present specification, the method further comprises:
and configuring interaction parameters of the database development tool according to a parameter configuration instruction, wherein the parameter configuration instruction is input by a user according to a parameter template of the database development tool and the SQL auditing system.
In one embodiment of the present specification, the interaction parameter includes at least one of:
parameters for generating SQL audit requests;
an expression for decoding a return value for the SQL audit request;
parameters for generating a new work order request;
an expression for decoding a return value for the new worksheet request;
parameters for generating an approval result acquisition request;
an expression for decoding a return value for the approval result acquisition request.
In one embodiment of the present specification, the interaction parameter includes at least one of: request method, request address, request header, request parameter, request body format, request body content, request body encryption or not, request body encryption method, request body encryption key, return value encryption or not, return value encryption method, return value encryption key;
wherein the request address comprises a URL address of an API of the SQL auditing system.
In one embodiment of the present specification, the interaction parameter is further used to characterize whether the database development tool is integrated with the SQL auditing system;
the responding to the SQL statement to be executed, generating an SQL auditing request by utilizing the interaction parameter, and sending the SQL auditing request to the SQL auditing system comprises the following steps:
and responding to the generation of the SQL sentence to be executed, wherein the interaction parameter characterizes the database development tool to be integrated with the SQL auditing system, and the interaction parameter is utilized to generate an SQL auditing request and send the SQL auditing request to the SQL auditing system.
In one embodiment of the present specification, the method further comprises:
responding to the generation of the SQL sentence to be executed, wherein the interaction parameter characterizes that the SQL auditing system is not integrated with the database development tool, the SQL sentence to be executed is audited by utilizing an SQL auditing module in the database development tool, and the SQL sentence is processed by utilizing the auditing result.
According to a second aspect of one or more embodiments of the present specification, there is provided a data processing apparatus for application to a database development tool having a parameter template and preconfigured with interaction parameters for communicating with an SQL auditing system generated from the parameter template, the apparatus comprising:
the request module is used for responding to the generation of the SQL sentence to be executed, generating an SQL audit request by utilizing the interaction parameter, and sending the SQL audit request to the SQL audit system, wherein the SQL audit request is used for requesting the SQL audit system to audit the SQL sentence to be executed;
the decoding module is used for receiving a return value for the SQL audit request sent by the SQL audit system, and decoding the return value by utilizing the interaction parameter to obtain an audit result of the SQL statement to be executed;
and the processing module is used for processing the SQL statement according to the auditing result.
In one embodiment of the present specification, the audit result includes executable, non-executable;
the processing module is used for:
executing the SQL sentence in response to the auditing result being executable;
And generating a prompt message in response to the checking result being non-executable, wherein the prompt message is used for prompting the SQL statement to execute without permission.
In one embodiment of the present specification, the auditing result includes to-be-approved;
the processing module is used for:
responding to the auditing result as to-be-approved, generating a new work order request by utilizing the interaction parameter, and sending the new work order request to the SQL auditing system, wherein the new work order request is configured to request the SQL auditing system to newly create a work order for approving the execution authority of the SQL sentence to be executed;
receiving a return value sent by the SQL auditing system and aiming at the newly built work order request, and decoding the return value by utilizing the interaction parameter to obtain a work order identifier;
generating an approval result acquisition request by utilizing the interaction parameters, and sending the approval result acquisition request to the SQL auditing system, wherein the approval result acquisition request is configured to request the SQL auditing system to send an approval result of an approval work order to which the work order identifier belongs;
receiving a return value which is sent by the SQL auditing system and aims at the approval result acquisition request, and decoding the return value by utilizing the interaction parameter to obtain an approval result;
And processing the SQL sentence according to the approval result.
In one embodiment of the present disclosure, the processing module is configured to, when generating a new work order request using the interaction parameter, specifically:
and acquiring an initiator of the SQL sentence to be executed, and generating a new work order request by utilizing the interaction parameters and the initiator, wherein the new work order request is configured to request the SQL auditing system to newly establish a work order for checking whether the initiator has the execution authority of the SQL sentence to be executed.
In one embodiment of the present specification, the approval result includes pass or fail;
the processing module is used for processing the SQL sentence according to the approval result, and is specifically used for:
responding to the approval result to be passed, and executing the SQL sentence;
and generating a prompt message in response to the approval result being failed, wherein the prompt message is used for prompting that the SQL sentence fails the approval.
In one embodiment of the present specification, the apparatus further comprises an instruction module for:
and configuring interaction parameters of the database development tool according to a parameter configuration instruction, wherein the parameter configuration instruction is input by a user according to a parameter template of the database development tool and the SQL auditing system.
In one embodiment of the present specification, the interaction parameter includes at least one of:
parameters for generating SQL audit requests;
an expression for decoding a return value for the SQL audit request;
parameters for generating a new work order request;
an expression for decoding a return value for the new worksheet request;
parameters for generating an approval result acquisition request;
an expression for decoding a return value for the approval result acquisition request.
In one embodiment of the present specification, the interaction parameter includes at least one of: request method, request address, request header, request parameter, request body format, request body content, request body encryption or not, request body encryption method, request body encryption key, return value encryption or not, return value encryption method, return value encryption key;
wherein the request address comprises a URL address of an API of the SQL auditing system.
In one embodiment of the present specification, the interaction parameter is further used to characterize whether the database development tool is integrated with the SQL auditing system;
the auditing module is used for:
and responding to the generation of the SQL sentence to be executed, wherein the interaction parameter characterizes the database development tool to be integrated with the SQL auditing system, and the interaction parameter is utilized to generate an SQL auditing request and send the SQL auditing request to the SQL auditing system.
In one embodiment of the present specification, the auditing module is further configured to:
responding to the generation of the SQL sentence to be executed, wherein the interaction parameter characterizes that the database development tool is not integrated with the SQL auditing system, the SQL sentence to be executed is audited by utilizing an SQL auditing module in the database development tool, and the SQL sentence is processed by utilizing the auditing result
According to a third aspect of one or more embodiments of the present specification, a database development tool is presented having a parameter template for configuring interaction parameters in communication with an SQL auditing system.
According to a fourth aspect of one or more embodiments of the present specification, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of the first aspect by executing the executable instructions.
According to a fifth aspect of one or more embodiments of the present description, there is provided a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method according to the first aspect.
The technical scheme provided by the embodiment of the specification can comprise the following beneficial effects:
according to the data processing method provided by the embodiment of the specification, the database development tool is provided with the parameter template and is pre-configured with the interaction parameter which is generated according to the parameter template and is used for communicating with the SQL auditing system, so that when the database development tool generates an SQL statement to be executed, the SQL auditing request can be generated by using the interaction parameter and is sent to the SQL auditing system to request the SQL auditing system to audit the SQL statement to be executed, the database development tool can further receive a return value which is sent by the SQL auditing system and aims at the SQL auditing request, the return value is decoded by using the interaction parameter, the auditing result of the SQL statement to be executed is obtained, and finally the database development tool can process the SQL statement according to the auditing result. Therefore, the method enables the database development tool and the SQL auditing system to communicate and process SQL sentences in a coordinated and consistent manner through the interaction parameters, namely, the integration of the database development tool and the SQL auditing system is completed through the interaction parameters; and the configuration of the interactive parameters is provided with the parameter templates which can be referred, so that the method is simple and convenient, and the difficulty of integrating the interactive parameters and the parameter templates is reduced.
Drawings
Fig. 1 is a flow chart of a data processing method according to an exemplary embodiment.
Fig. 2 is a schematic diagram of processing the SQL statement according to an audit result in a data synchronization method according to an exemplary embodiment.
Fig. 3 is a flow chart of a data processing method according to an exemplary embodiment.
Fig. 4 is a schematic diagram of an apparatus according to an exemplary embodiment.
Fig. 5 is a block diagram of a data processing apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of one or more embodiments of the present description as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
Today, the development of the internet and informatization is rapid, and the generation of data is explosively increasing, so that the requirements for databases and management thereof are increasing. The database is currently managed by database development tools, such as by executing SQL statements to process data within the database. The management authorities of different users to the database are often different, so that authority auditing is needed before the users execute SQL sentences, and only SQL sentences with authorities can be executed. Often, the database development tool and the auditing system for auditing the user's database management rights exist independently, for example, the auditing system is office approval software of a merchant to which the database belongs; in the related art, the integration difficulty of the database development tool and the auditing system is high, and the database development tool and the auditing system cannot coordinate and process SQL sentences of users.
Based on the above, in a first aspect, at least one embodiment of the present disclosure provides a data processing method, which may enable a database development tool and an SQL audit system to simply and conveniently complete integration, so as to coordinate and consistently process SQL statements of a user, thereby improving efficiency and accuracy of database management, where the SQL audit system may be office approval software of a merchant to which a database managed by the database development tool belongs.
The method may be applied to the database development tool, which may have a parameter template, and may be preconfigured with interaction parameters generated from the parameter template for communication with the SQL auditing system. The interaction parameter can be used as a communication bridge between the database development tool and the SQL auditing system, namely, the database development tool can initiate a request to the SQL auditing system according to the interaction parameter, decode a return value and the like, so that the communication between the database development tool and the SQL auditing system is convenient, simple, reliable and efficient; the parameter template may be used to configure the interaction parameters that communicate with the SQL auditing system, i.e. as a reference for configuring the interaction parameters, for example, the parameter template may have various sentence patterns that communicate with the SQL auditing system, and the user may adaptively edit according to each sentence pattern in the SQL auditing system integrated with the database development tool, so as to obtain the interaction parameters that are used to communicate with the SQL auditing system, for example, the user directly edits in the metadata database or the user edits through the interaction interface of the development tool. In other words, the database development tool may configure the interaction parameters of the database development tool according to parameter configuration instructions, wherein the parameter configuration instructions are input by a user according to the parameter templates of the database development tool and the SQL auditing system.
Optionally, if classified according to the purpose of the interaction parameter, the interaction parameter includes at least one of the following: parameters for generating SQL audit requests, expressions for decoding return values for the SQL audit requests, parameters for generating new work order requests, expressions for decoding return values for the new work order requests, parameters for generating approval result acquisition requests, expressions for decoding return values for the approval result acquisition requests, and the like.
Optionally, if the content is classified according to the interaction parameters, the interaction parameters include at least one of the following: request method, request address, request header, request parameter, request body format, request body content, whether request body is encrypted, request body encryption method, request body encryption key, whether return value is encrypted, return value encryption method, return value encryption key, etc.; wherein the request address comprises a URL (Uniform Resource Locator ) address of an API (Application Programming Interface, application programming interface) of the SQL auditing system. Parameters for generating an SQL audit request include, for example, request methods, request addresses (i.e., APIs in the SQL audit system for receiving SQL audit requests), request headers, request parameters, request body format, request body content, request body encryption or not, request body encryption method, request body encryption key, etc.; for another example, the parameters for generating the new work order request include a request method, a request address (i.e., an API for receiving the new work order request in the SQL audit system), a request header, a request parameter, a request body format, a request body content, whether the request body is encrypted, a request body encryption method, a request body encryption key, and the like; for another example, the parameters for generating the approval result obtaining request include a request method, a request address (i.e., an API for receiving the approval result obtaining request in the SQL auditing system), a request header, a request parameter, a request body format, a request body content, whether the request body is encrypted, a request body encryption method, a request body encryption key, and the like.
Referring to fig. 1, a flow of the method is schematically shown, and includes steps S101 to S103.
In step S101, in response to generating the SQL statement to be executed, generating an SQL audit request by using the interaction parameter, and sending the SQL audit request to the SQL audit system, wherein the SQL audit request is configured to request the SQL audit system to audit the SQL statement to be executed.
When a user uses the database development tool to manage the database, the database development tool generates a corresponding SQL sentence after inputting a certain data management instruction, and if the SQL sentence is executed, the data management transaction indicated by the data management instruction of the user can be completed. The SQL statement to be executed in this step may be an SQL statement generated by the database management tool according to a data management instruction input by the user.
It may be appreciated that the interaction parameters may include variables and invariants, where the invariants may be parts matched with the SQL auditing system, for example, a request method, a request address (i.e., an API for receiving an SQL auditing request in the SQL auditing system), and the variables may be objects to be checked, i.e., SQL statements to be executed, and the like. Therefore, when the SQL audit request is generated (i.e. edited) by utilizing the interaction parameters in the step, parameters for generating the SQL audit request can be utilized to edit and encapsulate variables related to the audit request, and the like, so as to obtain the SQL audit request; for example, the template variable in the request body content in the parameters for generating the SQL audit request is replaced by the SQL statement to be executed, and the parameters are encapsulated by at least one of a request method, a request address, a request header, a request parameter, a request body format, a request body content, whether the request body is encrypted, a request body encryption method, a request body encryption key and the like, so as to obtain the SQL audit request.
The SQL audit request has the following functions: calling an API (application program interface) for SQL audit in the SQL audit system to enable the SQL audit system to audit the SQL statement to be executed and return a return value for representing the audit result; in the visual sense, the function is equivalent to that of inputting SQL sentences into the SQL auditing system for auditing by a user.
In step S102, a return value for the SQL audit request sent by the SQL audit system is received, and the return value is decoded by using the interaction parameter, so as to obtain an audit result of the SQL statement to be executed.
For example, if the return value in the interaction parameter is encrypted, the return value can be decrypted by using the return value encryption method and the return value encryption key in the interaction parameter, so as to obtain a decryption result of the return value; and inputting the decryption result of the return value into the interaction parameter for decoding the expression of the return value aiming at the SQL audit request to obtain the decoding result of the expression on the return value, namely the audit result of the SQL statement to be executed. Of course, if the return value in the interaction parameter is not encrypted, the return value may be directly input to an expression of the interaction parameter for decoding the return value of the SQL audit request, so as to obtain a decoding result of the return value by the expression, that is, an audit result of the SQL statement to be executed.
The auditing result of the SQL statement to be executed can comprise executable, non-executable and pending batch. The SQL auditing system is provided with an SQL statement white list and an SQL statement black list, if the SQL statement to be executed is the SQL statement in the SQL statement white list, the auditing result can be confirmed to be executable, if the SQL statement to be executed is the SQL statement in the SQL statement black list, the auditing result can be confirmed to be non-executable, and if the SQL statement to be executed is not the SQL statement white list and the SQL statement in the SQL statement black list, the auditing result can be confirmed to be to-be-approved (namely whether the SQL statement to be executed cannot be confirmed, and the approval is required to be submitted to be confirmed by a user with approval authority).
In step S103, the SQL statement is processed according to the auditing result.
Illustratively, in response to the audit result being executable, the SQL statement is executed to complete the data management transaction indicated by the user's data management instructions.
Further exemplary, in response to the auditing result being non-executable, generating a hint message, wherein the hint message is used for prompting the SQL statement to execute without permission, so that the user abandons the data management transaction indicated by the data management instruction.
Also by way of example, for the case where the auditing result is to be audited, this step may be performed in the manner shown in fig. 2, including sub-steps S1031 to S1035.
In the substep S1031, in response to the auditing result being a pending approval, generating a new work order request by using the interaction parameter, and sending the new work order request to the SQL auditing system, wherein the new work order request is configured to request the SQL auditing system to newly create a work order for approving the execution authority of the SQL statement to be executed.
For example, this step may obtain an initiator of the SQL statement to be executed (e.g., a user inputting a data management instruction to a database development tool), and generate a new work order request using the interaction parameters and the initiator, where the new work order request is configured to request the SQL auditing system to create a work order for approving whether the initiator has the execution authority of the SQL statement to be executed.
It may be understood that the interaction parameters may include variables and invariants, where the invariants may be parts matched with the SQL auditing system, for example, a request method, a request address (i.e., an API for receiving a new work order request in the SQL auditing system), and the variables may be objects to be audited, i.e., SQL statements to be executed and originators thereof, and the like. Therefore, when the interaction parameters are utilized to generate (i.e. edit) a new work order request in the step, parameters for generating the new work order request can be utilized to edit and encapsulate variables related to the new work order request, and the new work order request is obtained; for example, the template variable in the request body content in the parameters for generating the new work order request is replaced by the SQL statement to be executed and the initiator thereof, and the parameters are encapsulated by at least one of a request method, a request address, a request header, a request parameter, a request body format, the request body content, whether the request body is encrypted, a request body encryption method, a request body encryption key and the like, so as to obtain the new work order request.
The function of the new work order request is: calling an API (application program interface) for creating a work order in the SQL auditing system so that the SQL auditing system creates a work order for approving whether the initiator has the execution authority of the SQL statement to be executed or not, and returning a return value for representing the identification (such as number, id and the like) of the work order; in visual terms, the function of the method is equivalent to that a user creates a work order for checking whether the initiator has the execution authority of the SQL sentence to be executed on an SQL auditing system through operation.
After the SQL auditing system builds a work order, a work order identifier (such as a number, an id and the like) is allocated to the built work order.
In sub-step S1032, a return value for the new work order request sent by the SQL auditing system is received, and the return value is decoded by using the interaction parameter, so as to obtain a work order identifier.
For example, if the return value in the interaction parameter is encrypted, the return value can be decrypted by using the return value encryption method and the return value encryption key in the interaction parameter to obtain the decryption result of the return value; and then inputting the decryption result of the return value into the interaction parameter for decoding the expression of the return value requested by the newly-built work order to obtain the decoding result of the expression on the return value, namely the work order identifier of the newly-built approval work order. Of course, if the return value in the interaction parameter is not encrypted, the return value may be directly input into the interaction parameter for decoding the expression of the return value requested by the new work order, so as to obtain a result of decoding the return value by the expression, that is, a work order identifier of the new approval work order.
In sub-step S1033, an approval result acquisition request is generated by using the interaction parameter, and the approval result acquisition request is sent to the SQL auditing system, where the approval result acquisition request is configured to request the SQL auditing system to send an approval result of an approval work order to which the work order identifier belongs.
After the SQL auditing system builds an approval work order, the approval work order is submitted to a user with approval authority, and the user can carry out approval processing on the approval work order, namely, the approval result is input to be passed or failed through operation.
It may be understood that the interaction parameters may include variables and invariants, where the invariants may be a part matched with the SQL audit system, for example, a request method, a request address (i.e. an API for receiving a new work order request in the SQL audit system), and the variables may be acquired objects, i.e. work order identifiers, etc. Therefore, when the interactive parameters are used for generating (i.e. editing) the approval result acquisition request in the step, parameters for generating the approval result acquisition request can be used for editing, packaging and the like on variables related to the acquisition request to obtain the approval result acquisition request; for example, the template variable in the request body content in the parameter for generating the approval result acquisition request is replaced by the work order identifier, and the parameter is encapsulated by at least one of a request method, a request address, a request header, a request parameter, a request body format, a request body content, whether the request body is encrypted, a request body encryption method, a request body encryption key, and the like, so as to obtain the approval result acquisition request.
The function of the new work order request is: and calling an API (application program interface) for returning the approval result in the SQL auditing system so that the SQL auditing system returns the approval result of the approval work order to which the work order identifier belongs. In visual terms, the function of the method is equivalent to that of inputting the work order identifier into the SQL auditing system by a user to inquire the approval result of the approval work order to which the work order identifier belongs.
In sub-step S1034, a return value of the approval result obtaining request sent by the SQL auditing system is received, and the return value is decoded by using the interaction parameter, so as to obtain an approval result.
For example, if the return value in the interaction parameter is encrypted, the return value can be decrypted by using the return value encryption method and the return value encryption key in the interaction parameter to obtain the decryption result of the return value; and then inputting the decryption result of the return value into the interaction parameter for decoding the expression of the return value aiming at the approval result acquisition request to obtain the decoding result of the expression on the return value, namely the approval result of the newly-built approval work order. Of course, if the return value in the interaction parameter is not encrypted, the return value may be directly input into the interaction parameter for decoding the expression of the return value for the approval result obtaining request, so as to obtain a result of decoding the return value by the expression, that is, an approval result of the newly-built approval work order.
The approval results may include pass or fail.
In sub-step S1035, the SQL statement is processed according to the approval result.
For example, in response to the approval result being pass, the SQL statement is executed to complete the data management transaction indicated by the user's data management instruction.
For example, in response to the approval result being failed, generating a prompt message, wherein the prompt message is used for prompting that the SQL sentence fails approval, so that the user gives up the data management transaction indicated by the data management instruction.
According to the data processing method provided by the embodiment of the specification, the database development tool is provided with the parameter template and is pre-configured with the interaction parameter which is generated according to the parameter template and is used for communicating with the SQL auditing system, so that when the database development tool generates an SQL statement to be executed, the SQL auditing request can be generated by using the interaction parameter and is sent to the SQL auditing system to request the SQL auditing system to audit the SQL statement to be executed, the database development tool can further receive a return value which is sent by the SQL auditing system and aims at the SQL auditing request, the return value is decoded by using the interaction parameter, the auditing result of the SQL statement to be executed is obtained, and finally the database development tool can process the SQL statement according to the auditing result. Therefore, the method enables the database development tool and the SQL auditing system to communicate and process SQL sentences in a coordinated and consistent manner through the interaction parameters, namely, the integration of the database development tool and the SQL auditing system is completed through the interaction parameters; and the configuration of the interactive parameters is provided with the parameter templates which can be referred, so that the method is simple and convenient, and the difficulty of integrating the interactive parameters and the parameter templates is reduced.
In some embodiments of the present disclosure, the interaction parameters are further used to characterize whether the database development tool is integrated with the SQL auditing system, i.e., the interaction parameters may include parameters used to characterize whether the database development tool is integrated with the SQL auditing system.
The data processing method in the above embodiment (i.e., the data processing method shown in fig. 1) may be completed in the case that the database development tool integrates the SQL auditing system, that is, step S101 in fig. 1 may include: and responding to the generation of the SQL sentence to be executed, wherein the interaction parameter characterizes the database development tool to be integrated with the SQL auditing system, and the interaction parameter is utilized to generate an SQL auditing request and send the SQL auditing request to the SQL auditing system.
In addition, the method can also respond to the generation of the SQL sentence to be executed, the interaction parameter characterizes that the SQL auditing system is not integrated with the database development tool, the SQL sentence to be executed is audited by utilizing an SQL auditing module in the database development tool, and the SQL sentence is processed by utilizing the auditing result.
Referring to FIG. 3, a flowchart of a data processing method according to the above embodiments is shown, and the method includes the following steps:
In step S301, the database development tool generates an SQL statement to be executed.
Step S302, judging whether the database development tool integrates an SQL auditing system.
And step S303, auditing the SQL sentence to be executed by using an SQL auditing module of the database development tool.
And step S304, calling an API of the SQL auditing system, and initiating an SQL auditing request.
In step S305, the API return value is decoded, and the SQL audit result is calculated according to the parameter check expression (i.e., the expression for decoding the return value for the SQL audit request).
And step S306, judging whether the approval work order needs to be initiated or not according to the SQL auditing result.
Step S307, calling the API of the SQL auditing system and initiating a new SQL auditing work order request.
In step S308, the API return value is decoded, and the number of the approval work order is calculated according to the parameter check expression (i.e., the expression for decoding the return value for the new work order request).
And step S309, training and approving the state to the SQL auditing system according to the work order number.
And step S310, judging whether the auditing result/approval state of the SQL auditing module is passed or not.
And step S311, judging whether to allow execution or not according to the SQL auditing result.
Step S312, execute SQL statement.
Fig. 4 is a schematic block diagram of an apparatus according to an exemplary embodiment. Referring to fig. 4, at the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a nonvolatile memory 410, although other tasks may be performed. One or more embodiments of the present description may be implemented in a software-based manner, such as by the processor 402 reading a corresponding computer program from the non-volatile memory 410 into the memory 408 and then running. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
Referring to fig. 5, the data processing apparatus may be applied to the device shown in fig. 4 to implement the technical solution of the present specification. Wherein the data processing apparatus is applicable to a database development tool having a parameter template and preconfigured with interaction parameters for communicating with an SQL auditing system generated from the parameter template, the apparatus comprising:
A request module 501, configured to generate an SQL audit request by using the interaction parameter in response to generating an SQL statement to be executed, and send the SQL audit request to the SQL audit system, where the SQL audit request is used to request the SQL audit system to audit the SQL statement to be executed;
the decoding module 502 is configured to receive a return value for the SQL audit request sent by the SQL audit system, and decode the return value by using the interaction parameter to obtain an audit result of the SQL statement to be executed;
and a processing module 503, configured to process the SQL statement according to the auditing result.
In one embodiment of the present specification, the audit result includes executable, non-executable;
the processing module is used for:
executing the SQL sentence in response to the auditing result being executable;
and generating a prompt message in response to the checking result being non-executable, wherein the prompt message is used for prompting the SQL statement to execute without permission.
In one embodiment of the present specification, the auditing result includes to-be-approved;
the processing module is used for:
responding to the auditing result as to-be-approved, generating a new work order request by utilizing the interaction parameter, and sending the new work order request to the SQL auditing system, wherein the new work order request is configured to request the SQL auditing system to newly create a work order for approving the execution authority of the SQL sentence to be executed;
Receiving a return value sent by the SQL auditing system and aiming at the newly built work order request, and decoding the return value by utilizing the interaction parameter to obtain a work order identifier;
generating an approval result acquisition request by utilizing the interaction parameters, and sending the approval result acquisition request to the SQL auditing system, wherein the approval result acquisition request is configured to request the SQL auditing system to send an approval result of an approval work order to which the work order identifier belongs;
receiving a return value which is sent by the SQL auditing system and aims at the approval result acquisition request, and decoding the return value by utilizing the interaction parameter to obtain an approval result;
and processing the SQL sentence according to the approval result.
In one embodiment of the present disclosure, the processing module is configured to, when generating a new work order request using the interaction parameter, specifically:
and acquiring an initiator of the SQL sentence to be executed, and generating a new work order request by utilizing the interaction parameters and the initiator, wherein the new work order request is configured to request the SQL auditing system to newly establish a work order for checking whether the initiator has the execution authority of the SQL sentence to be executed.
In one embodiment of the present specification, the approval result includes pass or fail;
the processing module is used for processing the SQL sentence according to the approval result, and is specifically used for:
responding to the approval result to be passed, and executing the SQL sentence;
and generating a prompt message in response to the approval result being failed, wherein the prompt message is used for prompting that the SQL sentence fails the approval.
In one embodiment of the present specification, the apparatus further comprises an instruction module for:
and configuring interaction parameters of the database development tool according to a parameter configuration instruction, wherein the parameter configuration instruction is input by a user according to a parameter template of the database development tool and the SQL auditing system.
In one embodiment of the present specification, the interaction parameter includes at least one of:
parameters for generating SQL audit requests;
an expression for decoding a return value for the SQL audit request;
parameters for generating a new work order request;
an expression for decoding a return value for the new worksheet request;
parameters for generating an approval result acquisition request;
An expression for decoding a return value for the approval result acquisition request.
In one embodiment of the present specification, the interaction parameter includes at least one of: request method, request address, request header, request parameter, request body format, request body content, request body encryption or not, request body encryption method, request body encryption key, return value encryption or not, return value encryption method, return value encryption key;
wherein the request address comprises a URL address of an API of the SQL auditing system.
In one embodiment of the present specification, the interaction parameter is further used to characterize whether the database development tool is integrated with the SQL auditing system;
the auditing module is used for:
and responding to the generation of the SQL sentence to be executed, wherein the interaction parameter characterizes the database development tool to be integrated with the SQL auditing system, and the interaction parameter is utilized to generate an SQL auditing request and send the SQL auditing request to the SQL auditing system.
In one embodiment of the present specification, the auditing module is further configured to:
responding to the generation of the SQL sentence to be executed, wherein the interaction parameter characterizes that the SQL auditing system is not integrated with the database development tool, the SQL sentence to be executed is audited by utilizing an SQL auditing module in the database development tool, and the SQL sentence is processed by utilizing the auditing result.
One or more embodiments of the present specification also provide a database development tool having a parameter template for configuring interaction parameters for communication with an SQL auditing system.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
User information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to herein are both user-authorized or fully authorized information and data by parties, and the collection, use and processing of relevant data requires compliance with relevant laws and regulations and standards of the relevant country and region, and is provided with corresponding operation portals for user selection of authorization or denial.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.

Claims (14)

1. A data processing method applied to a database development tool having a parameter template and preconfigured with interaction parameters generated from the parameter template for communication with an SQL auditing system, the method comprising:
Responding to the generation of the SQL sentence to be executed, generating an SQL audit request by utilizing the interaction parameter, and sending the SQL audit request to the SQL audit system, wherein the SQL audit request is configured to request the SQL audit system to audit the SQL sentence to be executed;
receiving a return value for the SQL audit request sent by the SQL audit system, and decoding the return value by utilizing the interaction parameter to obtain an audit result of the SQL statement to be executed;
and processing the SQL sentence according to the auditing result.
2. A data processing method according to claim 1, the audit result comprising executable, non-executable;
the processing the SQL sentence according to the auditing result comprises the following steps:
executing the SQL sentence in response to the auditing result being executable;
and generating a prompt message in response to the checking result being non-executable, wherein the prompt message is used for prompting the SQL statement to execute without permission.
3. The data processing method according to claim 1, wherein the auditing result includes to-be-approved;
the processing the SQL sentence according to the auditing result comprises the following steps:
Responding to the auditing result as to-be-approved, generating a new work order request by utilizing the interaction parameter, and sending the new work order request to the SQL auditing system, wherein the new work order request is configured to request the SQL auditing system to newly create a work order for approving the execution authority of the SQL sentence to be executed;
receiving a return value sent by the SQL auditing system and aiming at the newly built work order request, and decoding the return value by utilizing the interaction parameter to obtain a work order identifier;
generating an approval result acquisition request by utilizing the interaction parameters, and sending the approval result acquisition request to the SQL auditing system, wherein the approval result acquisition request is configured to request the SQL auditing system to send an approval result of an approval work order to which the work order identifier belongs;
receiving a return value which is sent by the SQL auditing system and aims at the approval result acquisition request, and decoding the return value by utilizing the interaction parameter to obtain an approval result;
and processing the SQL sentence according to the approval result.
4. A data processing method according to claim 3, said generating a new work order request using said interaction parameters, comprising:
And acquiring an initiator of the SQL sentence to be executed, and generating a new work order request by utilizing the interaction parameters and the initiator, wherein the new work order request is configured to request the SQL auditing system to newly establish a work order for checking whether the initiator has the execution authority of the SQL sentence to be executed.
5. A data processing method according to claim 3, the approval result comprising pass or fail;
the processing the SQL sentence according to the approval result comprises the following steps:
responding to the approval result to be passed, and executing the SQL sentence;
and generating a prompt message in response to the approval result being failed, wherein the prompt message is used for prompting that the SQL sentence fails the approval.
6. The data processing method of claim 1, the method further comprising:
and configuring interaction parameters of the database development tool according to a parameter configuration instruction, wherein the parameter configuration instruction is input by a user according to a parameter template of the database development tool and the SQL auditing system.
7. The data processing method according to claim 1 or 6, the interaction parameters comprising at least one of:
Parameters for generating SQL audit requests;
an expression for decoding a return value for the SQL audit request;
parameters for generating a new work order request;
an expression for decoding a return value for the new worksheet request;
parameters for generating an approval result acquisition request;
an expression for decoding a return value for the approval result acquisition request.
8. The data processing method according to claim 1 or 6, the interaction parameters comprising at least one of: request method, request address, request header, request parameter, request body format, request body content, request body encryption or not, request body encryption method, request body encryption key, return value encryption or not, return value encryption method, return value encryption key;
wherein the request address comprises a URL address of an API of the SQL auditing system.
9. The data processing method of claim 1, the interaction parameters further used to characterize whether the database development tool is integrated with the SQL auditing system;
the responding to the SQL statement to be executed, generating an SQL auditing request by utilizing the interaction parameter, and sending the SQL auditing request to the SQL auditing system comprises the following steps:
And responding to the generation of the SQL sentence to be executed, wherein the interaction parameter characterizes the database development tool to be integrated with the SQL auditing system, and the interaction parameter is utilized to generate an SQL auditing request and send the SQL auditing request to the SQL auditing system.
10. The data processing method of claim 1, the method further comprising:
responding to the generation of the SQL sentence to be executed, wherein the interaction parameter characterizes that the SQL auditing system is not integrated with the database development tool, the SQL sentence to be executed is audited by utilizing an SQL auditing module in the database development tool, and the SQL sentence is processed by utilizing the auditing result.
11. A data processing apparatus for application to a database development tool having a parameter template and preconfigured with interaction parameters generated from the parameter template for communication with an SQL auditing system, the apparatus comprising:
the request module is used for responding to the generation of the SQL sentence to be executed, generating an SQL audit request by utilizing the interaction parameter, and sending the SQL audit request to the SQL audit system, wherein the SQL audit request is used for requesting the SQL audit system to audit the SQL sentence to be executed;
The decoding module is used for receiving a return value for the SQL audit request sent by the SQL audit system, and decoding the return value by utilizing the interaction parameter to obtain an audit result of the SQL statement to be executed;
and the processing module is used for processing the SQL statement according to the auditing result.
12. A database development tool having a parameter template for configuring interaction parameters for communication with an SQL auditing system.
13. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the method of any of claims 1-10 by executing the executable instructions.
14. A computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method of any of claims 1-10.
CN202310476839.1A 2023-04-27 2023-04-27 Data processing method and device, database development tool and electronic equipment Pending CN116483860A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310476839.1A CN116483860A (en) 2023-04-27 2023-04-27 Data processing method and device, database development tool and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310476839.1A CN116483860A (en) 2023-04-27 2023-04-27 Data processing method and device, database development tool and electronic equipment

Publications (1)

Publication Number Publication Date
CN116483860A true CN116483860A (en) 2023-07-25

Family

ID=87222990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310476839.1A Pending CN116483860A (en) 2023-04-27 2023-04-27 Data processing method and device, database development tool and electronic equipment

Country Status (1)

Country Link
CN (1) CN116483860A (en)

Similar Documents

Publication Publication Date Title
US11716357B2 (en) Data access policies
EP3435260A1 (en) Method and device for outputting risk information and constructing risk information
CN107092535B (en) Method and apparatus for data storage of test interface
CN111062028B (en) Authority management method and device, storage medium and electronic equipment
CN115277143B (en) Data security transmission method, device, equipment and storage medium
CN112036125A (en) Document management method and device and computer equipment
CN116070267A (en) Data security protection method, device, equipment and machine-readable storage medium
CN113282959A (en) Service data processing method and device and electronic equipment
CN111737304B (en) Processing method, device and equipment of block chain data
CN106982193A (en) A kind of method and device of prevention batch registration
CN116483860A (en) Data processing method and device, database development tool and electronic equipment
CN114444725B (en) Pre-training service system and service providing method based on pre-training service system
CN113204776B (en) Method, device, equipment and storage medium for realizing column encryption
CN114896633A (en) Sensitive data processing method and device and computer readable storage medium
CN112131545B (en) Method, device and equipment for processing voice authorization and voice related service
CN114816361A (en) Method, device, equipment, medium and program product for generating splicing project
GB2614677A (en) Software access through heterogeneous encryption
CN113704285A (en) Permission-based retrieval method, device and equipment
CN116232655B (en) Configuration application permission management method and system based on Internet of things cloud platform
CN116700842B (en) Data object reading and writing method and device, computing equipment and storage medium
US20240028570A1 (en) Secure zero knowledge data transformation and validation
CN117474668A (en) Request processing method and device, storage medium and electronic equipment
CN116361331A (en) Data query method and device
CN117272374A (en) Authority control method and related equipment
CN116126903A (en) Data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40093285

Country of ref document: HK