CN111552698B - SQL version control system and method for solving environmental difference - Google Patents

SQL version control system and method for solving environmental difference Download PDF

Info

Publication number
CN111552698B
CN111552698B CN202010317868.XA CN202010317868A CN111552698B CN 111552698 B CN111552698 B CN 111552698B CN 202010317868 A CN202010317868 A CN 202010317868A CN 111552698 B CN111552698 B CN 111552698B
Authority
CN
China
Prior art keywords
sql
information
test
module
execution
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.)
Active
Application number
CN202010317868.XA
Other languages
Chinese (zh)
Other versions
CN111552698A (en
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.)
Chongqing Fumin Bank Co Ltd
Original Assignee
Chongqing Fumin Bank 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 Chongqing Fumin Bank Co Ltd filed Critical Chongqing Fumin Bank Co Ltd
Priority to CN202010317868.XA priority Critical patent/CN111552698B/en
Publication of CN111552698A publication Critical patent/CN111552698A/en
Application granted granted Critical
Publication of CN111552698B publication Critical patent/CN111552698B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to the technical field of database security, in particular to an SQL version control system and method for solving the environmental difference, wherein the system comprises a test subsystem and a production subsystem, the test subsystem is used for testing input SQL information and encrypting the SQL information when the test passes; the production subsystem is used for judging whether the input SQL information is encrypted SQL information or not, and if yes, executing the SQL information. By adopting the technical scheme, the technical problems that the SQL information executed in the production environment cannot be guaranteed to be tested and not tampered after the test in the prior art can be solved, the situations of database information leakage, collapse and the like caused by executing the input SQL information can be effectively avoided, and the risk of executing the SQL information can be effectively controlled.

Description

SQL version control system and method for solving environmental difference
Technical Field
The invention relates to the technical field of database security, in particular to an SQL version control system and method for solving environmental differences.
Background
With the development of information technology, the role of a database is more important, and how to protect the security of information in the database is always a concern. In the working process of the database, operations such as data access, query, update and management need to be performed on the database frequently, and all the operations are realized by executing SQL sentences. In general, an SQL statement is tested before being executed, for example, in a development environment or a test environment, the SQL statement is subjected to grammar checking and content checking, and after the check is passed, the SQL statement is provided to the DBA for execution, and if the execution is successful, the SQL statement is considered to be tested to be qualified. And then, inputting the SQL statement which is qualified in test into the production environment by a developer for execution, wherein the safety of the SQL statement is completely ensured by the developer submitting the SQL statement because the input SQL statement cannot be judged whether to pass the test in the production environment, so that the risk of executing the SQL statement in the production environment becomes uncontrollable, and serious consequences such as database information leakage, collapse and the like can occur.
In order to ensure that SQL sentences executed in a production environment are tested, the tested SQL sentences are marked in the prior art, the SQL sentences are distinguished in the production environment through marking, and only the SQL sentences with marks are executed, so that the SQL sentences executed in the production environment are tested. However, it has been found that the above-described manner still has the following disadvantages: the tested SQL statement is released into the production environment by a developer after marking, the SQL statement has the risk of being tampered in the stage from the tested SQL statement to the prior release, if the marked SQL statement is modified, the modified SQL statement still has marking, and whether the marked SQL statement is modified or not cannot be judged in the production environment, namely the SQL statement released into the production environment cannot be ensured to be the tested and untampered SQL statement, so that the risk of executing the SQL statement in the production environment still becomes uncontrollable.
Disclosure of Invention
One of the purposes of the present invention is to provide an SQL version control system for solving the environmental difference, so as to solve the technical problems that in the prior art, the SQL information executed in the production environment cannot be guaranteed to be tested and not tampered after the test.
The basic scheme provided by the invention is as follows: the SQL version control system for solving the environmental difference comprises a test subsystem and a production subsystem, wherein the test subsystem is used for testing the input SQL information and encrypting the SQL information when the test passes; the production subsystem is used for judging whether the input SQL information is encrypted SQL information or not, and if yes, executing the SQL information.
The first basic scheme has the beneficial effects that: the input SQL information is tested through the testing subsystem, and the SQL information is encrypted under the condition that the test is passed, namely the tested SQL information is encrypted, and the non-tested SQL information is unencrypted. By means of encryption, the SQL information is prevented from being tampered by others, and the SQL information input into the production subsystem is guaranteed to be the tested SQL information. The production subsystem judges the input SQL information, when judging that the input SQL information is the encrypted SQL information, the production subsystem can know that the input SQL information is tested, and at the moment, the encrypted SQL information is executed to decrypt the generated SQL information, so that the SQL information executed in the production environment is tested and is not tampered. Compared with the mode that a developer submitting SQL information guarantees the safety of the SQL information in the prior art, because the executed SQL information is tested and is not tampered after the test, the execution risk is controllable, thereby avoiding the occurrence of conditions of database information leakage, breakdown and the like caused by executing the input SQL information and effectively controlling the risk of executing the SQL information.
Further, the production subsystem is used for decrypting the input SQL information, and when the decryption is successful, the input SQL information is judged to be the encrypted SQL information. The beneficial effects are that: and judging whether the SQL information input into the production subsystem is the encrypted SQL information or not according to the decryption result, and finishing the judgment operation while decrypting so as to accelerate the response speed of the system.
Further, the production subsystem is used for auditing the SQL information when the input SQL information is judged to be the encrypted SQL information, and executing the SQL information when the auditing is passed. The beneficial effects are that: under development environment or test environment, it is mainly used for developer to test, and under the production environment, it can be used by the user, and the difference can be caused to appear because of the user's difference in two kinds of environment. And auditing the SQL information generated by decrypting the encrypted SQL information in the production subsystem again, namely auditing the tested SQL information, and ensuring that the SQL information passing the test can be executed in a real production environment in a rechecking mode.
Further, the test subsystem comprises a test order creation module, wherein the test order creation module is used for creating an SQL test order according to SQL information, and the test subsystem is used for testing the SQL test order; the production subsystem comprises a production order creation module, wherein the production order creation module is used for creating an SQL production order according to the encrypted SQL information when judging that the input SQL information is the encrypted SQL information, and the production subsystem is used for auditing the SQL production order. The beneficial effects are that: and the SQL test order is created by the test order creation module according to the input SQL information, so that the SQL information to be tested is conveniently distinguished and searched, and the SQL information is tested. When the input SQL information is judged to be encrypted by the production order creation module, an SQL production order is created according to the SQL information generated by decrypting the encrypted SQL information, namely, the production subsystem creates the SQL production order under the condition that the SQL information is encrypted and imported, namely, unencrypted SQL information is input to the production subsystem, the SQL production order cannot be created, so that the SQL information input by the production subsystem is ensured to be consistent with the SQL information tested by the test subsystem, and the risk of executing the SQL information is effectively controlled.
Further, the test subsystem comprises a test auditing module and an execution testing module, wherein the test auditing module is used for conducting grammar auditing and content auditing on the SQL test order, and the execution testing module is used for executing the SQL test order when passing the grammar auditing and the content auditing. The beneficial effects are that: and auditing the grammar and the content of the SQL test order through a test auditing module to ensure that the SQL test order can be successfully executed in the follow-up process. And executing the SQL test order passing the grammar audit and the content audit by the execution test module, and encrypting the SQL information if the execution is successful, namely, the test is considered to pass.
The second objective of the present invention is to provide an SQL version control method for solving the environmental difference, so as to solve the technical problem that in the prior art, the SQL information executed in the production environment cannot be guaranteed to be tested, and the SQL information is not tampered after the test.
And a basic scheme II: the method comprises the following steps:
testing, namely testing the input SQL information, and encrypting the SQL information when the test passes;
and a production step, judging whether the input SQL information is the encrypted SQL information, and if so, executing the SQL information.
The second basic scheme has the beneficial effects that: and testing the input SQL information through a testing step, and encrypting the SQL information when the testing is passed. The method and the device have the advantages that whether SQL information can be successfully executed in the production environment is judged through testing, and risks existing in the execution of the SQL information in the production environment are estimated, so that the risks of executing the SQL information can be effectively controlled later. The SQL information passing the test is marked in an encryption mode, so that the SQL information passing the test and the SQL information not passing the test can be distinguished, and the SQL information passing the test can be prevented from being tampered.
And judging the input SQL information through the production step, and executing the SQL information generated by decrypting the input SQL information when judging that the input SQL information is the encrypted SQL information. When the input SQL information is judged to be the encrypted SQL information, the input SQL information is considered to pass the test and not tampered, namely the execution risk is considered to be controllable, so that the conditions of database information leakage, breakdown and the like caused by executing the input SQL information are avoided, and the risk of executing the SQL information is effectively controlled.
Further, the production step further comprises the steps of: decrypting the input SQL information, and judging that the input SQL information is the encrypted SQL information when the decryption is successful. The beneficial effects are that: and the input SQL information is judged through the decryption result, and the judgment operation is finished while decrypting, so that a judgment step is not required to be set independently, and the response speed of the system is increased.
Further, the production step further comprises the steps of: and when the judgment result is that the input SQL information is the encrypted SQL information, auditing the SQL information, and executing the SQL information when the auditing passes. The beneficial effects are that: in the production judging step, the SQL information is checked again, and the main reason is that the production environment and the test environment have certain difference, so that the SQL information is checked again in the production environment, and the encrypted SQL information decryption generated SQL information can be executed in the real production environment.
Further, the testing step includes the steps of: creating an SQL test order according to the input SQL information, and testing the SQL test order;
the production step further comprises the following steps: judging whether the input SQL information is encrypted SQL information or not, if so, creating an SQL production order according to the encrypted SQL information, and auditing the SQL production order.
The beneficial effects are that: in the test step, an SQL test order is created for the input SQL information, in the production step, an SQL production order is created according to the judging result, and only when the judging result is that the input SQL information is the encrypted SQL information, the SQL production order is created according to the SQL information generated by decrypting the encrypted SQL information, that is, under the condition of encrypting and importing the SQL information, the SQL production order is created, namely, the unencrypted SQL information is input, and the SQL production order cannot be created, so that the SQL information input by the production environment is ensured to be consistent with the SQL information tested by the test environment, and the risk of executing the SQL information is effectively controlled.
Further, the testing step includes the steps of: when the SQL test order is tested, the grammar checking and the content checking are carried out on the SQL test order, the SQL test order is executed when the grammar checking and the content checking are passed, and the test is passed when the execution is successful. The beneficial effects are that: and the SQL test order is checked through grammar checking and content checking, so that the standardization of SQL information is ensured, and the SQL test order can be successfully executed subsequently. Executing the SQL test order, and if the SQL test order is executed successfully, the test is considered to pass, and then the SQL information is encrypted.
Drawings
FIG. 1 is a logic block diagram of a first embodiment of an SQL version control system for resolving environmental differences according to the present invention;
FIG. 2 is a logic block diagram of a second embodiment of an SQL version control system for resolving environmental differences according to the present invention;
FIG. 3 is a logic block diagram of a third embodiment of an SQL version control system of the invention that accounts for environmental differences.
Detailed Description
The following is a further detailed description of the embodiments:
example 1
An SQL version control system for solving the environmental difference is shown in fig. 1, and comprises a test subsystem and a production subsystem, wherein the test subsystem comprises an acquisition module, a test order creation module, a test auditing module, an execution test module and an encryption module, and the production subsystem comprises a decryption module, a production order creation module and an execution module.
The acquisition module is used for acquiring the input SQL information and sending the SQL information to the test order creation module. The test order creation module is used for creating an SQL test order according to the SQL information and sending the SQL test order to the test auditing module. The SQL test order is created, so that the SQL information can be conveniently distinguished and searched. The test auditing module is used for conducting grammar auditing and content auditing on SQL information in the SQL test order and generating auditing results, wherein the auditing results comprise auditing passing and auditing failure, and when the SQL test order passes the grammar auditing and passes the content auditing, the auditing results passing the auditing are generated and sent to the execution testing module; and when the grammar audit or the content audit is not passed, generating an audit result of failed audit, and returning SQL information corresponding to the SQL test order.
The execution test module is used for executing SQL information in the SQL test order when receiving the auditing result of the auditing pass, generating an execution result, wherein the execution result comprises the passing test and the failing test, generating the execution result of the passing test when the execution is successful, transmitting the execution result to the encryption module, generating the execution result of the failing test when the execution is failed, and returning the SQL information corresponding to the SQL test order. The encryption module is used for encrypting the SQL information corresponding to the SQL test order when receiving the execution result of the test passing, namely, whether the SQL information is tested can be known by judging whether the SQL information is encrypted or not, and the encrypted SQL information can be prevented from being tampered by the encryption mode. In this embodiment, the encryption module is configured to encrypt the SQL information according to a symmetric encryption technology, where the ciphertext generated by encryption is the encrypted SQL information, and the symmetric encryption technology is a relatively mature technology at present, so that no further description is given.
The decryption module is used for acquiring input SQL information, decrypting the SQL information, generating a decryption result and decrypted SQL information, wherein the decryption result comprises decryption success and decryption failure, and when the decryption is successful, the decryption result and the decrypted SQL information are sent to the production order creation module, and the input SQL information is considered to be encrypted SQL information at the moment; when decryption fails, the SQL information is returned. In this embodiment, the decryption module is configured to decrypt the SQL information according to a symmetric encryption technique, and generate a decryption result, where the plaintext generated by decryption is the SQL information passing the test.
And the production order creation module is used for creating an SQL production order according to the decrypted SQL information when receiving a decryption result of successful decryption and sending the SQL production order to the execution module. And the execution module is used for executing the SQL information in the SQL production order when receiving the SQL production order.
The SQL version control method for solving the environmental difference uses the SQL version control system for solving the environmental difference, and specifically comprises a testing step and a production step.
The testing step specifically comprises the following steps:
s101: and acquiring the input SQL information in the test environment, and creating an SQL test order according to the SQL information.
S102: and carrying out grammar auditing and content auditing on SQL information in the SQL test order, and generating auditing results, wherein the auditing results comprise auditing passing and auditing failing. And when the grammar audit is passed and the content audit is passed, generating an audit result of the audit passing, and when the grammar audit or the content audit is not passed, generating an audit result of the audit failing.
S103: and when the auditing result of the SQL information in the SQL test order is that the auditing is passed, executing the SQL information and generating an executing result. The execution results comprise test passing and test failing, when the execution is successful, the execution result of test passing is generated, and when the execution is failed, the execution result of test failing is generated.
S104: and encrypting the SQL information corresponding to the SQL test order when the execution result of the SQL information in the SQL test order is that the test passes.
The production steps specifically comprise the following steps:
s201: and acquiring the input SQL information in the production environment, decrypting the SQL information, and generating a decryption result and decrypted SQL information, wherein the decryption result comprises success and failure of decryption. When the SQL information can be decrypted, a decryption result of successful decryption is generated, and step S202 is executed, otherwise, a decryption result of failed decryption is generated.
S202: when the decryption result of the SQL information is that the decryption is successful, the input SQL information is judged to be the encrypted SQL information, namely the SQL information which passes the test and is not tampered, and an SQL production order is created according to the decrypted SQL information.
S204: SQL information in the SQL production order is executed.
Example two
The present embodiment is different from the first embodiment in that: in this embodiment, when the SQL production order is created, the SQL production order is also required to be audited, and the SQL information in the SQL production order is executed when the audit passes.
As shown in fig. 2, the production subsystem in the SQL version control system for solving the environmental differences further comprises a production auditing module, and the production order creation module sends the SQL production order to the production auditing module when creating the SQL production order. The production auditing module is used for conducting grammar auditing and content auditing on SQL information in the SQL production order and generating auditing results, wherein the auditing results comprise auditing passing and auditing failure, and when the SQL production order passes the grammar auditing and passes the content auditing, the auditing results passing the auditing are generated and sent to the execution module; and when the grammar audit or the content audit is not passed, generating an audit result of failed audit, and returning SQL information corresponding to the SQL production order. And the execution module is used for executing SQL information in the SQL production order when receiving the auditing result passing the auditing.
The SQL version control method for solving the environmental difference uses the SQL version control system for solving the environmental difference, and the method further comprises the step S203 between the step S202 and the step S204, wherein the step S203 specifically comprises the following steps:
s203: and carrying out grammar auditing and content auditing on SQL information in the SQL production order, and generating auditing results, wherein the auditing results comprise auditing passing and auditing failing. And when the grammar audit is passed and the content audit is passed, generating an audit result of the audit passing, and when the grammar audit or the content audit is not passed, generating an audit result of the audit failing.
S204: and executing the SQL information in the SQL production order when the auditing result of the SQL information in the SQL production order is that the auditing result passes.
Example III
The present embodiment is different from the first embodiment in that: in this embodiment, the test and execution are performed again on the SQL information that fails in decryption, the inspection execution information is obtained, and the pre-stored test execution information is compared, and when the inspection execution information is identical to the test execution information, the input SQL information is judged to be the SQL information that has forgotten encryption, and the input SQL information can be executed.
An SQL version control system for solving the environmental difference is shown in figure 3, and further comprises a cache database, a test subsystem, a marking module, a judging module, a screening module, a matching module and a checking module.
The execution test module is also used for generating test execution information when the execution result of the test passes, and sending the test execution information to the buffer database. The encryption module is used for sending the encrypted SQL information corresponding to the test execution information to the marking module. The marking module is used for automatically generating marking codes according to the encrypted SQL information, marking the encrypted SQL information according to the marking codes, outputting marked encrypted SQL information and sending the marking codes to the cache database. The cache database is used for associating the mark codes with the test execution information and storing the mark codes and the test execution information.
And the decryption module is used for sending the input SQL information to the judgment module when the decryption module is used for generating a decryption result of decryption failure. The judging module is used for judging whether the input SQL information has marks, if so, updating the input SQL information to obtain marked codes and unmarked SQL information, sending the marked codes to the screening module, and sending the unmarked SQL information to the checking module; otherwise, returning SQL information. The screening module is used for screening the test execution information from the database according to the mark codes and sending the test execution information to the matching module. The checking module is used for inputting the unlabeled SQL information into the testing subsystem, acquiring an execution result and/or test execution information generated by the execution testing module, sending the execution result to the matching module when the execution result is test failure, and taking the acquired test execution information as checking execution information and sending the checking execution information to the matching module when the execution result is test passing. The matching module is used for clearing test execution information corresponding to the received execution result when the execution result is received, and returning corresponding SQL information according to the execution result; the system is also used for comparing the checking execution information with the test execution information when the checking execution information is received, generating a checking result of successful checking when the checking execution information is the same as the test execution information, and sending the checking result and the unlabeled SQL information to the production order creation module; otherwise, generating a checking result of checking failure, and returning the corresponding SQL information.
The production order creation module is further configured to create an SQL production order from the unlabeled SQL information when a ping result of a ping success is received.
The SQL version control method for solving the environmental difference uses the SQL version control system for solving the environmental difference and further comprises the steps of S105, S106, S2021, S2022, S2023 and S2024.
Step S103 further includes: and when the execution result of the SQL information in the SQL test order is that the test passes, generating test execution information.
S105: generating a mark code according to the encrypted SQL information, marking the encrypted SQL information according to the mark code, and outputting marked encrypted SQL information.
S106: associating the mark code and the test execution information, and storing the associated mark code and the test execution information.
Step S201 further includes: when a decryption result of decryption failure is generated, step S2021 is performed.
S2021: when the decryption result of the SQL information is that decryption fails, judging whether the input SQL information has marks, if so, updating the input SQL information to obtain marked codes and unmarked SQL information, otherwise, returning the corresponding SQL information.
S2022: screening the stored test execution information according to the mark codes to obtain the test execution information corresponding to the mark codes, and simultaneously taking the unlabeled SQL information as input to execute the steps S101, S102 and S103 to obtain the execution result and/or the test execution information output by the step S103, and executing the step S2023 when the execution result is test failure; when the execution result is that the test passes, step S2024 is executed.
S2023: returning the corresponding SQL information according to the execution result, and clearing the test execution information corresponding to the execution result.
S2024: comparing the acquired test execution information with the examination execution information, generating an examination result of successful examination when the examination execution information and the examination execution information are identical, creating an SQL production order according to the unlabeled SQL information, and executing step S204; and when the two information are different, generating a checking result of checking failure, and returning corresponding SQL information.
When decryption fails, the SQL information is not returned directly, but whether the input SQL information is marked or not is judged, if the SQL information is marked, the marked input SQL information is tested again, the examination execution information obtained by the test is compared with the examination execution information generated by the input SQL information under the test environment, and when the examination execution information and the examination execution information are identical, the input SQL information is considered to be tested and not tampered, and the production environment can be entered for execution; when the two are different, the input SQL information is considered to be tested, but the possibility of tampering exists, so that the input SQL information is returned. By means of retesting, SQL information does not need to be returned directly, so that retesting links of developers are saved, and the purposes of shortening development time and testing time are achieved.
The foregoing is merely an embodiment of the present invention, and a specific structure and characteristics of common knowledge in the art, which are well known in the scheme, are not described herein, so that a person of ordinary skill in the art knows all the prior art in the application day or before the priority date of the present invention, and can know all the prior art in the field, and have the capability of applying the conventional experimental means before the date, so that a person of ordinary skill in the art can complete and implement the present embodiment in combination with his own capability in the light of the present application, and some typical known structures or known methods should not be an obstacle for a person of ordinary skill in the art to implement the present application. It should be noted that modifications and improvements can be made by those skilled in the art without departing from the structure of the present invention, and these should also be considered as the scope of the present invention, which does not affect the effect of the implementation of the present invention and the utility of the patent. The protection scope of the present application shall be subject to the content of the claims, and the description of the specific embodiments and the like in the specification can be used for explaining the content of the claims.

Claims (9)

1. An SQL version control system for solving environmental differences is characterized in that: the system comprises a testing subsystem and a production subsystem, wherein the testing subsystem is used for testing the input SQL information and encrypting the SQL information when the testing is passed; the production subsystem is used for judging whether the input SQL information is encrypted SQL information or not, and if yes, executing the SQL information;
the production subsystem is used for decrypting the input SQL information, and judging that the input SQL information is encrypted SQL information when the decryption is successful;
the test subsystem comprises a marking module, an execution test module and an encryption module, the production subsystem comprises a production order creation module, and the production subsystem comprises a judging module, a screening module, a matching module and a checking module;
the execution test module is used for generating test execution information when the execution result of the test is generated, and sending the test execution information to the buffer database;
the encryption module is used for sending encrypted SQL information corresponding to the test execution information to the marking module;
the marking module is used for automatically generating marking codes according to the encrypted SQL information, marking the encrypted SQL information according to the marking codes, outputting marked encrypted SQL information and sending the marking codes to the cache database;
the cache database is used for associating the mark codes with the test execution information and storing the mark codes and the test execution information;
the decryption module is used for sending the input SQL information to the judgment module when a decryption result of decryption failure is generated;
the judging module is used for judging whether the input SQL information has marks, if so, updating the input SQL information to obtain marked codes and unmarked SQL information, sending the marked codes to the screening module, and sending the unmarked SQL information to the checking module;
the screening module is used for screening out test execution information from the database according to the mark codes and sending the test execution information to the matching module;
the checking module is used for inputting the unlabeled SQL information into the testing subsystem, acquiring an execution result and/or test execution information generated by the execution testing module, and when the execution result is that the test passes, the checking module is used for taking the acquired test execution information as checking execution information and sending the checking execution information to the matching module;
the matching module is used for comparing the checking execution information with the test execution information when receiving the checking execution information, generating a checking result of successful checking when the checking execution information is the same as the test execution information, and sending the checking result and the unlabeled SQL information to the production order creation module;
the production order creation module is further configured to create an SQL production order from the unlabeled SQL information when a ping result of a ping success is received.
2. The SQL version control system for resolving environmental differences of claim 1, wherein: and the production subsystem is used for auditing the SQL information when the input SQL information is judged to be the encrypted SQL information and executing the SQL information when the auditing is passed.
3. The SQL version control system for resolving environmental differences according to claim 2, wherein: the test subsystem comprises a test order creation module, wherein the test order creation module is used for creating an SQL test order according to SQL information, and the test subsystem is used for testing the SQL test order; the production subsystem comprises a production order creation module, wherein the production order creation module is used for creating an SQL production order according to the encrypted SQL information when judging that the input SQL information is the encrypted SQL information, and the production subsystem is used for auditing the SQL production order.
4. The SQL version control system for resolving environmental differences according to claim 3, wherein: the test subsystem comprises a test auditing module and an execution testing module, wherein the test auditing module is used for conducting grammar auditing and content auditing on the SQL test order, and the execution testing module is used for executing the SQL test order when passing the grammar auditing and the content auditing.
5. An SQL version control method for solving environmental differences, which is applied to the SQL version control system for solving environmental differences according to any one of claims 1 to 4, and comprises the following steps:
testing, namely testing the input SQL information, and encrypting the SQL information when the test passes;
and a production step, judging whether the input SQL information is the encrypted SQL information, and if so, executing the SQL information.
6. The SQL version control method for solving environmental differences according to claim 5, wherein the producing step further comprises the steps of: decrypting the input SQL information, and judging that the input SQL information is the encrypted SQL information when the decryption is successful.
7. The SQL version control method for solving environmental differences according to claim 5, wherein the producing step further comprises the steps of: and when the judgment result is that the input SQL information is the encrypted SQL information, auditing the SQL information, and executing the SQL information when the auditing passes.
8. The SQL version control method for solving environmental differences according to claim 7, wherein the testing step further comprises the steps of: creating an SQL test order according to the input SQL information, and testing the SQL test order;
the production step further comprises the following steps: judging whether the input SQL information is encrypted SQL information or not, if so, creating an SQL production order according to the encrypted SQL information, and auditing the SQL production order.
9. The SQL version control method for solving environmental differences according to claim 8, wherein the testing step further comprises the steps of: when the SQL test order is tested, the grammar checking and the content checking are carried out on the SQL test order, the SQL test order is executed when the grammar checking and the content checking are passed, and the test is passed when the execution is successful.
CN202010317868.XA 2020-04-21 2020-04-21 SQL version control system and method for solving environmental difference Active CN111552698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010317868.XA CN111552698B (en) 2020-04-21 2020-04-21 SQL version control system and method for solving environmental difference

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010317868.XA CN111552698B (en) 2020-04-21 2020-04-21 SQL version control system and method for solving environmental difference

Publications (2)

Publication Number Publication Date
CN111552698A CN111552698A (en) 2020-08-18
CN111552698B true CN111552698B (en) 2023-06-06

Family

ID=72001203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010317868.XA Active CN111552698B (en) 2020-04-21 2020-04-21 SQL version control system and method for solving environmental difference

Country Status (1)

Country Link
CN (1) CN111552698B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122258A (en) * 2017-04-18 2017-09-01 上海雷腾软件股份有限公司 Method and apparatus for the state code check of test interface
CN109241751A (en) * 2018-07-25 2019-01-18 郑州云海信息技术有限公司 Data encryption verification method and system based on SQL Server
US10353806B1 (en) * 2015-12-07 2019-07-16 Mx Technologies, Inc. Multi-platform testing automation

Family Cites Families (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576843A (en) * 2008-05-07 2009-11-11 阿里巴巴集团控股有限公司 Method and device for testing application program interface
US8332655B2 (en) * 2009-01-30 2012-12-11 International Business Machines Corporation Method for order invariant correlated encrypting of data and SQL queries for maintaining data privacy and securely resolving customer defects
GB201014986D0 (en) * 2010-09-09 2010-10-20 Standard Life Employee Service A system and method for copying data
CN103186798B (en) * 2011-12-27 2017-08-01 国民技术股份有限公司 A kind of IC-card production test system
CN102708142B (en) * 2012-03-14 2014-04-02 北京思特奇信息技术股份有限公司 Method and system for acquiring background data through structured query language (SQL) custom-made template
CN102663649B (en) * 2012-05-18 2014-11-26 苏州工业园区凌志软件有限公司 Financial derivative transaction system
US8819634B2 (en) * 2012-09-28 2014-08-26 Sap Ag System and method to validate test cases
CN102968455A (en) * 2012-10-31 2013-03-13 山东浪潮齐鲁软件产业股份有限公司 Transparent database encrypting method of application layer
US20140173759A1 (en) * 2012-12-17 2014-06-19 Microsoft Corporation Rights-managed code
CN103259798A (en) * 2013-05-21 2013-08-21 浪潮集团山东通用软件有限公司 Dynamic encrypting and verifying method in interactive process with Webservice
CN104378788B (en) * 2014-12-11 2019-05-31 上海斐讯数据通信技术有限公司 Test method and system for wireless network access device
CN104615667B (en) * 2015-01-13 2018-01-19 联动优势电子商务有限公司 A kind of basic data generation method, test data creation method and its device
CN105389257B (en) * 2015-11-11 2017-12-12 中国建设银行股份有限公司 A kind of systematic parameter processing method, apparatus and system
CN105447357A (en) * 2015-12-03 2016-03-30 上海卓易科技股份有限公司 Application processing method and terminal
CN106201800A (en) * 2016-07-15 2016-12-07 北京捷科智诚科技有限公司 A kind of test design platform
CN107301130A (en) * 2017-06-28 2017-10-27 歌尔科技有限公司 A kind of VR all-in-ones testing tool and its method
CN107480478B (en) * 2017-08-14 2019-08-13 钟尚亮 A kind of encryption method and operation method of JAVA application program
CN107644175A (en) * 2017-09-13 2018-01-30 南京南瑞集团公司 A kind of method for preventing SQL injection
CN107729045A (en) * 2017-09-30 2018-02-23 武汉汉思信息技术有限责任公司 Application program automates version dissemination method and system
CN107844425A (en) * 2017-11-16 2018-03-27 中国银行股份有限公司 A kind of database statement inspection method and device
CN108932434B (en) * 2018-06-20 2021-06-25 中国农业银行股份有限公司 Data encryption method and device based on machine learning technology
CN109104724B (en) * 2018-06-30 2019-06-07 江苏恒宝智能***技术有限公司 A kind of data ciphering method and device for device upgrade
CN109324963B (en) * 2018-08-22 2024-03-15 中国平安人寿保险股份有限公司 Method for automatically testing profit result and terminal equipment
CN109144878A (en) * 2018-08-31 2019-01-04 重庆富民银行股份有限公司 Code test method based on path difference
CN109254918A (en) * 2018-08-31 2019-01-22 重庆富民银行股份有限公司 Code tester system based on path difference
CN109542762A (en) * 2018-10-16 2019-03-29 深圳壹账通智能科技有限公司 Encryption function verification method, device and the computer equipment of terminal plate
CN109960942B (en) * 2019-03-27 2021-04-27 厦门商集网络科技有限责任公司 Database data encryption and decryption method and system based on database connection pool
CN110287208A (en) * 2019-05-27 2019-09-27 北京三快在线科技有限公司 The method and apparatus of database field encryption, storage medium
CN110097299A (en) * 2019-05-31 2019-08-06 济南中维世纪科技有限公司 A kind of factory order production system and its application reducing cost
CN110795450A (en) * 2019-09-12 2020-02-14 连连银通电子支付有限公司 SQL processing method and device
CN111008211B (en) * 2019-12-06 2023-04-11 北京百分点科技集团股份有限公司 Visual interface creating method and device, readable storage medium and electronic equipment
CN111026671B (en) * 2019-12-16 2023-11-03 腾讯科技(深圳)有限公司 Test case set construction method and test method based on test case set

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10353806B1 (en) * 2015-12-07 2019-07-16 Mx Technologies, Inc. Multi-platform testing automation
CN107122258A (en) * 2017-04-18 2017-09-01 上海雷腾软件股份有限公司 Method and apparatus for the state code check of test interface
CN109241751A (en) * 2018-07-25 2019-01-18 郑州云海信息技术有限公司 Data encryption verification method and system based on SQL Server

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Circular Range Search on Encrypted Spatial Data;Boyang Wang;《2015 IEEE 35th International Conference on Distributed Computing Systems》;全文 *
基于混合算法的加密与解密的应用研究;毕红棋;陈露;;现代信息科技(第03期);全文 *
基于社会工程学的网络安全检测技术研究;何颖;刘家豪;;广东通信技术(第11期);全文 *

Also Published As

Publication number Publication date
CN111552698A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
CN103685214B (en) Safety access method for vehicle electronic control unit
CN103580852B (en) Safety element and the method and system of initializing secure element
US9954900B2 (en) Automating the creation and maintenance of policy compliant environments
CN102456111B (en) Method and system for license control of Linux operating system
CN107430658A (en) Fail-safe software certification and checking
CN101416129B (en) Field apparatus
Rubin et al. Nonmonotonic cryptographic protocols
CN109684789B (en) Method and device for software security protection in embedded product and computer equipment
CN110224833A (en) Bill data processing method and system
CN115730339B (en) Plug-in code anti-disclosure method and system based on IDE source code protection
CN114091103A (en) Method for training federated learning model, method for calling federated learning model and federated learning system
CN113505398A (en) Method, system, electronic device and storage medium for safely sharing industrial big data
CN105471902A (en) Data encryption method and system based on issued encryption algorithm
EP4319041A1 (en) Cipher card and root key protection method therefor, and computer readable storage medium
CN104135531A (en) Method and device of upgrading Web software
CN100367144C (en) Architecture for encrypted application progam installation
CN117459327B (en) Cloud data transparent encryption protection method, system and device
Meza et al. Security verification of the opentitan hardware root of trust
CN111552698B (en) SQL version control system and method for solving environmental difference
CN110287208A (en) The method and apparatus of database field encryption, storage medium
CN108427889A (en) Document handling method and device
CN110232570B (en) Information supervision method and device
CN108376212A (en) Execute code security guard method, device and electronic device
CN112905994B (en) Remote vulnerability patch program protection method and system
US20080155690A1 (en) System and Method for Authenticating and Validating the Linkage Between Input Files and Output Files in a Computational Process

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
GR01 Patent grant
GR01 Patent grant